Skip to content

FEAT Add seed-prompt inspiration entry and contextual Chat return - #3987

Merged
Roman Lutz (romanlutz) merged 27 commits into
microsoft:mainfrom
Rohitpro1:feat/2752-seed-prompt-entry-points
Nov 16, 2026
Merged

Roman Lutz (romanlutz) merged 27 commits into
microsoft:mainfrom
Rohitpro1:feat/2752-seed-prompt-entry-points

Conversation

@Rohitpro1

Copy link
Copy Markdown
Contributor

Description

Fixes #2752.

Add an empty-Chat inspiration callout and a persistent seed-prompt action beside the composer. Capture the originating Chat route explicitly and preserve it through catalog filters, example selection, paging, runtime cursor bookkeeping, and return navigation. Direct explorer entry does not select an unrelated saved destination.

Reuse the existing draft handoff for text, conversation-editor turns, linked media, and setup. Dataset browsing preserves normal editor drafts; other workspace navigation retains discard confirmation. Browsing and return stay read-only. Importing into a new conversation uses the existing explicit conversation-creation request.

Tests and Documentation

  • Focused component/routing checks: 152 passing tests across App, composer inspiration, dataset catalog/selection, and seed-query suites.
  • Additional editor/destination regression selection: 4 passed (other tests intentionally excluded by the name filter). The full editor suites were not completed locally; this remains a draft pending broader CI validation.
  • Real-backend dataset Playwright suite: 10 passed. Covers keyboard and narrow/desktop draft round trips, all three conversation-import destinations with linked local image media, unchanged source history, and no accidental sending.
  • Browser tests used Chromium 153 with a temporary local launch override because the stock Playwright archive downloaded truncated. The override and browser package are excluded from this PR.
  • TypeScript checks, production build, changed-file ESLint, Python fixture Ruff, and whitespace checks passed.
  • Updated doc/gui/0_gui.md.

The seeded fixture uses existing local assets and the offline browser target; no privileged datasets or paid provider calls are required.

Developed with AI assistance under Rohitpro1's direction.

Copilot AI balanced review requested due to automatic review settings November 5, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Returning from Datasets resets the conversation editor’s dirty baseline, allowing unsaved message edits to be discarded without saving or confirmation.

4 open issues
What changed in this PR

Adds seed-prompt discovery entry points to Chat and contextual return navigation through the existing Datasets browser and draft handoff, addressing #2752.

Changes:

  • Adds an empty-chat inspiration callout and a persistent composer browse action.
  • Carries Chat origin through dataset navigation and allows editor drafts to round-trip through browsing.
  • Expands component and real-backend browser coverage, adds local media fixtures, and updates the GUI guide.
File Description
tests/​end_to_end/​browser_initializer.py Seeds a local conversation with linked images.
frontend/​src/​utils/​routeParams.ts Defines and parses Chat-origin navigation state.
frontend/​src/​components/​Datasets/​seedExampleQuery.ts Preserves Chat origin during cursor updates.
frontend/​src/​components/​Datasets/​seedExampleQuery.test.ts Checks origin preservation in query state.
frontend/​src/​components/​Datasets/​SeedExampleBrowser.tsx Distinguishes absent destinations from explicit null destinations.
frontend/​src/​components/​Datasets/​SeedExampleBrowser.test.tsx Tests isolation from unrelated saved destinations.
frontend/​src/​components/​Datasets/​DatasetSelection.tsx Adds contextual return links and origin-based import destinations.
frontend/​src/​components/​Datasets/​DatasetSelection.test.tsx Covers contextual return and direct entry.
frontend/​src/​components/​Datasets/​DatasetCatalog.tsx Adds return navigation and retains state during filtering.
frontend/​src/​components/​Datasets/​DatasetCatalog.test.tsx Covers origin propagation through catalog navigation.
frontend/​src/​components/​Datasets/​DatasetCard.tsx Forwards navigation state to dataset details.
frontend/​src/​components/​Chat/​PromptEditor.styles.ts Styles the inspiration callout.
frontend/​src/​components/​Chat/​ConversationEditor.tsx Allows dataset browsing without discard confirmation.
frontend/​src/​components/​Chat/​ChatWindow.tsx Connects Chat to seed browsing.
frontend/​src/​components/​Chat/​ChatInputArea.tsx Adds callout and composer browse controls.
frontend/​src/​components/​Chat/​ChatInputArea.seed-inspiration.test.tsx Tests browse controls and keyboard activation without sending.
frontend/​src/​App.tsx Captures Chat origin and clears unrelated return context.
frontend/​src/​App.test.tsx Checks captured Chat-origin state.
frontend/​src/​App.drafts.test.tsx Covers editor round trips and other-workspace discard confirmation.
frontend/​e2e/​datasets.seeded.spec.ts Adds keyboard, viewport, media, and import-destination journeys.
doc/​gui/​0_gui.md Documents seed browsing and contextual return.

Review effort: Balanced

Roman Lutz and others added 7 commits November 12, 2026 23:19
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Retain dirty baselines and editor converter snapshots, isolate dataset cursor history, keep read-only browsing available when sending is gated, and scope the navigation exemption to Chat. Cover restoration and Scanner discard protection with regression tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep converter initialization in the same draft transition instead of synchronizing a separate React state from the handoff effect.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Supply the shared router Request shim for the Scanner history regression and wait for the restored editor instead of querying its hidden composer.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz
Roman Lutz (romanlutz) marked this pull request as ready for review November 13, 2026 22:06
@romanlutz Roman Lutz (romanlutz) changed the title [DRAFT] FEAT Add seed-prompt inspiration entry and contextual Chat return FEAT Add seed-prompt inspiration entry and contextual Chat return Nov 13, 2026
@romanlutz

Copy link
Copy Markdown
Contributor

GUI demos: browsing seed prompts while sending is disabled, and preserving conversation edits plus converter work across a dataset round trip.

pr3987-disabled-chat-browsing.webm
pr3987-editor-draft-converters.webm

Roman Lutz and others added 3 commits November 14, 2026 21:22
Preserve editor converter snapshots alongside accepted-send draft tracking.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wait for the notice and finding to share a settled viewport layout instead of comparing bounding boxes sampled across a resize.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Nov 16, 2026
Merged via the queue into microsoft:main with commit 9f9c425 Nov 16, 2026
63 checks passed
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.

FEAT GUI: Add seed-prompt inspiration entry points

3 participants