fix(app): drive program activate toggle off active, not installed
The Programs table's install/uninstall icon keyed off `installed` (shutil.which(name)) — a PATH lookup that only makes sense for python CLI tools. Static frontends have no PATH binary so they were always `installed=false` → a green 'Install' icon even while actively served; container daemons were `installed=null` → same. And for tools the value reflected the castle-api service's PATH, which isn't guaranteed to include ~/.local/bin across reboots, so they could all flip to 'not installed'. Switch ProgramActions/ProgramTable/ProgramDetail to the uniform `active` state (Phase 2's lifecycle.is_active: PATH-independent ~/.local/bin check for tools, systemctl for services/jobs, served-assets check for static frontends). Now every program reflects real state: served frontends show Uninstall, container daemons (no install verb) show no icon. App builds clean.
This commit is contained in:
@@ -37,7 +37,7 @@ export function ProgramDetailPage() {
|
||||
stack={deployment.stack}
|
||||
source={deployment.source}
|
||||
>
|
||||
<ProgramActions name={deployment.id} actions={deployment.actions} installed={deployment.installed} onOutput={setActionOutput} />
|
||||
<ProgramActions name={deployment.id} actions={deployment.actions} active={deployment.active} onOutput={setActionOutput} />
|
||||
</DetailHeader>
|
||||
|
||||
{actionOutput && actionOutput.action && (
|
||||
|
||||
Reference in New Issue
Block a user