Skip to content

feat: UI-07 message navigation sidebar (emoji minimap)#37

Merged
Killea merged 9 commits intoKillea:mainfrom
bertheto:feat/ui-nav-sidebar
Mar 3, 2026
Merged

feat: UI-07 message navigation sidebar (emoji minimap)#37
Killea merged 9 commits intoKillea:mainfrom
bertheto:feat/ui-nav-sidebar

Conversation

@bertheto
Copy link
Contributor

@bertheto bertheto commented Mar 3, 2026

Summary

  • Add a fixed-width (110px) emoji navigation sidebar to the right of the message area
  • System prompt occupies full width above the sidebar; sidebar only shows real messages
  • One entry per message: agent emoji + author name + timestamp
  • Click-to-jump with precise scroll (top-aligned) + highlight flash
  • IntersectionObserver highlights currently visible messages (300ms guard on load)
  • System prompt auto-collapses on first message; stays open when thread is empty
  • Toggle via Settings -> UI Preferences (persisted in localStorage)
  • Hidden below 1000px viewport width

Modified files

File Change
src/static/index.html New sys-prompt-area + chat-body layout; system prompt redirect; auto-collapse logic
src/static/js/shared-nav-sidebar.js New: minimap build, IntersectionObserver, scroll, enable/disable
src/static/css/main.css Layout rules for messages-wrap, chat-body, nav-sidebar, nav-entry
src/static/js/components/acb-modal-shell.js UI Preferences section with minimap toggle
src/static/js/shared-modals.js Sync minimap checkbox on settings open
frontend/src/tests/nav-sidebar.test.js 14 Vitest tests (104 total passing)

Test plan

  • Open a thread with messages: system prompt expanded, collapses on first message
  • Open a thread without messages: system prompt stays expanded
  • Minimap shows one emoji entry per message (no system prompt entry)
  • Click entry: scrolls to top of message, highlights briefly
  • Scroll messages: active entry highlights correctly after 300ms
  • Settings -> UI Preferences -> uncheck minimap -> sidebar hides
  • Viewport < 1000px: sidebar hidden automatically
  • npx vitest run: 104 tests passing

bertheto added 9 commits March 3, 2026 21:12
- Add #chat-area wrapper (flex row) in #main to host messages-wrap + nav-sidebar side by side
- Add <nav id=nav-sidebar> with .nav-sidebar-list of clickable .nav-anchor elements
- New shared-nav-sidebar.js: AcbNavSidebar API (rebuild, onNewMessage, setEnabled, isEnabled, applyEnabledState)
- IntersectionObserver highlights active anchor for currently visible message
- Click anchor -> scrollIntoView({ behavior: smooth, block: center }) + brief .nav-highlight flash
- Per-agent dot colours via stable authorId->colour mapping (5-colour palette)
- Toggle via Settings > UI Preferences checkbox (localStorage acb-minimap-enabled, instant, no restart)
- acb-modal-shell.js: renderUiPreferences() + _attachMinimapToggle() + AcbModalShell.syncMinimapCheckbox()
- shared-modals.js: openSettingsModal() syncs checkbox from localStorage on open
- Responsive: sidebar hidden at <=1100px via @media
- ?v=N+1 bumped for acb-modal-shell.js (v4) and shared-modals.js (v5)
- 13 Vitest tests (103 total, 0 regression)
- Replace absolute emoji rail with fixed-width nav-sidebar column
- Add #chat-area flex wrapper (messages-wrap + nav-sidebar side by side)
- nav-entry: emoji + author name + time, hover/active states, clic jump
- IntersectionObserver highlights visible messages
- Responsive: hidden below 1000px, toggle via Settings localStorage
- 104 Vitest tests passing
- #messages-wrap: flex-direction row (messages-scroll + nav-sidebar)
- New #messages-scroll wrapper handles overflow-y: auto (scroll)
- #messages: layout only, no overflow
- scrollBottom() and scroll-top btn now target #messages-scroll
- IntersectionObserver root = #messages-scroll
- 104 Vitest tests passing
- After buildSidebar(), compute msg-sys-prompt height and set
  sidebar padding-top so entries start at the first msg-row
- On scroll, update padding-top dynamically so alignment tracks
- 104 Vitest tests passing
- Add #sys-prompt-area (full-width, flex-shrink:0) above #chat-body
- #chat-body = flex row: #messages-scroll + #nav-sidebar
- appendBubble: seq=0 injected into #sys-prompt-area, not #messages
- resetThreadSelection: clear #sys-prompt-area on thread change
- Remove dynamic padding-top hack from shared-nav-sidebar.js
- 104 Vitest tests passing
- System prompt collapsed by default on thread open
- Minimap: ignore initial IntersectionObserver batch (300ms guard)
  to avoid all entries showing as active on load
- Minimap click: scroll messages-scroll to row.offsetTop - 12px
  for precise top-aligned navigation instead of block:center
- 104 Vitest tests passing
- System prompt opens expanded when thread has no messages
- Auto-collapses when first msg-row is appended to #messages
- If already collapsed (user manually closed), no double-toggle
- 104 Vitest tests passing
@Killea Killea merged commit ca85b9c into Killea:main Mar 3, 2026
1 check passed
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.

2 participants