home dashboard: surface docker apps via core's dynamic-app hook #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "home-dashboard-docker-apps"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Deployed docker-mode AI apps (built in the AI builder, served by the
homefree-ai meta-proxy at
<subdomain>.apps.<domain>) now appear under "MyApps" on the home dashboard, alongside the flake-mode apps that already showed
there.
How — the plugin side of a generic core hook
Core gained a plugin-agnostic extension point:
homefree.dashboard.dynamic-app-sources(a list of JSON-file paths core reads atrequest time, filtering by a generic
visibility). This PR is the homefree-aiside: it projects our runtime registry into that generic tile schema and writes
the file. All homefree-ai specifics (registry shape,
share_mode, the.apps.URL form) stay here — core knows none of them.
app/runtime/dashboard_export.py(new): map each deployedAppEntry→ ageneric tile — status
running/stoppedonly (missing/errorskipped);share_mode→visibility(public→public,household→authenticated,owner→owner);network_access→access badge (lan/public/sso); URL fromsubdomain or slug+system_domain;category = "My Apps". Atomic write(tmp +
os.replace), mirroring the registry's idiom.app/runtime/registry.py: regenerate the tile file on every registrymutation via
_atomic_write(best-effort + lazy import — a render failurenever breaks a registry write).
app/generator/deployer.py: seed the file once atreconcile_on_startup; addteardown(slug)(stop + remove container, dropregistry entry).
app/main.py:DELETE /api/projects/{slug}now callsteardownso adeleted app drops off the dashboard. Fixes a latent gap —
Registry.deletepreviously had zero callers, so deleted projects lingered in the registry.
apps/homefree-ai/default.nix: register the tile-file path with core viahomefree.dashboard.dynamic-app-sources(gated onhomefree-ai.enable).Dependency
Requires the matching core change — the
homefree.dashboard.dynamic-app-sourcesoption in
homefree. Without it, NixOS evaluation fails on an unknown option, sothe core PR must land first (or together). (That core PR is a separate, generic
change and is not part of this repo.)
Verification
dashboard_export.render()across all status / share_mode /network_access combinations (incl. subdomain→slug fallback;
missing/errorskipped).
owner sees their owner-only + household + public apps; another household user
sees household + public (not owner-only); anonymous sees only public.
<data>/dashboard-apps.json; the apps render under "My Apps"; deleting oneremoves its tile.