Skip to content

fix(macos): steady chat scrolling and list new chats at once - #2105

Merged
LHagfoss merged 1 commit into
mainfrom
fix/macos-sidebar-scroll-pin
Oct 17, 2026
Merged

LHagfoss merged 1 commit into
mainfrom
fix/macos-sidebar-scroll-pin

Conversation

@LHagfoss

Copy link
Copy Markdown
Owner

Summary

macOS

  • Sidebar highlight: hover now lives in one sidebar-level state. Before, a row that moved out from under a still pointer (list reorders, pins) never heard it leave, so several rows stayed lit.
  • ⌘P pins or unpins the open chat. It replaces the unused Print item.
  • New chats appear at once: the engine lists a session only after it saves history at the end of the first turn. The app now shows a row from the first message and swaps in the engine's entry once it's listed.
  • Scrolling feel: rows lay out eagerly with .equatable(), as the iOS transcript does. Lazy rows got their real height only on screen, so the chat jumped while scrolling up. Code blocks and diffs scroll sideways only when wider than the chat, and tool output wraps and scrolls only when tall. Unneeded nested scrollers had been catching the wheel.
  • Autoscroll follows chat-app conventions: an upward wheel scroll lets go at once, reaching the end holds on again, and sending a message returns to the end. While following, the end stays anchored natively (defaultScrollAnchor(.bottom, for: .sizeChanges)); once detached, growth never moves the reader. Only wheel and scroller input over the chat counts.

Engine (found in the reviewed sessions)

  • search_web had an Exa API key hardcoded as a fallback. It's removed, so Exa now runs only with EXA_API_KEY set. ⚠️ The key is still in git history and must be revoked.
  • search_web added site: even with an empty domain, sliced snippets by bytes (a panic on non-ASCII text), and left Tavily snippets unbounded.
  • Batched search_web and read_url calls now run in parallel (about 2s each, previously one after another).

Testing

  • cargo test --workspace, cargo fmt --all -- --check: everything passes except rustcode-tui remote_registers_with_a_running_gateway_and_shows_how_to_pair, which failed once in the full run and passed 3/3 on its own (code not touched by this PR).
  • swift test in macos/ (65 tests)

https://claude.ai/code/session_011PUNFotC3fKLBhHKUnPG3D

- Sidebar: one hovered row at a time; rows that moved under a still
  pointer stayed lit.
- ⌘P pins or unpins the open chat.
- A new chat shows in the sidebar from its first message, not once the
  engine saves its history at the end of the turn.
- Chat rows lay out eagerly and equatably, and nested code, diff and
  tool-output scrollers only scroll when their content overflows, so
  the chat no longer jumps or stalls under the pointer.
- Autoscroll follows chat-app conventions: an upward wheel scroll lets go
  at once, reaching the end holds on again, sending a message returns to
  the end, and the end stays anchored as output grows.
- search_web: drop the built-in Exa API key, add `site:` only for a real
  domain, clip snippets on a character boundary and bound Tavily ones.
- Run batched search_web and read_url calls in parallel.

Claude-Session: https://claude.ai/code/session_011PUNFotC3fKLBhHKUnPG3D
@github-actions github-actions Bot added the fix A bug fix label Oct 17, 2026
@LHagfoss
LHagfoss merged commit f072556 into main Oct 17, 2026
8 checks passed
@LHagfoss
LHagfoss deleted the fix/macos-sidebar-scroll-pin branch October 17, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant