Repository navigation
feat: aggregated page-session card — one card per page-driving run (#413) - #438
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (11)
🚧 Files skipped from review as they are similar to previous changes (8)
📝 WalkthroughWalkthroughChangesPage-session card
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant ChatPane
participant ThreadMessages
participant groupSegments
participant SessionCard
ChatPane->>ThreadMessages: provide PageSessionConfig
ThreadMessages->>groupSegments: group page tool calls and results
groupSegments-->>ThreadMessages: return page-session segment
ThreadMessages->>SessionCard: provide session parts and streaming state
SessionCard-->>ThreadMessages: render aggregated page-action card
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/ui-kit-chat/src/styled/thread.tsx (1)
142-155: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚖️ Poor tradeoffExtract the duplicated page-session selection logic into
page-session.ts. Both views now carry their own copy ofasPageSession,renderable,lastRenderableIndex, andliveSegment, plus near-identicalDynamicwiring. The copies have already diverged: the Activity copy omits reply segments fromrenderable, which produces the streaming-state defect raised separately atpackages/ui-kit-chat/src/styled/activity.tsxline 279.packages/ui-kit-chat/src/store/page-session.tscurrently shares only the leaf helpers, so each new segment rule must be applied twice.
packages/ui-kit-chat/src/styled/thread.tsx#L142-L155: moveasPageSessionand thelastRenderableIndexcomputation intopackages/ui-kit-chat/src/store/page-session.tsas a helper that accepts the parts, the segments, and a per-view renderable predicate. Call that helper here.packages/ui-kit-chat/src/styled/activity.tsx#L274-L286: call the same helper, and supply the Activity predicate that usesstepIndicesfor chains.The per-view differences are the chain filter and the
resultForsource. Keep those as parameters.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/ui-kit-chat/src/styled/thread.tsx` around lines 142 - 155, The duplicated page-session selection and last-renderable-index logic must be centralized. In packages/ui-kit-chat/src/store/page-session.ts, add a helper accepting parts, segments, and a per-view renderable predicate, while preserving configurable chain filtering and resultFor sources; move the shared asPageSession and lastRenderableIndex behavior there. In packages/ui-kit-chat/src/styled/thread.tsx lines 142-155 and packages/ui-kit-chat/src/styled/activity.tsx lines 274-286, replace local implementations with the shared helper, supplying each view’s chain predicate, resultFor source, and Activity’s stepIndices-based behavior; ensure Activity includes reply segments in its predicate.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/ui-kit-chat/src/store/grouping.ts`:
- Around line 47-67: Update foldableParentIds to absorb a parent only when it
has a confirmed foldable page act in the same session; exclude
approval-requested and other non-foldable children from firstActChildIndex.
Ensure a non-page tool between the parent and its first act does not create an
act-less absorbed session—preserve the parent or convert the grouping to a
chain—and add coverage for both cases.
In `@packages/ui-kit-chat/src/styled/activity.tsx`:
- Around line 279-286: Update the renderable helper in the activity component to
also return true for reply segments, matching the Thread view’s behavior. Move
the existing asReply declaration above renderable so it can be used there,
ensuring lastRenderableIndex and liveSegment identify a trailing reply as the
final renderable segment.
---
Nitpick comments:
In `@packages/ui-kit-chat/src/styled/thread.tsx`:
- Around line 142-155: The duplicated page-session selection and
last-renderable-index logic must be centralized. In
packages/ui-kit-chat/src/store/page-session.ts, add a helper accepting parts,
segments, and a per-view renderable predicate, while preserving configurable
chain filtering and resultFor sources; move the shared asPageSession and
lastRenderableIndex behavior there. In
packages/ui-kit-chat/src/styled/thread.tsx lines 142-155 and
packages/ui-kit-chat/src/styled/activity.tsx lines 274-286, replace local
implementations with the shared helper, supplying each view’s chain predicate,
resultFor source, and Activity’s stepIndices-based behavior; ensure Activity
includes reply segments in its predicate.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 615febe6-a3b7-4c7a-a60f-14ecaed8fef1
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (31)
apps/conciv/src/pane/chat-pane.tsxapps/conciv/test/page-session-card.browser.test.tsxdocs/assets/page-session-card-spike/fake-form.htmlpackages/embed/tests/e2e/element-capture.it.test.tspackages/extensions/page/package.jsonpackages/extensions/page/src/client.tsxpackages/extensions/page/src/client/cards/session-card.stories.tsxpackages/extensions/page/src/client/cards/session-card.tsxpackages/extensions/page/src/client/cards/session-steps.tspackages/extensions/page/src/client/cards/story.fixtures.tspackages/extensions/page/src/shared/defs.tspackages/extensions/page/test/defs.test.tspackages/extensions/page/test/session-card.solid.browser.test.tsxpackages/extensions/page/test/session-steps.test.tspackages/extensions/page/vitest.config.tspackages/ui-kit-chat/src/index.tsxpackages/ui-kit-chat/src/primitives/message/message.stories.tsxpackages/ui-kit-chat/src/primitives/message/message.tsxpackages/ui-kit-chat/src/store/grouping.tspackages/ui-kit-chat/src/store/page-session.tspackages/ui-kit-chat/src/styled/activity.tsxpackages/ui-kit-chat/src/styled/reasoning.tsxpackages/ui-kit-chat/src/styled/thread.tsxpackages/ui-kit-chat/src/tools.tsxpackages/ui-kit-chat/src/tools/styled/card-shell.tsxpackages/ui-kit-chat/src/tools/styled/collapsible-card.tsxpackages/ui-kit-chat/src/tools/styled/tool-card.tsxpackages/ui-kit-chat/test/grouping.test.tspackages/ui-kit-chat/test/page-session-injection.browser.test.tsxpackages/ui-kit-system/src/index.tsxpackages/ui-kit-system/src/splitter.tsx
There was a problem hiding this comment.
Pull request overview
Adds opt-in aggregation of page-driving tool runs into a single streaming or settled session card across chat surfaces.
Changes:
- Adds page-session grouping, rendering contracts, and app wiring.
- Implements session cards with steps, captures, scripts, reasoning, and status states.
- Adds browser, integration, unit, and Storybook coverage.
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
pnpm-lock.yaml |
Updates dependency resolutions. |
packages/ui-kit-system/src/splitter.tsx |
Re-exports Ark Splitter. |
packages/ui-kit-system/src/index.tsx |
Exposes Splitter publicly. |
packages/ui-kit-chat/test/page-session-injection.browser.test.tsx |
Tests thread/activity injection. |
packages/ui-kit-chat/test/grouping.test.ts |
Tests session grouping rules. |
packages/ui-kit-chat/src/tools/styled/tool-card.tsx |
Supports custom flush headers. |
packages/ui-kit-chat/src/tools/styled/collapsible-card.tsx |
Adds flush-header styling. |
packages/ui-kit-chat/src/tools/styled/card-shell.tsx |
Forwards custom header options. |
packages/ui-kit-chat/src/tools.tsx |
Exports shimmer styling. |
packages/ui-kit-chat/src/styled/thread.tsx |
Renders page sessions in threads. |
packages/ui-kit-chat/src/styled/reasoning.tsx |
Extracts reusable reasoning text. |
packages/ui-kit-chat/src/styled/activity.tsx |
Renders sessions in activity views. |
packages/ui-kit-chat/src/store/page-session.ts |
Defines session renderer contracts/helpers. |
packages/ui-kit-chat/src/store/grouping.ts |
Implements page-session segmentation. |
packages/ui-kit-chat/src/primitives/message/message.tsx |
Supports session segment indices. |
packages/ui-kit-chat/src/primitives/message/message.stories.tsx |
Updates segment story typing. |
packages/ui-kit-chat/src/index.tsx |
Exports session APIs. |
packages/extensions/page/vitest.config.ts |
Adds Solid browser-test project. |
packages/extensions/page/test/session-steps.test.ts |
Tests step derivation. |
packages/extensions/page/test/session-card.solid.browser.test.tsx |
Tests session-card behavior. |
packages/extensions/page/test/defs.test.ts |
Tests mutating tool-name derivation. |
packages/extensions/page/src/shared/defs.ts |
Exposes page act names. |
packages/extensions/page/src/client/cards/story.fixtures.ts |
Extends card fixtures. |
packages/extensions/page/src/client/cards/session-steps.ts |
Derives session steps. |
packages/extensions/page/src/client/cards/session-card.tsx |
Implements the aggregated card. |
packages/extensions/page/src/client/cards/session-card.stories.tsx |
Adds visual session scenarios. |
packages/extensions/page/src/client.tsx |
Exports session-card APIs. |
packages/extensions/page/package.json |
Adds Solid testing dependency. |
packages/embed/tests/e2e/element-capture.it.test.ts |
Verifies aggregated widget rendering. |
docs/assets/page-session-card-spike/fake-form.html |
Reformats the visual fixture. |
apps/conciv/test/page-session-card.browser.test.tsx |
Tests history-reloaded sessions. |
apps/conciv/src/pane/chat-pane.tsx |
Enables page sessions in chat. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (2)
packages/ui-kit-chat/src/store/grouping.ts:55
- Approval-requested child acts still contribute their parent ID here. For
[execute_typescript parent, page.fill child awaiting approval], the parent is moved into a step-less page session and disappears, even though approval calls must never cause folding. Exclude approval-requested acts when deriving foldable parents.
if (!pageActNames.has(part.name)) return
packages/ui-kit-chat/src/store/grouping.ts:64
- Only reply text is treated as a split between a parent and its first act child. A non-page top-level call or approval call in that interval also closes a session, but this pre-scan still marks the parent as foldable; the parent then becomes a step-less hidden session while the later act opens a second card. Derive parent foldability using all session-closing boundaries, not replies alone.
const split = replyIndices.some((replyIndex) => replyIndex > parentIndex && replyIndex < childIndex)
if (!split) ids.add(parent)
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| function stepDescriptor(capture: ToolCaptureView | undefined): ElementDescriptor | undefined { | ||
| return capture?.after?.descriptor ?? capture?.before?.descriptor | ||
| } |
There was a problem hiding this comment.
Fixed in 9927cda — descriptor selection is now per-field: accessibleName/value each take the first non-empty of after→before (descriptorField), so a named before-capture wins over an unnamed after-capture. Unit tests cover both fields.
| if (!pageSession || segment.kind !== 'page-session') return null | ||
| return pageSessionHasSteps(props.turn.parts, segment.indices, pageSession.actNames) ? segment : null | ||
| } | ||
| const renderable = (segment: Segment): boolean => asPageSession(segment) !== null || visibleChain(segment) !== null |
There was a problem hiding this comment.
Fixed in 9927cda — activity's renderable now counts replies as boundaries, matching the thread surface; browser test pins [act, result, reply] settling the card in a live activity. (The two surfaces' chain-visibility predicates deliberately remain separate — they gate on different things — but the boundary semantics now agree.)
| const firstRow = document.querySelector('li') | ||
|
|
||
| setParts((previous) => [...previous, fillCall('f2', '#email', 'ada@')]) | ||
| await expect.element(page.getByText('Filling #email…')).toBeVisible() | ||
| expect(document.querySelectorAll('li')[0]).toBe(firstRow) | ||
| const secondRow = document.querySelectorAll('li')[1] | ||
|
|
||
| setParts((previous) => [...previous.slice(0, 1), fillCall('f2', '#email', 'ada@example.com')]) | ||
| await expect.element(page.getByText('“ada@example.com”')).toBeVisible() | ||
| expect(document.querySelectorAll('li')[0]).toBe(firstRow) | ||
| expect(document.querySelectorAll('li')[1]).toBe(secondRow) |
There was a problem hiding this comment.
Fixed in 9927cda — the identity test now uses getByRole('listitem') locators; node-identity comparisons kept.
| const ACTION_FORMAT = new Intl.NumberFormat() | ||
| const ACTION_PLURAL = new Intl.PluralRules('en') | ||
|
|
||
| const GERUNDS: Record<string, string> = {fill: 'Filling', check: 'Checking', select: 'Selecting', click: 'Clicking'} |
There was a problem hiding this comment.
Fixed in 9927cda — running phrases now derive from each tool def's canonical label.running via pageVerbGerund (hand-kept map deleted); a guard test asserts every act verb yields a gerund. Side effect: fill's canonical copy is "Typing …", which replaced "Filling …".
| parts.forEach((part, index) => { | ||
| if (isReplyText(part)) replyIndices.push(index) | ||
| if (part.type !== 'tool-call') return | ||
| if (part.id && !parentIndexById.has(part.id)) parentIndexById.set(part.id, index) |
There was a problem hiding this comment.
Partly disagree, differently resolved: the repo has no functional-style rule banning local mutation in a pure function, and a typed reduce over one accumulator object is the same mutation in different clothes — so the literal suggestion is declined. The underlying legibility point was real though: c9e800d rewrites the scan declaratively with es-toolkit (uniqBy for first-occurrence maps, flatMap projections, a filter for the unsplit parents). The sequential fold in placeSegmentPart stays a fold by design.
5813048 to
27deb94
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/extensions/page/src/client/cards/session-card.tsx (1)
86-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReplace the
as constassertion.Declare
ROW_DELAYSasreadonly string[]; its indexed use only requires read-only strings and keeps the same behavior.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/extensions/page/src/client/cards/session-card.tsx` around lines 86 - 95, Replace the as const assertion on ROW_DELAYS with an explicit readonly string[] type annotation, preserving the existing delay values and indexed usage behavior.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/extensions/page/src/client/cards/session-card.tsx`:
- Around line 173-176: Update sessionStatus and the related status contract to
preserve aborted sessions: retain streaming and error precedence, then return an
aborted status when any step has state "aborted" instead of marking the session
complete. Extend ToolStatus, StatusVisual, cardPhase, and StepGlyph handling as
needed so aborted sessions render their aborted visual without an ordinal.
---
Nitpick comments:
In `@packages/extensions/page/src/client/cards/session-card.tsx`:
- Around line 86-95: Replace the as const assertion on ROW_DELAYS with an
explicit readonly string[] type annotation, preserving the existing delay values
and indexed usage behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8a85e2b2-e240-405c-806f-28c0f3dca0b3
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
packages/extensions/page/src/client/cards/session-card.tsxpackages/ui-kit-chat/src/styled/activity.tsxpackages/ui-kit-chat/src/styled/thread.tsxpackages/ui-kit-chat/src/tools/styled/collapsible-card.tsx
🚧 Files skipped from review as they are similar to previous changes (3)
- packages/ui-kit-chat/src/styled/activity.tsx
- packages/ui-kit-chat/src/tools/styled/collapsible-card.tsx
- packages/ui-kit-chat/src/styled/thread.tsx
| function sessionStatus(steps: ReadonlyArray<PageSessionStep>, streaming: boolean, errored: boolean): ToolStatus { | ||
| if (streaming) return 'running' | ||
| return errored || steps.some((step) => step.state === 'error') ? 'error' : 'complete' | ||
| } |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
rg -n -C 4 'ToolStatus|StatusVisual|aborted' \
packages/ui-kit-chat/src \
packages/extensions/page/src \
packages/extensions/page/testRepository: conciv-dev/conciv
Length of output: 34991
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- local skill files ---'
fd -HI 'SKILL|skill' . --type f | head -80
printf '%s\n' '--- relevant source outlines ---'
ast-grep outline packages/extensions/page/src/client/cards/session-card.tsx
ast-grep outline packages/ui-kit-chat/src/tools/primitives/tool-status.ts
ast-grep outline packages/ui-kit-chat/src/tools/primitives/status-visual.tsx
ast-grep outline packages/ui-kit-chat/src/tools/primitives/tool-presentation.ts
ast-grep outline packages/ui-kit-chat/src/tools/styled/card-shell.tsxRepository: conciv-dev/conciv
Length of output: 11876
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- repository review skill ---'
cat .claude/skills/conciv-review/SKILL.md
printf '%s\n' '--- code review skill ---'
cat .github/skills/code-review/SKILL.md
printf '%s\n' '--- session card ---'
sed -n '150,320p' packages/extensions/page/src/client/cards/session-card.tsx
printf '%s\n' '--- shared status types and visuals ---'
cat packages/ui-kit-chat/src/tools/primitives/tool-status.ts
sed -n '1,90p' packages/ui-kit-chat/src/tools/primitives/status-visual.tsx
sed -n '1,70p' packages/ui-kit-chat/src/tools/primitives/tool-presentation.ts
printf '%s\n' '--- status consumers ---'
rg -n -C 5 'cardPhase|sessionStatus|StepGlyph|status=' \
packages/extensions/page/src/client/cards/session-card.tsx \
packages/ui-kit-chat/src/tools/styled/card-shell.tsxRepository: conciv-dev/conciv
Length of output: 40288
Preserve aborted session state.
A settled session with an aborted step is shown as complete, and StepGlyph shows the ordinal. Preserve error precedence, then add aborted handling for the aggregate status and step glyph. Extend ToolStatus, StatusVisual, and cardPhase if the shared status contract represents aborted.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/extensions/page/src/client/cards/session-card.tsx` around lines 173
- 176, Update sessionStatus and the related status contract to preserve aborted
sessions: retain streaming and error precedence, then return an aborted status
when any step has state "aborted" instead of marking the session complete.
Extend ToolStatus, StatusVisual, cardPhase, and StepGlyph handling as needed so
aborted sessions render their aborted visual without an ordinal.
27deb94 to
1879a0a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 30 out of 31 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (10)
packages/ui-kit-chat/src/styled/activity.tsx:283
- Reply segments are omitted from the live boundary. If reply text starts after a page session while the turn is still live, the session remains
lastRenderableIndexand continues rendering as “Editing the page” even though reply text closes the session. Include replies when finding the last renderable segment, matching the thread implementation.
const renderable = (segment: Segment): boolean => asPageSession(segment) !== null || visibleChain(segment) !== null
packages/extensions/page/src/client/cards/session-steps.ts:58
- Choosing the entire
afterdescriptor suppresses a validbefore.accessibleNamewhenever an after-capture exists but has no usable name. This breaks the required after-name → before-name → input fallback. Resolve capture fields independently, trying the non-empty after value and then the before value.
function stepDescriptor(capture: ToolCaptureView | undefined): ElementDescriptor | undefined {
return capture?.after?.descriptor ?? capture?.before?.descriptor
}
packages/extensions/page/test/session-card.solid.browser.test.tsx:44
- This UI test selects implementation-detail
<li>tags directly. The repository’s browser-test rules require native role/text locators; usinggetByRole('listitem')preserves the node-identity assertion without coupling it to markup.
const firstRow = document.querySelector('li')
packages/extensions/page/test/session-card.solid.browser.test.tsx:111
- This bypasses the browser locator assertion API by inspecting
document.body.textContent. Use a text locator so absence is asserted with the repository’s web-first browser-test behavior.
expect(document.body.textContent).not.toContain(location.host)
packages/extensions/page/test/session-card.solid.browser.test.tsx:125
- This presence check also reads the DOM synchronously instead of using a web-first locator, so it can race rendering and violates the browser-test convention. Assert the location text through
expect.element.
expect(document.body.textContent).toContain(location.host)
packages/ui-kit-chat/src/store/grouping.ts:52
- This
forEachmutates multiple accumulators (replyIndicesand both maps). The repository’s functional-style law requiresmap/reduce/flatMapinstead offorEachplus mutation; derive this scan with a reducer so state flow is explicit.
parts.forEach((part, index) => {
if (isReplyText(part)) replyIndices.push(index)
packages/ui-kit-chat/src/store/grouping.ts:159
- This
forEachperforms the whole grouping operation by mutating the sharedgroupingobject. That conflicts with the repository’s functional-style law againstforEachplus mutation; make segment placement a reducer that returns the next grouping state.
parts.forEach((part, index) => placeSegmentPart(grouping, part, index))
packages/extensions/page/src/client/cards/session-card.tsx:302
defaultOpenis only the initial uncontrolled state. Because this card intentionally stays mounted whilestreamingchanges, a card mounted open during streaming remains expanded after settling instead of transitioning to the required settled-collapsed state. Track controlled open state (asReasoningdoes) and plumbopen/onOpenChangethroughCardShellandToolCard.
defaultOpen={props.streaming}
packages/extensions/page/src/client/cards/session-card.tsx:305
- The browser-chrome header is rendered in every state, so a settled collapsed card still shows traffic dots, URL, and badge. The PR contract specifies the compact collapsed row as status · title · action count · chevron, with browser chrome for streaming/expanded states. Render a compact header while settled and closed, switching to
SessionHeaderwhen open or streaming.
header={
packages/extensions/page/test/session-card.solid.browser.test.tsx:96
- These status assertions synchronously inspect locator elements instead of using web-first browser assertions. Assert one error icon as visible and the complete icon as absent through
expect.element, so rendering is awaited rather than sampled.
This issue also appears in the following locations of the same file:
- line 111
- line 125
expect(page.getByRole('img', {name: 'error'}).elements().length).toBeGreaterThan(0)
expect(page.getByRole('img', {name: 'complete'}).elements()).toHaveLength(0)
| if (isReplyText(part)) replyIndices.push(index) | ||
| if (part.type !== 'tool-call') return | ||
| if (part.id && !parentIndexById.has(part.id)) parentIndexById.set(part.id, index) | ||
| if (!pageActNames.has(part.name)) return |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 31 out of 32 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
Suppressed comments (4)
packages/extensions/page/test/session-card.solid.browser.test.tsx:139
- This direct body-text assertion is synchronous and bypasses the required web-first locator behavior. Assert the host through the native browser locator so the check retries with useful diagnostics.
expect(document.body.textContent).toContain(location.host)
packages/extensions/page/src/client/cards/session-card.tsx:273
- The streaming branch already renders a labeled running dot beside “acting”, then this unconditional status visual renders the same running indicator again. This duplicates both the visual indicator and the screen-reader announcement; render the general status dot only in the settled fallback.
<Show when={props.streaming} fallback={<span class={HEAD_BADGE}>{mutatingBadge(SESSION_META)}</span>}>
<span class={HEAD_LIVE}>
<StatusVisual status="running" form="dot" />
<span class={HEAD_LIVE_TEXT}>acting</span>
</span>
</Show>
<StatusVisual status={props.status} form="dot" />
</span>
packages/extensions/page/src/client/cards/session-card.tsx:206
- Aborted and successfully completed rows both fall back to the ordinal; their only distinction is muted color. Screen-reader and non-color users therefore cannot identify the aborted action. Add semantic aborted text or an equivalent status icon.
<Switch fallback={<>{props.ordinal}</>}>
packages/extensions/page/test/session-card.solid.browser.test.tsx:125
- This direct
document.body.textContentassertion bypasses the browser locator's retry and diagnostics. Use the repository's web-first native locator assertion for the absent host text.
This issue also appears on line 139 of the same file.
expect(document.body.textContent).not.toContain(location.host)
Closes #426, closes #427, closes #428. Parent: #413.
What
A turn where the AI drives the live page now renders as ONE aggregated page-session card instead of a flat stack of per-action tool cards:
Edited the page(orRan script on the pagefor script-only runs) ·N actions· chevron.accessibleNames; collapsedReasoning · scriptsection holds the run's thinking (flatReasoningText) and executedtypescriptCode.execute_typescriptruns whose subcalls are page acts fold into the session (fold-by-parentage — mixed-tool runs stay whole); thinking folds into open sessions; reply text closes; approval-requested calls never fold.Visual source of truth:
docs/assets/page-session-card-spike/(#414), validated against regenerated exhibits; chrome styled per the codeimage reference (fixed-height band — the one fixed height — full-strength dots, container-query ladder with one element per crossing, zero layout shift).Structure
@conciv/ui-kit-chat: opt-inpage-sessionsegment kind ingroupSegments(no options = byte-identical), renderer contract (PageSessionConfig),pageSessionprop on styled Thread + Activity, shared segment→props helpers,ReasoningTextsplit out ofReasoning,SHIMMERexported.@conciv/extension-page:SessionCard+ purepageSessionSteps/pageSessionScripted, stories (Streaming/Settled/Expanded/Narrow/Aborted/WithError) behind an Ark-splitter resize decorator, solid-browser rail-identity tests.@conciv/ui-kit-system: sanctionedSplitterre-export (stories-only consumer).apps/conciv: chat-pane wiring; real-pane history-reload test.Verification
--force-rebuilt embed (turbo cache twice restored a stale bundle — hash pairs in the run log), full affected serial gate 105/105 (whiteboard CI-only per policy), fallow zero introduced.Follow-ups
code_mode:*progress feed now targets this card for page-driving runs.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes