Hub: hide standalones disabled on deploy instead of greying them out #129

Open
opened 2026-06-19 22:59:47 +00:00 by padreug · 0 comments
Owner

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 its VITE_HUB_<APP>_URL (these are baked at build time by server-deploy's services/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) returns null when import.meta.env[m.envKey] is unset (lines 46–57).
  • The tile <component> then renders as a <div> with opacity-60 cursor-not-allowed (lines 107–116).
  • hubLink() also returns null for 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

  1. Add an isDeployed(m) check = URL env var present: !!(m.envKey && import.meta.env[m.envKey]).
  2. Filter orderedModules to only deployed modules, so non-deployed tiles render nothing.
  3. Keep the auth-gate ghosting (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:

  • (a) Same rule for everything: no live URL ⇒ hidden. Simplest; drops the teaser concept.
  • (b) Hide only apps that have an envKey but no URL (genuinely "deploy-disabled"), still allow deliberate envKey-less teasers to show greyed.

Recommend (a) unless we actually want teasers — cleaner, and matches the "don't show disabled" intent literally.

Notes

  • Grid uses 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).
  • No backend change; purely build-time env-driven.

Related: came up right after #128 (re-enabling the "Back to hub" link).

## 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 its `VITE_HUB_<APP>_URL` (these are baked at build time by server-deploy's `services/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)` returns `null` when `import.meta.env[m.envKey]` is unset (lines 46–57). - The tile `<component>` then renders as a `<div>` with `opacity-60 cursor-not-allowed` (lines 107–116). - `hubLink()` also returns `null` for **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 1. Add an `isDeployed(m)` check = URL env var present: `!!(m.envKey && import.meta.env[m.envKey])`. 2. Filter `orderedModules` to only deployed modules, so non-deployed tiles render nothing. 3. Keep the auth-gate ghosting (`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: - **(a)** Same rule for everything: no live URL ⇒ hidden. Simplest; drops the teaser concept. - **(b)** Hide only apps that *have* an `envKey` but no URL (genuinely "deploy-disabled"), still allow deliberate `envKey`-less teasers to show greyed. Recommend **(a)** unless we actually want teasers — cleaner, and matches the "don't show disabled" intent literally. ## Notes - Grid uses `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). - No backend change; purely build-time env-driven. Related: came up right after #128 (re-enabling the "Back to hub" link).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/webapp#129
No description provided.