Fresh-agent transcript UX: glom chip, stable streaming, tool-notice polish, scroll keys, focus-on-switch#471
Merged
Merged
Conversation
…ser turn (kata cer9) Add a sticky chip anchored to the top of the transcript scroller that shows the most-recent user turn scrolled above the viewport. Clicking scrolls that turn into view (block:start) without re-enabling autoscroll — new agent output does not resnap. Recomputes on scroll and transcript-signature change via getBoundingClientRect comparison, no polling.
…(kata jp70) While a fresh-agent turn streams, the activity strip's bottom edge jumped up/down because several paths momentarily contributed zero height: - filterTurnsForDisplay dropped the last turn when all items were filtered out (e.g. showThinking=false with only a thinking item), so the turn's mt-3/mt-1.5 margin blinked on/off. - FreshAgentActivityStrip returned null when displayRows was empty, collapsing the my-0.5 footprint. - selectLiveActivityBlockId kept pointing at an earlier turn's strip when the streaming last turn had no displayable items, producing a second running indicator. Fix: - filterTurnsForDisplay now takes isStreaming and keeps the last turn (with empty items) when streaming, preserving the article footprint. - FreshAgentActivityStrip renders a stable spinner-only placeholder (same my-0.5 + py-0.5 + text-xs footprint) instead of null when live and displayRows is empty. - FreshAgentTurnArticle renders a trailing live placeholder strip when isStreamingLastTurn and no displayable blocks exist. - selectLiveActivityBlockId returns null when the streaming last turn has no displayable items, so only the placeholder is live (no double spinner). The transcriptSignature memo is unchanged — the placeholder is not an item, so it does not fire extra autoscroll frames. Settled (non-streaming) behavior is unchanged.
…ck expand single-tool strips (kata 5kxd)
…en composer isn't focused (kata faz3)
…ent pane (kata 0bc6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fresh-agent transcript UX batch
Lands 5 katas filed in the "filing katas thread", implemented via Red-Green-Refactor TDD, one commit per kata. All build on the same worktree/branch sequentially.
Katas & commits
1ec8ac6ftitletooltip). Click jumps to it (scrollIntoView({block:'start'}) and leaves autoscroll paused — new agent output does not resnap. Appears any time ≥1 user turn is above the viewport (not just while streaming).5a021838filterTurnsForDisplay, the live strip renders a stable placeholder (samemy-0.5footprint) instead ofnullwhendisplayRowsis empty, andselectLiveActivityBlockIdreturns null to avoid a double spinner.transcriptSignatureis unchanged by the placeholder so no extra autoscroll frames fire.b9b8aa69border-l-2vertical line from tool-notification headers (activity-summary,FreshAgentToolBlock,FreshAgentThinkingRow,FreshAgentThinkingDisclosure,tool_resultcard) while keeping thepx-2/pl-*indentation. Error state preserved via existingXicon +text-destructive+ a subtlebg-destructive/10tint. Single-tool activity strips now expand the only tool's body in one click (initialExpanded={true}when exactly 1 tool row, 0 thinking); multi-tool and thinking-only strips unchanged.f07572eeFreshAgentTranscriptconverted toforwardRefwith an imperative scroll handle; pane-roothandlePaneKeyDownextended to dispatch nav keys via anisInteractiveTargetguard. End resumes autoscroll / dismisses the scroll-to-bottom button; Home/PageUp pause it. Scoped to fresh-agent panes.1cc1c1behidden-based focus effect with one keyed onisActivePane(!hidden && activeTabId === tabId && activePaneId === paneId); bails only when an editable inside this pane already has focus (no clobber); focuses the pane root (tabIndex={-1}) when the composer is disabled. Removed the redundantfocusOnReadypath so the effect is the single owner of activation + session-ready focus. Also fixes a pre-existing order-dependent flake (storage clear inbeforeEach).Verification
npm run test:vitest -- run(full default-config suite): 3818 passed (356 files)npm run lint: 0 errors (11 pre-existing warnings, none in changed files)npm run typecheck(client + server): cleanEach kata's acceptance criteria are covered by unit tests in
test/unit/client/components/fresh-agent/. E2E criteria noted as follow-ups in the individual katas.