Skip to content

feat: pin latest ACP plan above transcript - #926

Merged
matt2e merged 4 commits into
mainfrom
plan
Aug 24, 2026
Merged

feat: pin latest ACP plan above transcript#926
matt2e merged 4 commits into
mainfrom
plan

Conversation

@matt2e

@matt2e matt2e commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add a collapsible Plan card pinned above the session transcript for the latest ACP plan snapshot.
  • Filter plan metadata rows out of the transcript and normalize plan entries for display.
  • Cover latest-plan extraction and transcript filtering with tests.

matt2e added 2 commits August 24, 2026 13:50
Stop rendering plan_update rows inside the scrollable chat transcript and
instead pin the latest plan as a collapsible card above the message area in
SessionChatPane, covering both the session modal and the note chat sidebar.

- acpTranscript.ts: remove plan_update from VISIBLE_STANDALONE_EVENT_KINDS
  (leaving session_info_update) and add a latestPlan helper modeled on
  latestAvailableCommands that returns the newest plan snapshot's entries,
  normalizes unknown statuses to pending (accepting failed defensively),
  and returns null when no plan or no entries exist.
- PlanCard.svelte: new focused component with a clickable header (caret,
  overall status icon mirroring tool-call semantics, "Plan" title, muted
  completed/total progress) and per-entry status icons in the body
  (spinner for in_progress, CircleCheck for completed, CircleAlert for
  failed, reserved icon slot for pending). Expansion is initialized from
  defaultExpanded once so streaming plan updates never override the
  user's toggle.
- SessionChatPane.svelte: derive the latest plan from acpMetadataMessages
  and mount PlanCard above the scrollable .modal-content, defaulting to
  expanded except on mobile viewports or compact embeds. Remove the
  now-dead plan branches: acpEventSummary's plan case, the planEntries
  helper, the plan_update template markup, and the plan CSS.
- acpTranscript.test.ts: flip the plan-row surfacing test to assert plan
  rows are filtered out, and add latestPlan coverage for newest-plan-wins,
  no plan rows, empty entries, and unknown-status normalization.

Verified with vitest (682 passing) and svelte-check/tsc (0 errors,
0 warnings).

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Address code review feedback on cacdec3 (pin the latest ACP plan above
the chat transcript):

- SessionChatPane.svelte: key the PlanCard on session?.id so the
  expanded/collapsed toggle resets when the pane is reused for a
  different session, letting defaultExpanded apply per session instead
  of a collapse in one session leaking into the next.
- acpTranscript.ts: drop the redundant Array.isArray(rawEntries)
  re-check in latestPlan since arrayProp already returns
  unknown[] | null; use a plain null check to match
  latestAvailableCommands.
- acpTranscript.ts / acpTranscript.test.ts: remove the unused priority
  field from PlanEntry, its parsing, and the test assertions, since
  PlanCard never renders it. One raw input in the tests keeps a
  priority prop to cover that unparsed props are dropped.

Verified with vitest (682 passing) and svelte-check (0 errors).

Signed-off-by: Matt Toohey <contact@matttoohey.com>

@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: f1fee405d7

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +85 to +86
.plan-card {
flex-shrink: 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Bound the expanded plan's height

When an ACP plan contains many entries or long wrapped descriptions, this non-shrinking card has no maximum height or internal scrolling, while .session-chat-pane is an overflow-hidden flex column. The expanded plan can therefore consume the pane's entire height and leave the transcript and composer clipped in a zero-height scroll area; cap the card/body height and make the entries independently scrollable.

Useful? React with 👍 / 👎.

matt2e added 2 commits August 24, 2026 15:39
Signed-off-by: Matt Toohey <contact@matttoohey.com>
Keep pending and running status slots stable, bound expanded plans so they cannot consume the session pane, and wrap unusually long step text.

Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e merged commit 065b6a6 into main Aug 24, 2026
2 checks passed
@matt2e
matt2e deleted the plan branch August 24, 2026 07:15
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.

1 participant