Skip to content

feat(thread): new ChatX conversation thread (behind useNewChatThread flag)#3022

Merged
adamleithp merged 6 commits into
mainfrom
ux/rebuild-thread
Jun 30, 2026
Merged

feat(thread): new ChatX conversation thread (behind useNewChatThread flag)#3022
adamleithp merged 6 commits into
mainfrom
ux/rebuild-thread

Conversation

@adamleithp

@adamleithp adamleithp commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

image image image image

Experimental rebuild of the conversation thread on the new ChatX (quill) primitives, gated behind settingsStore.useNewChatThread (Settings → Advanced → "Use new chat thread"). The production ConversationView is unchanged when the flag is off.

  • New ChatThread renderer built on ChatMessageScroller / ChatMessage / ChatBubble / ChatMarker, selected at the mount boundary via ThreadView.
  • Shared session-update tool views serve both threads: a ChatThreadChromeProvider context flips ToolRow (and friends) to the ChatX chrome only inside the new thread, so nothing forks and the legacy thread is untouched.
  • UserBubble: channel CONTEXT.md / canvas-instructions context chips (ChatMessageHeader), hover send-timestamp (ChatMessageFooter), file/attachment mentions, and stripped content so injected XML never leaks.
  • SessionResourcesBar hidden in the new thread (context now lives on the user message).
  • globals.css: keep the chat scroller's scrollbar visible while auto-scrolling — it previously flickered away on every collapsible toggle.
  • Local quill tarball override for development (.local-quill/, gitignored); revert to the published catalog version before this lands.

Gating

Reviewed the whole diff: every change to a shared session-update component is gated via useChatThreadChrome() (default false) or branches that preserve legacy rendering byte-for-byte. ProgressGroupView and SubagentToolView keep their bespoke legacy rendering and only route through ToolRow under the chat-thread chrome.

Test plan

  • Toggle Settings → Advanced → "Use new chat thread" on/off; confirm legacy thread is visually unchanged when off.
  • New thread: context chips open the split tab, timestamp shows on hover, collapsibles no longer hide the scrollbar.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

React Doctor found 6 issues in 3 files · 6 warnings.

6 warnings

src/features/sessions/components/chat-thread/ChatThread.tsx

src/features/sessions/components/chat-thread/chatThreadChrome.tsx

src/features/sessions/components/session-update/ToolRow.tsx

Reviewed by React Doctor for commit 8c2ecf9.

@greptile-apps

greptile-apps Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff (1)

  1. pnpm-workspace.yaml, line 2196 (link)

    P0 Local tarball override will break pnpm install for CI and all other developers

    The .local-quill/ directory is gitignored, so .local-quill/posthog-quill-local-5d2e0b61.tgz is never committed. Any machine — CI runner, another dev, Renovate — that runs pnpm install from this branch will get a file-not-found error for this override. Compounding this, pnpm-lock.yaml removes the catalog entry for @posthog/quill@0.3.0-beta.19 and replaces it with a file: resolution keyed to the same missing tarball, so the lock file is now unresolvable without the local file. The PR description flags this ("revert to the published catalog version before this lands"), but the branch is currently merging-blocked until it is reverted.

Reviews (1): Last reviewed commit: "feat(thread): restore user-message chrom..." | Re-trigger Greptile

Comment thread packages/ui/src/features/sessions/components/chat-thread/ToolGroup.tsx Outdated
Comment thread packages/ui/src/features/sessions/components/chat-thread/ToolGroup.tsx Outdated
Comment thread packages/ui/src/features/sessions/components/SessionView.tsx
@adamleithp adamleithp added the Stamphog This will request an autostamp by stamphog on small changes label Jun 30, 2026
@adamleithp adamleithp enabled auto-merge (squash) June 30, 2026 12:56

@stamphog stamphog 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.

Gates denied this PR: it touches dependency/toolchain files (pnpm-lock.yaml, pnpm-workspace.yaml) and exceeds the auto-review size ceiling at 1627 lines across 26 files. These require human review.

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jun 30, 2026
adamleithp and others added 5 commits June 30, 2026 17:41
…utoscroll scrollbar

Polish pass on the experimental ChatX thread (behind settingsStore.useNewChatThread):

- UserBubble: restore the channel CONTEXT.md / canvas-instructions context chips
  (ChatMessageHeader) and the hover send-timestamp (ChatMessageFooter), and render
  stripped content so the injected XML blocks never leak. File/attachment mentions
  restored too.
- Hide SessionResourcesBar in the new thread (the chips live on the user message now).
- Gate the shared session-update changes so the legacy ConversationView is unchanged
  when the flag is off: ProgressGroupView and SubagentToolView keep their bespoke
  rendering for the legacy thread and only route through ToolRow under the chat-thread
  chrome context; ToolCallView's input-preview restyle is gated too.
- globals.css: keep the chat scroller's scrollbar visible while auto-scrolling, so it
  no longer flickers away on every collapsible toggle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…tion spinner

New ChatX thread polish (behind settingsStore.useNewChatThread) plus a shared
compaction fix:

- Move SessionFooter back into the thread (last row) instead of under the composer;
  add group/thread so its hover-reveal works. New ChatThreadFooter wrapper.
- Render turn_cancelled ("Interrupted by user") and compaction boundary
  ("Conversation compacted") as ChatMarker separator rows in the new thread; the
  legacy thread keeps its existing rendering (gated via chat-thread chrome).
- Fix the "Compacting…" spinner spinning forever after a failed compaction: a
  failed compaction emits no compact_boundary, so the agent now sends a structured
  compacting_failed status that clears the spinner and renders the outcome (a
  separator marker in the new thread, a status row in the legacy thread) instead of
  assistant prose.
- Drop the now-redundant globals.css scrollbar override (quill no longer hides the
  scrollbar on data-autoscrolling).
- Point @posthog/quill at the published 0.3.0-beta.21 (drops the local-tarball
  override) now that the ChatX primitives are on npm.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@adamleithp adamleithp added the Stamphog This will request an autostamp by stamphog on small changes label Jun 30, 2026

@stamphog stamphog 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.

Gates denied: touches dependency/toolchain files (pnpm-lock.yaml, pnpm-workspace.yaml) and exceeds the auto-review size ceiling at 1873 lines across 32 files. This requires human review.

@stamphog stamphog Bot removed the Stamphog This will request an autostamp by stamphog on small changes label Jun 30, 2026
…, react-doctor

- ChatThread: stop syncing `offscreen` to the anchor prop inside the sticky-header
  effect (the render already guards on `active`), clearing the blocking
  react-doctor `no-adjust-state-on-prop-change` finding.
- ToolGroup: a missing tool-map entry means the tool is still in-flight, so default
  its status to "in_progress" instead of casting to a status-less ToolCall — fixes the
  group label reading "Used …" mid-stream (greptile P1).
- ToolGroup: split PascalCase tool names so `ToolSearch` reads "Tool search", not
  "Toolsearch" (greptile P2).
- SessionView: comment why the pending-permission box uses `shrink-0` (greptile P2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@adamleithp adamleithp merged commit c139cdc into main Jun 30, 2026
23 checks passed
@adamleithp adamleithp deleted the ux/rebuild-thread branch June 30, 2026 17:13
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