Skip to content

fix: minimap tooltip transparency and chat text overlap - #26

Merged
kahme247 merged 2 commits into
ompweb-dev:mainfrom
rickythefox:fix/minimap-issues
Aug 28, 2026
Merged

kahme247 merged 2 commits into
ompweb-dev:mainfrom
rickythefox:fix/minimap-issues

Conversation

@rickythefox

Copy link
Copy Markdown
Contributor

Summary

Fixes #22 (minimap too transparent) and #23 (minimap covers chat text).

Changes

Issue #22 - Minimap tooltip transparency

  • Tooltip opacity raised from 0.45 to fully opaque
  • Opaque backdrop panel using project Tooltip treatment (var(--bg-panel), var(--border), var(--radius-control), var(--shadow-pop))
  • Tooltips are now interactive: click to scroll to the message, hover highlights the correct item
  • 6px gap between minimap strip and tooltip panel bridged so the list doesn't dismiss when moving the mouse toward it
  • Scrollable list panel when tooltips exceed minimap height (prevents overlapping text at the bottom)
  • Auto-follow: minimap-driven selection scrolls the overflow panel via effect + data-node-index query (avoids inline callback ref churn)
  • All hooks run unconditionally before the if (!visible) return null early return

Issue #23 - Minimap covers chat text

  • MINIMAP_WIDTH shared via lib/chat-layout.ts
  • Transcript and notices columns constrained with maxWidth: min(960px, calc(100% - Xpx)) where X is derived from both MINIMAP_WIDTH and CHAT_COLUMN_PADDING so the formula stays correct if either changes
  • Symmetric padding preserved - content stays centered on narrow viewports

Files changed

  • components/ChatMinimap.tsx - tooltip interactivity, overflow handling, shared constant import
  • components/ChatWindow.tsx - desktop column max-width constraint
  • lib/chat-layout.ts - shared MINIMAP_WIDTH constant

Verification

  • Typecheck: clean
  • Lint: clean (pre-existing warning in LoginForm.tsx)
  • Tests: 3 pre-existing failures in project-registry.test.mjs and worktree.test.mjs due to macOS /private/var vs /var symlink canonicalization - unrelated to this change
  • CodeRabbit review: 0 findings
  • Visually verified in browser: tooltip readability, click-to-navigate, overflow scrolling, narrow viewport clearance

- Tooltip opacity raised to fully opaque; opaque backdrop panel with
  project Tooltip treatment (bg-panel, border, radius-control, shadow-pop)
- Tooltips interactive: click to scroll to message, hover highlights
- Gap between minimap strip and tooltip panel bridged
- Scrollable list panel when tooltips exceed minimap height, with
  auto-follow via effect + data-node-index query
- React hook ordering: all hooks before early return
- Chat column maxWidth constrained on narrow viewports so minimap
  never covers text; MINIMAP_WIDTH shared in lib/chat-layout.ts

Fixes ompweb-dev#22, fixes ompweb-dev#23
@rickythefox

Copy link
Copy Markdown
Contributor Author

Tooltips are now interactive: click to scroll to the message, hover highlights the correct item

This is not strictly part of the bug fix but it seemed like a reasonable UX expectation.

@kahme247

Copy link
Copy Markdown
Collaborator

looking into it

- Fix overflow panel using node.index as array index for previews/colors
  (always fell back to recompute, bypassed memoization)
- Fix click-to-scroll: use (scrollHeight - clientHeight) instead of scrollHeight
- Guard scrollToMinimapRatio against NaN when viewportRatio ~=1 (1 - ratio < 1e-6)
- Capture fresh minimap rect on drag instead of stale mousedown rect
- Make minimapHeightPx reactive via ResizeObserver/state instead of ref read
  during render (was stale 600px until next hover)
@kahme247

Copy link
Copy Markdown
Collaborator

@rickythefox fixed some issues and some overflows, thanks

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.

[Bug] minimap too transparent

2 participants