Skip to content

refactor(ui): slim HeaderBar — kill sidebar duplicates, logout to profile menu (Phase 2) - #342

Merged
krisarmstrong merged 1 commit into
mainfrom
chore/phase2-slim-headerbar
May 27, 2026
Merged

refactor(ui): slim HeaderBar — kill sidebar duplicates, logout to profile menu (Phase 2)#342
krisarmstrong merged 1 commit into
mainfrom
chore/phase2-slim-headerbar

Conversation

@krisarmstrong

Copy link
Copy Markdown
Collaborator

Summary

Phase 2 of the seed/stem/niac harmonization. Slims the HeaderBar by killing items that duplicated the sidebar footer or were misplaced page-level actions. Logout moves inside the profile dropdown. Stem becomes the reference; seed and niac follow with their own per-product slim headers.

Stacked on #339 (Phase 1). Will rebase onto main once that lands.

Header before → after

Item Before After
Logo + product name + connection ✓ (kept)
Tagline ("Mustard Seed Networks") removed (marketing copy)
InterfaceDropdown ✓ (kept, moved order)
ProfileDropdown ✓ (kept, with Logout inside)
ThemeToggle ✓ (kept)
Refresh button removed (page-level concern)
History button removed (sidebar nav has it)
Help button removed (sidebar footer has it)
Settings button removed (sidebar footer has it)
Standalone Logout button moved into ProfileDropdown menu

Result: ~5 things in the right slot instead of ~10.

ProfileDropdown gets a Logout menu item

New optional onLogout prop. When provided, renders a Logout row at the bottom of the dropdown (under the existing Manage divider). Tinted text-status-error.

Deprecated props (kept optional, ignored)

onRefresh, onHistoryOpen, onHelpOpen, onSettingsOpen — App.tsx and any other callers can keep passing them. Future cleanup PR will remove the props and the call sites.

ui/SHELL.md — HeaderBar shape convention

New section documents the 3-slot layout that ALL three repos' HeaderBars now follow:

  • Left: logo + product name + connection-status
  • Center: empty (reserved for breadcrumbs)
  • Right: per-product context selectors + theme toggle

What belongs in the header (per product) and what's banned (Settings/Help/Logout/Refresh/History/taglines) is codified.

Test plan

  • ./scripts/check-token-discipline.sh — PASS
  • npm run build — PASS
  • npm run lint — PASS
  • npx tsc --noEmit — clean for HeaderBar (2 unused icons removed)
  • Visual: verify ConnectionBadge still next to logo, profile dropdown shows Logout at bottom

Next

  • Seed PR: same recipe, keep Eth/WiFi split + recommended-star + logo-color-as-status
  • NIAC PR: build a slim HeaderBar from scratch (logo + status + theme — no profile/interface)

🤖 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 force-pushed the chore/phase1-canonical-shell-modernize branch from 2b66042 to 0b87848 Compare May 27, 2026 20:57
Base automatically changed from chore/phase1-canonical-shell-modernize to main May 27, 2026 21:01
…file menu

Phase 2 of the harmonization. Removes header items that duplicated
sidebar footer affordances or were misplaced page-level actions. The
header now carries only what the user needs at every page: brand
identity, live connection state, per-product context selectors, theme.

Removed from header
- Settings button — already in sidebar footer.
- Help button — already in sidebar footer.
- Refresh button — page-specific action; pages mount their own.
- History button — sidebar nav has History; was a duplicate.
- Standalone Logout button — moved inside ProfileDropdown menu.
- Tagline ("Mustard Seed Networks") — marketing copy, not app chrome.

Kept in header
- Logo + product name + ConnectionBadge (left slot)
- InterfaceDropdown + ProfileDropdown + ThemeToggle (right slot)

ProfileDropdown additions
- `onLogout?` prop renders a "Logout" menu item under the existing
  Manage divider. Tinted with text-status-error.

Deprecated props (kept optional for back-compat; ignored)
- onRefresh, onHistoryOpen, onHelpOpen, onSettingsOpen — App.tsx and
  any callers can keep passing them; future cleanup PR will remove
  the props and the callers' wiring.

ui/SHELL.md
- New "HeaderBar shape convention" section: documents the three-slot
  layout (left / center / right), what belongs in each, what's banned
  from the header. Per-product variance is permitted in the right slot
  but the shape is uniform across stem/seed/niac.

Validated: build, lint, token discipline all green.
@krisarmstrong
krisarmstrong force-pushed the chore/phase2-slim-headerbar branch from d550cec to 14c63d9 Compare May 27, 2026 21:03
@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)

@krisarmstrong
krisarmstrong merged commit cf72ebf into main May 27, 2026
26 of 28 checks passed
@krisarmstrong
krisarmstrong deleted the chore/phase2-slim-headerbar branch May 27, 2026 21:17
krisarmstrong added a commit that referenced this pull request May 29, 2026
…360)

Applies the same design-token consolidation as seed, scoped to stem's
(much smaller) debt. Stem has no canvas/PDF/cable features, so unlike seed
it needs no tokens.ts JS-reader — SVG and inline styles consume the CSS
variables directly.

- ModuleSelector + ModuleSettingsContext: the six module colors were
  hardcoded as inline hex (color: '#0891b2' …), duplicating --color-module-*
  and NOT adapting to dark mode. Now color: 'var(--color-module-reflector)'
  etc. — single source of truth, theme-aware via the cascade.
- LicenseSection: bg-red-500/bg-green-500 + bg-opacity-10 -> bg-status-error/10
  and bg-status-success/10.
- InputModal: placeholder-gray-500 -> placeholder:text-text-muted.
- Sidebar nav-group label -> section-title (keeps semibold); SecurityPage
  page title -> heading-1.
- index.css: add the .z-overlay/.z-max z-index scale; CommandPalette
  z-[60] -> z-overlay.
- Add styles/DESIGN_SYSTEM.md documenting the three-tier token architecture
  and the SVG-uses-var()/no-canvas distinction.

Verified: biome clean, tsc passes, build succeeds. (7 pre-existing
HeaderBar.test failures are unrelated stale tests from the #342 HeaderBar
slim — present on main, not in the blocking CI path.)

Co-authored-by: Kris Armstrong <kris.armstrong@icloud.com>
krisarmstrong added a commit that referenced this pull request May 29, 2026
* test(ui): sync HeaderBar tests with the slimmed header (#342)

HeaderBar was slimmed in #342 — refresh/history/help/settings moved to the
sidebar footer / page level (their props are now @deprecated and ignored),
logout moved into the profile dropdown, and the "Mustard Seed Networks"
tagline was dropped. The tests still asserted the old toolbar, leaving 7
failures on main.

- Drop the deprecated onRefresh/onHistoryOpen/onHelpOpen/onSettingsOpen from
  defaultProps.
- Remove the stale tagline test and the four dead interaction tests for the
  relocated buttons.
- Rewrite the toolbar test to assert the theme toggle is present and the
  relocated buttons are absent.
- Rewrite the logout test to open the profile dropdown and click Logout there.

All 153 stem UI tests now pass (was 7 failing).

* style(ui): biome format HeaderBar test (collapse wrapped expect)

---------

Co-authored-by: Kris Armstrong <kris.armstrong@icloud.com>
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