Skip to content

fix(mac): chat thread scroll + tool row preview + unified stop/send - #17

Merged
SergeSerb2 merged 5 commits into
mainfrom
sergecode/mac-thread-scroll
Jul 5, 2026
Merged

fix(mac): chat thread scroll + tool row preview + unified stop/send#17
SergeSerb2 merged 5 commits into
mainfrom
sergecode/mac-thread-scroll

Conversation

@SergeSerb2

Copy link
Copy Markdown
Owner

Three chat UX fixes for the native Mac app:

Tool row command preview

The first line of a tool invocation's detail (e.g. the bash command) now renders at half opacity next to the tool name, so each run is glanceable without expanding the dropdown. Expandable detail unchanged.

Timeline scroll: viewport no longer drifts up mid-stream

Two compounding bugs in ChatTimelineScrollView:

  • Pin detection reacted to any scroll-geometry change, so content growth could silently unpin the viewport and kill autoscroll. Unpinning now only happens during user-driven scroll phases (tracking/interacting/decelerating via onScrollPhaseChange); scrolling back near the bottom re-pins.
  • The follow trigger only watched the last timeline item, so height changes in earlier rows (tool upserts, LazyVStack re-measure) shifted the viewport with no re-anchor. Any contentSize growth while pinned now re-anchors to the bottom instantly.

Net behavior: consistent auto-follow while the agent works; scrolling up to read history still backs off autoscroll.

Unified stop/send button

Header stop button removed. The composer's trailing button is now one smart control: red stop while the agent runs, morphs to send (symbol-replace transition) the moment a draft or attachment exists, grayed-out send when idle with nothing to send. Cmd+Return triggers whichever mode is showing.

Testing

  • swift build --package-path apps/mac clean
  • All 91 tests pass (T3KitTests + SidecarKitTests)

🤖 Generated with Claude Code

SergeSerb2 and others added 3 commits July 4, 2026 23:22
First line of the tool detail (e.g. the bash command) renders at half
opacity next to the tool name, so runs are glanceable without expanding.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two scroll bugs compounded: any geometry change could unpin the
viewport (content growth silently killed autoscroll), and the follow
trigger only watched the last timeline item, so height changes in
earlier rows (tool upserts, LazyVStack re-measure) shifted the viewport
with no re-anchor.

Now pin state only changes during user-driven scroll phases
(tracking/interacting/decelerating), and any contentSize growth while
pinned instantly re-anchors to the bottom.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
One smart trailing control replaces the header stop button: red stop
while the agent runs, morphs to send the moment a draft or attachment
exists, grayed-out send when idle with nothing to send.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L Broad feature or substantial cross-package change labels Jul 5, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c067dfdfca

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/mac/Sources/SergeCodeMac/UI/Composer/ComposerBar.swift
Comment thread apps/mac/Sources/SergeCodeMac/UI/Chat/ChatTimelineScrollView.swift
SergeSerb2 and others added 2 commits July 4, 2026 23:36
- Keep stop reachable while drafting: when a turn is running and the
  smart button has morphed to send, a compact red stop button (Cmd+.)
  appears beside it so a runaway turn can be cancelled without
  discarding the draft.
- Re-anchor the timeline on thread switch: a same-sized timeline
  changes neither items.count nor contentSize, so the reused ScrollView
  kept the previous thread's offset. Scroll to bottom on
  selectedThreadID change.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Main's tool-row rework (PR #16) already ships a richer header preview
(kind-aware font, parse cache, middle truncation), so its version wins
and this branch's simpler detailPreview is dropped. Scroll logic keeps
this branch's phase-gated pinning; the changeToken signature it
replaced is removed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@SergeSerb2
SergeSerb2 merged commit 93aa1fb into main Jul 5, 2026
7 of 11 checks passed
@SergeSerb2 SergeSerb2 mentioned this pull request Jul 31, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L Broad feature or substantial cross-package change vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant