Skip to content

Persist pending plan-mode answers across thread re-entry#921

Open
Jmqcooper1 wants to merge 2 commits intopingdotgg:mainfrom
Jmqcooper1:fix/918-plan-mode-pending-input-persistence
Open

Persist pending plan-mode answers across thread re-entry#921
Jmqcooper1 wants to merge 2 commits intopingdotgg:mainfrom
Jmqcooper1:fix/918-plan-mode-pending-input-persistence

Conversation

@Jmqcooper1
Copy link

@Jmqcooper1 Jmqcooper1 commented Mar 11, 2026

Summary

  • persist in-progress plan-mode user-input answers and question index in the web composer draft store
  • restore pending plan-mode question progress when re-entering a thread and prune stale request drafts when the request is resolved
  • add unit coverage for pending user-input draft state and a browser regression for leaving and re-entering the thread mid-questionnaire

Testing

  • bun run test -- src/composerDraftStore.test.ts src/pendingUserInput.test.ts
  • bun run test:browser -- src/components/ChatView.browser.tsx
  • bun fmt
  • bun lint
  • bun typecheck

Fixes #918

Note

Persist pending plan-mode answers across thread re-entry in composer draft store

  • Replaces local React state for pending user-input answers and question indices in ChatView with per-thread state backed by composerDraftStore, so answers survive component unmounts and thread navigation.
  • Adds setPendingUserInputAnswer, setPendingUserInputQuestionIndex, syncPendingUserInputRequests, and clearPendingUserInputRequest actions to the store, with persistence and hydration support.
  • An effect in ChatView syncs open request IDs from thread activities into the store when the active thread changes, pruning stale entries.
  • Thread drafts containing only pending user-input data are now retained rather than pruned by shouldRemoveDraft.
  • Behavioral Change: pending user-input answers are now serialized to the persisted draft store and reloaded on hydration.

Macroscope summarized 7dbbd9f.

@coderabbitai
Copy link

coderabbitai bot commented Mar 11, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: df5ab685-f972-4ca8-9d1c-a17730b912c3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Mar 11, 2026
Co-authored-by: Noah Gregory <noahmgregory@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan mode loses answered clarifying questions when re-entering thread

2 participants