Skip to content

feat(ui): canonical shell — modernize Sidebar + PageHeader (Phase 1) - #339

Merged
krisarmstrong merged 2 commits into
mainfrom
chore/phase1-canonical-shell-modernize
May 27, 2026
Merged

feat(ui): canonical shell — modernize Sidebar + PageHeader (Phase 1)#339
krisarmstrong merged 2 commits into
mainfrom
chore/phase1-canonical-shell-modernize

Conversation

@krisarmstrong

Copy link
Copy Markdown
Collaborator

Summary

Phase 1 of the seed/stem/niac harmonization plan. Stem becomes the canonical source for the cross-product UI shell; seed and niac will sync these files via scripts/sync-shell.sh in follow-up PRs.

Builds on Phase 0 (#338, now merged).

What changed in stem

Sidebar.tsx — modernization

  • Active state: flat bg-brand-primary/15 → gradient bg-gradient-to-r from-brand-primary/30 to-brand-primary/20. Active icon now uses text-brand-accent (was text-brand-primary). Richer look; per-product brand identity still comes through tokens.
  • Tri-color badges: 'New' → status-success tone, 'Beta' → status-warning tone, anything else → brand-primary tone. (Ported from NIAC.)
  • Hover prefetch: prefetchRoute(item.path) on onMouseEnter. NIAC had this; seed/stem didn't. Warms up API data before the user clicks.
  • Atmospheric bg: root layout uses bg-gradient-to-br from-surface-base via-surface-raised to-surface-deep.
  • Mobile drawer backdrop: bg-black/60bg-scrim/60 (one we missed in Phase 0).
  • File banner identifies it as CANONICAL SHELL with a warning that downstream edits will be overwritten by sync.

PageHeader.tsx — full replacement

  • Adds breadcrumb support (links + chevron separators).
  • Adds slide-out HelpPanel triggered by optional (?) icon — close on Escape / overlay click / X. Content is opaque ReactNode so each page ships its own help. (Ported from NIAC.)
  • Existing title / description / icon / actions API preserved (back-compat).
  • Fully tokenized; no raw Tailwind.

ui/SHELL.md — new

Contract doc: which files are canonical, what tokens the shell expects, how seed/niac will consume via the sync script.

What did NOT change

  • HeaderBar.tsx stays per-product. Too much variance — stem has an interface picker, seed has ethernet/wifi split + recommended-star + logo-color-as-status, niac has none. Each repo owns its own; the pattern is consistent. Documented in SHELL.md.

Test plan

  • ./scripts/check-token-discipline.sh — PASS
  • npm run build — PASS
  • npm run lint — PASS
  • Visual smoke: gradient active state, tri-color badges, hover prefetch network requests, atmospheric bg, slide-out help panel in light + dark mode

Next PRs

  • Seed: add scripts/sync-shell.sh, sync these files in from stem
  • NIAC: same; also decouple HelpDrawer/SettingsDrawer from inside its current Sidebar (move to App.tsx callbacks per the canonical pattern)

🤖 Generated with Claude Code

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@krisarmstrong
krisarmstrong enabled auto-merge (squash) May 27, 2026 19:25
@github-actions

Copy link
Copy Markdown
Contributor

License Compliance Report

All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 31 package(s)
  • MIT: 26 package(s)
  • BSD-3-Clause: 16 package(s)
  • Apache-2.0: 11 package(s)
  • BSD-2-Clause: 1 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

License Compliance Report

All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 31 package(s)
  • MIT: 26 package(s)
  • BSD-3-Clause: 16 package(s)
  • Apache-2.0: 11 package(s)
  • BSD-2-Clause: 1 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

Kris Armstrong added 2 commits May 27, 2026 16:56
Step 2 of the seed/stem/niac harmonization plan. Stem becomes the
source-of-truth for the cross-product UI shell. Seed and niac will
sync these files in via scripts/sync-shell.sh (forthcoming PRs in
those repos).

Sidebar.tsx — modernization
- Active state: bg-brand-primary/15 → bg-gradient-to-r
  from-brand-primary/30 to-brand-primary/20. Active icon now uses
  text-brand-accent (was text-brand-primary). Visually richer, still
  fully tokenized — each repo's brand identity comes through.
- Tri-color badges: 'New' → status-success tone, 'Beta' → status-warning
  tone, anything else → brand-primary tone. Ported from NIAC.
- prefetchRoute(item.path) on onMouseEnter — warm up API data before the
  user clicks. NIAC has this; seed/stem didn't.
- Root layout bg: bg-gradient-to-br from-surface-base via-surface-raised
  to-surface-deep — atmospheric depth, fully tokenized.
- Mobile drawer backdrop: bg-black/60 → bg-scrim/60.
- File banner identifies it as CANONICAL SHELL.

PageHeader.tsx — full replacement
- Adds breadcrumb support (links + chevron separators).
- Adds slide-out HelpPanel triggered by an optional (?) icon — close on
  Escape, overlay click, or X. Content is opaque ReactNode so each page
  ships its own help. Ported from NIAC's pattern.
- Existing title/description/icon/actions API preserved.
- Fully tokenized; no raw Tailwind.

ui/SHELL.md
- Documents which files are canonical, what tokens the shell expects
  each consumer repo to define, and how seed/niac will consume via the
  sync script.

Not changed
- HeaderBar.tsx stays per-product (too much variance: stem has interface
  picker, seed has ethernet+wifi split + recommended-star + logo-color-
  as-status, niac currently has none). Documented in SHELL.md.

Validated
- Discipline gate, build, lint all green
- prefetch stub from Phase 0 covers the new Sidebar import; populate
  ROUTE_PREFETCH_MAP with stem routes as performance wins arise.
Seed uses a profiles drawer; the canonical Sidebar must support it as
an optional callback alongside the existing onOpenHelp/Settings/History.
Pattern: all drawer callbacks are optional, footer button only renders
when its callback is provided. Stem doesn't use it (no behavior change
here); seed and niac can opt in.
@krisarmstrong
krisarmstrong force-pushed the chore/phase1-canonical-shell-modernize branch from 2b66042 to 0b87848 Compare May 27, 2026 20:57
@github-actions

Copy link
Copy Markdown
Contributor

License Compliance Report

All dependencies pass license compliance checks

Go Dependencies

  • Unknown: 31 package(s)
  • MIT: 26 package(s)
  • BSD-3-Clause: 16 package(s)
  • Apache-2.0: 11 package(s)
  • BSD-2-Clause: 1 package(s)

npm Dependencies

See full report in workflow artifacts

Allowed Licenses: MIT, Apache-2.0, BSD-*, ISC, CC0-1.0, MPL-2.0
Forbidden: GPL, AGPL, SSPL (strong copyleft)

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