Skip to content

feat(web): add collapsible sidebar, raise UI contrast - #10

Merged
kacigaya merged 1 commit into
mainfrom
feat/web-collapsible-sidebar
Nov 5, 2026
Merged

kacigaya merged 1 commit into
mainfrom
feat/web-collapsible-sidebar

Conversation

@kacigaya

@kacigaya kacigaya commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Summary

This PR adds a collapsible sidebar to the dashboard and makes UI elements easier to see.

Collapsible sidebar

  • A toggle button in the sidebar header collapses the sidebar to a 3.5rem icon rail. Ctrl+B or ⌘B does the same.
  • The shortcut does nothing when focus is in a text field.
  • In rail mode, each link shows its label in a tooltip. The label stays available to screen readers.
  • The installation status dot moves to the corner of the account avatar.
  • A cookie (crocode-sidebar) keeps the state. The server layout reads it, so the first paint has the correct width.
  • The toggle has aria-expanded, aria-controls, and aria-keyshortcuts.
  • The width change uses a 200 ms transition. It is off when the user asks for reduced motion.
  • Below the md breakpoint, the mobile menu does not change.

Contrast

These token changes in globals.css also apply to the docs pages.

Token Before (light / dark) After (light / dark)
--border 8% / 6% 12% / 12%
--input 10% / 8% 24% / 20%
--accent (hover) 4% / 4% 6% / 7%
--secondary 4% / 4% 7% / 9%
--muted-foreground 5.6:1 / 7.2:1 7.8:1 / 9.1:1
--sidebar neutral-50 neutral-100
  • The active nav item now has a brand tint and a 3px brand bar. Before, it had only a 4% grey fill.
  • The "Reviews off" dot is now solid neutral-400 (light) and neutral-500 (dark). Before, it was muted text at 40% opacity.
  • The dark background is slightly darker, which gives cards and the sidebar more separation.

Input borders are still under 3:1. A stricter level that meets WCAG 1.4.11 would make inputs look heavy. That change can come later if needed.

Other changes

  • components/ui/tooltip.tsx comes from the coss registry. It adds no new dependency.

Validation

  • bun run lint, bun run typecheck, bun test (54 pass), and bun run build
  • bun run build:docs and bun run scripts/check-docs-export.ts
  • bun run scripts/smoke.ts
  • I tested a temporary preview route in headless Chrome:
    1. Ctrl+B and ⌘B toggle the sidebar and update the cookie.
    2. Ctrl+B inside an input does nothing.
    3. Rail tooltips show the label.
    4. The active item shows the tint and the bar.
    5. I took screenshots in light and dark mode.

- Collapse the sidebar to an icon rail with a toggle or Ctrl/Cmd+B
- Keep the state in a cookie so the first paint has the right width
- Show nav labels in tooltips in rail mode
- Raise border, input, hover, and muted text contrast
- Mark the active nav item with a brand tint and bar
Copilot AI balanced review requested due to automatic review settings November 5, 2026 09:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@kacigaya kacigaya added enhancement New feature or request accessibility Barrier affecting people with disabilities labels Nov 5, 2026
@kacigaya
kacigaya merged commit 0c5831f into main Nov 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility Barrier affecting people with disabilities enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants