Hub: hide standalones disabled on deploy instead of greying them out #129
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#129
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?
Problem
The hub (
src/pages/Hub.vue) renders a static list of all 8 standalones. A standalone is "disabled on deploy" when the host build doesn't set itsVITE_HUB_<APP>_URL(these are baked at build time by server-deploy'sservices/webapp.nix). When that URL is absent, the tile still renders — as a greyed-out,cursor-not-allowed"coming soon" tile.So on an events-only deploy, the hub shows 7 ghost tiles the user can never open. We want disabled standalones to not appear at all — not even greyed out.
Current behavior
Hub.vue:hubLink(m)returnsnullwhenimport.meta.env[m.envKey]is unset (lines 46–57).<component>then renders as a<div>withopacity-60 cursor-not-allowed(lines 107–116).hubLink()also returnsnullfor auth-gated modules when logged out (authRequired && !isAuthenticated) — but those are deployed (URL is set), they're just login-locked, and should keep showing greyed (clickable → login toast).So "not deployed" and "auth-gated" currently collapse into the same
null/greyed path; they need to be separated.Proposed approach
isDeployed(m)check = URL env var present:!!(m.envKey && import.meta.env[m.envKey]).orderedModulesto only deployed modules, so non-deployed tiles render nothing.isAuthGated) for deployed-but-logged-out apps — unchanged, since those still have a configured URL.This removes disabled apps entirely while preserving the greyed login-gated state for apps that are deployed.
Open decision
The grid currently also supports intentional "coming soon" teaser tiles with no
envKey(none exist today — all 8 have one — but the rendering path and a code comment anticipate them). Two options:envKeybut no URL (genuinely "deploy-disabled"), still allow deliberateenvKey-less teasers to show greyed.Recommend (a) unless we actually want teasers — cleaner, and matches the "don't show disabled" intent literally.
Notes
grid-cols-2; with fewer tiles the layout still flows (verify it doesn't look sparse on a 1–2 app deploy — may want to center / cap columns).Related: came up right after #128 (re-enabling the "Back to hub" link).
inactive(deployed-but-greyed) app state end-to-end #132