Skip to content

feat(chat): add mobile top bar to /chat for sidebar navigation#89

Merged
mhersson merged 1 commit into
mainfrom
feat/mobile-chat-header
May 15, 2026
Merged

feat(chat): add mobile top bar to /chat for sidebar navigation#89
mhersson merged 1 commit into
mainfrom
feat/mobile-chat-header

Conversation

@contextmatrix-runner
Copy link
Copy Markdown
Contributor

Summary

On mobile (< 768px) the sidebar is hidden by CSS and the hamburger that toggles the mobile drawer lives only in AppHeader, which isn't rendered on the /chat route — so users had no way to navigate out of the chat. This adds a thin mobile-only top bar to /chat with a hamburger (reusing the existing useMobileSidebar context), the focused chat title, and a "+ new chat" button.

  • New MobileChatHeader with hamburger, <h1> chat title (screen-reader landmark), and + new chat button
  • ChatPage wraps ChatLayout in a flex column; header rendered only when isMobile
  • focusedChatId / mobileTitle memoized to avoid per-render find() over availableChats
  • web/CLAUDE.md mobile-sidebar "Known limitations" updated

Test plan

  • npm run lint, npx tsc -b, npm test all clean (509/509 passed locally)
  • Desktop (≥ 768px): /chat renders unchanged — no header visible
  • Mobile (< 768px): top bar visible on /chat; tapping hamburger opens sidebar drawer; selecting a chat or project from drawer auto-closes it
  • Mobile: + new chat button opens NewChatDialog
  • Mobile: title reflects focused pane, truncates on overflow, falls back to "Chats" when no pane / "Chat" when focused chat is missing from availableChats
  • All three palettes (Everforest, Radix, Catppuccin) in light + dark — no hardcoded colors

🤖 Generated with Claude Code

- New MobileChatHeader with hamburger, focused chat title (h1), + new chat button
- ChatPage wraps ChatLayout in flex column; renders header only on mobile
- Hamburger reuses useMobileSidebar context shared with AppHeader
- focusedChatId and mobileTitle memoized to avoid per-render find() over chat list
- web/CLAUDE.md mobile-sidebar limitations updated

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@mhersson mhersson merged commit 1b5ac98 into main May 15, 2026
7 checks passed
@mhersson mhersson deleted the feat/mobile-chat-header branch May 15, 2026 09:05
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