Skip to content

FIX: Preserve current converters when restoring sent prompts - #3598

Open
Richard Lundeen (richlundeen) wants to merge 2 commits into
microsoft:mainfrom
richlundeen:richlundeen-first-prompt-branch-converters
Open

Richard Lundeen (richlundeen) wants to merge 2 commits into
microsoft:mainfrom
richlundeen:richlundeen-first-prompt-branch-converters

Conversation

@richlundeen

@richlundeen Richard Lundeen (richlundeen) commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-up to #3503. First-prompt branching and Undo last send now keep the current converters and temporary settings when the pipeline changes. Both restore the original unsent prompt, attachments, and metadata in a new conversation and discard stale conversion state. Unchanged pipelines retain exact restoration, including manual stage edits.

Preserves draft/race guards, history-replay restrictions, and saved conversations. Neither action sends a prompt or runs a converter. Removes the persistent converter-restoration warning and its related tests.

Tests and Documentation

Updated the frontend README. Regression tests cover changed and temporary pipelines, exact restoration, media/metadata, stale results, and asynchronous draft/runtime/navigation changes. Correctness review found no remaining issues.

Passed from frontend:

  • npm test -- --runInBand src\components\Chat\ChatWindow.test.tsx --testNamePattern="first.prompt|pipeline|last prompt|undo|Undo|recover|restor" --silent — 86 passed; 178 outside the selection skipped.
  • npm run type-check
  • npx --no-install eslint src\components\Chat\ChatWindow.tsx src\components\Chat\ChatWindow.test.tsx e2e\chat-recovery.spec.ts --max-warnings 0
  • npm run build

Passed from the repository root: uv run --no-sync pre-commit run --all-files (UV_NO_SYNC=1; all 18 hooks) and git diff --check.

Test-type limitation: the default test config excludes test files. A separate scoped compiler check with exclusions cleared found 165 existing errors on both main and this branch, with no new errors. Browser tests and real model calls were not run.

JupyText not run: no notebook or Python API example changed.

Restore original draft values when the pipeline changes, without reusing stale conversion results. Remove the persistent converter-restoration warning and its tests.

Co-authored-by: Copilot App <[email protected]>
Share safe prompt restoration with branching and keep exact snapshots only when pipelines match. Guard pending Undo requests against converter, draft, runtime and navigation changes.

Co-authored-by: Copilot App <[email protected]>
@richlundeen Richard Lundeen (richlundeen) changed the title FIX: Preserve current converters when branching first prompts FIX: Preserve current converters when restoring sent prompts Oct 28, 2026

This branch has not been deployed

No deployments
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