Skip to content

Agentic UI: Summarize chat file changes - #4590

Draft
shaunandrews wants to merge 1 commit into
trunkfrom
add-chat-change-summary
Draft

Agentic UI: Summarize chat file changes#4590
shaunandrews wants to merge 1 commit into
trunkfrom
add-chat-change-summary

Conversation

@shaunandrews

@shaunandrews shaunandrews commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Related issues

  • None. A companion issue was intentionally not opened for this Studio proof of concept.

How AI was used in this PR

This feature was designed and implemented collaboratively with Codex. AI helped isolate the smallest independently useful slice from a larger review experiment, implement the transcript-derived summary and tests, and verify its layout in light, dark, LTR, and RTL contexts.

Stack

This is the first of three stacked pull requests. It is intentionally useful on its own: chats that changed files gain a compact, display-only summary above the composer. #4594 makes that summary interactive and adds the per-file inventory. #4580 then adds the full diff-review destination.

Proposed Changes

  • Keep a compact summary of the files and line counts changed during the current chat directly above the composer.
  • Reconstruct the summary from successful Edit and Write activity already stored in the chat transcript, including after Studio restarts.
  • Aggregate repeated edits to the same path and format file and line totals with locale-aware number grouping.
  • Coordinate the summary with the scroll-to-latest control and collapsed-sidebar toast shelf. The controls have matching 28px heights, no shadows, and animate into aligned positions without covering other UI.
  • Keep count pairs LTR while the surrounding layout mirrors in RTL locales.

Review guide

The product boundary is deliberate: this PR answers only “how much changed?” The pill is display-only, has no hover or button semantics, and does not expose filenames or diffs. That keeps the transcript reconstruction and composer integration reviewable without coupling them to a specific review surface.

The displayed data is an activity summary of successful agent tool calls in the chat transcript. It is not a live Git working-tree diff, and repeated edits to one path have their counts aggregated.

Safety and scope

  • No new runtime dependency or external service.
  • No mutation of project files or the session transcript.
  • Only successful built-in Edit and Write activity is summarized.
  • Failed tool calls are ignored, and each tool result is counted at most once.
  • This PR contains no interactive popover, file paths, diff renderer, or Review destination.

Screenshots

Native 2560×1440 PNG captures at 100% page scale and 2× device scale. These show the first PR's complete scope: the display-only pill matches the scroll control's 28px height, with no inventory or Review action.

Light Dark
Matched 28px change summary in light mode Matched 28px change summary in dark mode

Testing Instructions

  1. Launch Studio's agentic UI and open a chat associated with a local site.
  2. Ask the agent to create or edit several files. Confirm a display-only pill appears above the composer with file, addition, and deletion totals.
  3. Confirm the pill has no hover treatment, tooltip, focus stop, or click behavior.
  4. Confirm large totals use the active locale's grouping convention, such as +1,468 in English.
  5. Scroll away from the latest message. Confirm the scroll-to-latest button enters smoothly, matches the pill's height, and remains centered over the Send button.
  6. Return to the latest message. Confirm the scroll button disappears and the pill's inline-end edge aligns with the composer.
  7. Collapse the sidebar and trigger a toast above the composer. Confirm the toast shelf does not overlap the controls.
  8. Restart Studio and reopen the chat. Confirm the summary is reconstructed from the stored transcript.
  9. Repeat in light and dark appearances and in a representative RTL locale such as Hebrew or Arabic.

Automated verification completed locally:

  • npx eslint --fix on every modified TypeScript/TSX file
  • npm test -- apps/ui/src/ui-classic/components/session-view/changes-tracker.test.tsx apps/ui/src/ui-classic/components/session-view/index.test.tsx — 2 files and 23 tests passed
  • npm run typecheck
  • npm run cli:build:ui
  • git diff --check

Manual measurements in the local agentic UI:

  • Scroll-to-latest and Send center delta: 0px in both LTR and RTL
  • Pill/composer inline-end delta without the scroll button: 0px in both LTR and RTL
  • Pill and scroll-button computed shadow: none

Pre-merge Checklist

  • Have you checked for TypeScript, React, or other console errors?
  • Verified locale-aware line-count formatting.
  • Verified light and dark appearances.
  • Verified LTR and representative RTL alignment.
  • Verified the change summary after loading an existing transcript.
  • Confirm the product direction before promoting this proof of concept from draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant