Hub: wire the inactive (deployed-but-greyed) app state end-to-end #132
Labels
No labels
app:activities
app:chat
app:events
app:forum
app:libra
app:market
app:restaurant
app:tasks
app:wallet
app:webapp
bug
enhancement
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
aiolabs/webapp#132
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Follow-up to #130. The hub resolver already supports an
inactiveavailability state (provisioned but switched off → rendered greyed and inert), but there's no way for an operator to specify it on deploy — today an app is binary: enabled (shown) or not (hidden). This issue wires the greyed-out state end-to-end.Background
PR #130 introduced the availability model in
src/pages/Hub.vue:availableauth-lockedinactiveactive:false)unavailableinactiveis driven by an optionalactivefield on the in-code catalog (Module.active), but nothing sets it — it's a frontend seam with no input.Current deploy mechanism
Availability is set in NixOS via
services.webapp-standalones.<app>.enable(server-deploy/modules/services/standalones.nix). For each enabled app the module deriveshub<App>Url→ baked into the build asVITE_HUB_<APP>_URL. The hub shows a tile iff that env var is set. Soenabledoes double duty: build+serve the standalone and light up the hub tile. There is no "deployed but greyed on the hub" option.Proposed wiring
Frontend (this repo):
VITE_HUB_<APP>_ACTIVE(default true / absent ⇒ active).availabilityOf(), returninactivewhen the app is provisioned (URL present) but its active flag isfalse, ahead of the auth check.activefrom that env rather than a hardcoded field (the field stays as the in-code default/override).inactiveUX: greyed +cursor-not-allowed(current), plus optionally a small "Coming soon" / "Unavailable" sub-label or tooltip in place of the maturity badge.Deploy (
aiolabs/server-deploy):services.webapp-standalones.<app>.active(bool, default true).VITE_HUB_<APP>_ACTIVEinto the webapp build env alongsidehub<App>Url.enableas build+serve;active=falsemeans "served + shown on hub, but greyed/inert" — i.e. the app is reachable directly but presented as not-yet-available on the hub. (Confirm this is the intended semantics vs. "shown but link-dead".)Open questions
activevsenabled/visible/coming_soon.activematches the frontend field already in place.inactivetiles be completely inert, or still navigable for logged-in admins? (Probably inert for everyone; admins use the direct URL.)/hub/appsor a NIP-78 event) for live toggling without a rebuild — see the registry-as-data note in #130. This issue is the env-var stopgap; the runtime source is a separate, larger piece.Scope
Small, additive. No behavior change until an app sets
active=false. Cross-repo: webapp resolver + server-deploy option.Related: #129, #130.