Skip to content

feat(#2864): Temporarily Unavailable toggle for mission paths - #2869

Merged
jung-thomas merged 9 commits into
DEVfrom
worktree-2864-mission-disable
Oct 21, 2026
Merged

jung-thomas merged 9 commits into
DEVfrom
worktree-2864-mission-disable

Conversation

@jung-thomas

Copy link
Copy Markdown
Contributor

Closes #2864.

Adds a manual per-mission Temporarily Unavailable toggle so a broken or under-maintenance mission path can be pulled out of circulation in one switch, then restored just as fast.

Behaviour

  • New Missions.temporarilyUnavailable : Boolean default false + unavailableReason : String(500).
  • Set via the Admin UI Mission Editor (toggle + reason). A normal Admin can write it — not SuperAdmin-gated like published.
  • When on:
    • Mission card shows a "Temporarily Unavailable" badge on /browse/ and /tutorial-navigator/.
    • Child path-item links are suppressed in the navigator (NavigatorCatalog view + nested-group path) and the mission-detail feed (returns items: []).
    • The mission's own content page stays reachable by direct URL (HTTP 200, not 404) — content remains visible, per the issue.
  • Orthogonal to published (a disabled mission stays published: true). Rebuild-gated propagation — takes effect on the next content rebuild, like every other mission edit.

Not in scope (deliberate)

  • No scheduled/timed window (reactive switch only).
  • No Groups-level flag (mission-path level only).
  • Runtime MissionRef/navigator plumbing not extended — the badge is baked into browse.json and rendered SSR.

Testing

  • New unit tests: catalog threading, mission-detail suppression (proves real links are suppressed, not an empty mission), navigator suppression (view + nested-group, incl. a NULL-flag legacy-row case). Card badge covered by the parity test + regenerated fixture.
  • All new tests pass; cds build --production green. HANA migration table regenerated (migration=9) and committed.
  • Null-safe filters verified in both navigator paths (is null or = false in the view, { '!=': true } in JS) so legacy rows with the column unset still show.

Docs

Design + implementation plan under docs/superpowers/specs/ and docs/superpowers/plans/.

🤖 Generated with Claude Code

- Add temporarilyUnavailable/unavailableReason fields to BrowseCardItem
  (scripts/fetch-tutorials.ts) and CardItem (hugo-apps/src/shared/types.ts)
- Populate both fields in buildAllCards mission literal from mMeta lookup
- Add badge element to MissionCard.vue (v-if="item.temporarilyUnavailable")
  and card-mission.html Hugo partial ({{- if $item.temporarilyUnavailable -}})
  immediately after the nav-card__type--mission div
- Add .nav-card__unavailable-badge CSS rule to card.css reusing badge visual
  conventions (orange background, white text, rounded, small caps)
- Add temporarilyUnavailable:true to mission fixture in cards.fixtures.json
  so parity test exercises the badge branch
- Regenerate card-mission.expected.html, card-tutorial.expected.html,
  card-group.expected.html, and browse-page-1.html via regen-card-parity-fixtures.sh
- Fix regen script: pass (dict "item" ...) to card partials which expect
  .item context, not a raw item (pre-existing script/partial interface mismatch
  that caused the partial to silently produce empty fixtures)
- Add two new vitest cases: positive (flag set) and negative (flag absent)
  in fetch-tutorials-browse-channel.test.ts

Both vitest suites pass (20 tests total).
@jung-thomas
jung-thomas merged commit d6a600d into DEV Oct 21, 2026
8 checks passed
@jung-thomas
jung-thomas deleted the worktree-2864-mission-disable branch October 21, 2026 01:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant