Skip to content

fix(tasks): expand latest plan after cloud resume#3771

Draft
puemos wants to merge 2 commits into
mainfrom
posthog-code/expand-latest-replayed-plan
Draft

fix(tasks): expand latest plan after cloud resume#3771
puemos wants to merge 2 commits into
mainfrom
posthog-code/expand-latest-replayed-plan

Conversation

@puemos

@puemos puemos commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Problem

When a cloud task reconnects with a plan as its latest useful output, history replay marks the plan as historical and the UI folds it. This makes a resumed plan-mode task look like it lost its final state.

Why: Resuming an interrupted task should preserve the visibility of the result the user was last working from.

Changes

  • Mark a historical plan for initial expansion only when it is the final replayed item.
  • Initialize that plan open while keeping older historical plans folded.

How did you test this?

  • pnpm exec vitest run src/adapters/codex-app-server/codex-app-server-agent.test.ts
  • pnpm exec vitest run src/features/sessions/components/session-update/PlanApprovalView.test.tsx
  • pnpm --filter @posthog/agent typecheck
  • pnpm --filter @posthog/ui typecheck
  • node scripts/check-host-boundaries.mjs

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Created with PostHog Code

Generated-By: PostHog Code
Task-Id: 25730fa1-b212-4cb9-a1c2-31322da96702
@trunk-io

trunk-io Bot commented Jul 23, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit d8f3ee7.

Generated-By: PostHog Code
Task-Id: 25730fa1-b212-4cb9-a1c2-31322da96702
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