Skip to content

feat(sessions): keep full plan accessible after approval#2133

Draft
posthog[bot] wants to merge 2 commits into
mainfrom
posthog-code/keep-plan-visible-after-approval
Draft

feat(sessions): keep full plan accessible after approval#2133
posthog[bot] wants to merge 2 commits into
mainfrom
posthog-code/keep-plan-visible-after-approval

Conversation

@posthog
Copy link
Copy Markdown
Contributor

@posthog posthog Bot commented May 13, 2026

Summary

Once a plan was approved (or rejected), the full plan markdown was unmounted and only the "Plan approved — proceeding with implementation" line remained. This made it impossible to revisit the plan after the fact — a gap Cory flagged when teeing up parallel agents or a master agent to plan what's next.

The plan text itself is already carried on the tool call's rawInput.plan; the renderer was just hiding it. This PR adds a show plan / hide plan toggle next to the status line so the full plan stays one click away (collapsed by default to avoid dominating the turn view).

Changes

  • PlanApprovalView.tsx — after approval/rejection, render the status line with a caret + · show plan affordance. Click expands the existing <PlanContent> (full markdown, scrollable, fullscreen button) inline. Pre-approval behavior is unchanged.
  • SessionView.tsx — drive-by fix: the offline-prompt PR (fix(sessions): preserve prompt when sending while offline #1971) added a duplicate useConnectivity() call that broke typecheck on main. Removed the redundant declaration. Filed as its own commit on this branch.

Behavior

State Before After
Plan pending Full plan visible Full plan visible (unchanged)
Plan approved "Plan approved" line only "Plan approved · show plan" — click to expand
Plan rejected "(Plan rejected)" only "(Plan rejected) · show plan" — click to expand

Test plan

  • Approve a plan from a running session — verify the "show plan" toggle reveals the full plan markdown.
  • Reject a plan — verify the same toggle works.
  • Open the `PlanApproved` / `PlanCancelled` Storybook stories (`ToolCallBlock.stories.tsx`) — verify the toggle renders.
  • Confirm pre-approval rendering is unchanged.

Created with PostHog Code

PostHog Code added 2 commits May 13, 2026 20:56
The offline-prompt fix (#1971) added a second `useConnectivity()` call
that re-declared `isOnline`, breaking typecheck. Drop the redundant
declaration; the one at the top of the component is sufficient.

Generated-By: PostHog Code
Task-Id: fa647642-8b10-4bf8-a05d-896f5e355489
Once a plan was approved or rejected, the full plan markdown was
unmounted and only the "Plan approved" line remained — making it
impossible to revisit the plan when handing work off to a parallel or
master agent. The plan text is still carried on `toolCall.rawInput.plan`;
add a `show plan` / `hide plan` toggle next to the status line so the
full plan stays accessible (collapsed by default to avoid dominating
the turn view).

Generated-By: PostHog Code
Task-Id: fa647642-8b10-4bf8-a05d-896f5e355489
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.

0 participants