Skip to content

FEAT: Add dataset example table and seed detail view - #3163

Merged
Roman Lutz (romanlutz) merged 7 commits into
microsoft:mainfrom
juliosuas:feat/2745-dataset-examples-table
Oct 14, 2026
Merged

Roman Lutz (romanlutz) merged 7 commits into
microsoft:mainfrom
juliosuas:feat/2745-dataset-examples-table

Conversation

@juliosuas

Copy link
Copy Markdown
Contributor

Closes #2745

Summary

Extends the selection page shipped in #3071 (/datasets/detail?selection_key=) with a read-only, paginated table of logical examples and an expandable detail view, consuming the browsing API from #2748 through typed datasetsApi methods.

  • One page via GET /api/datasets/seeds?selection_key=; members load only on expansion via GET /api/datasets/seeds/{example_id}?selection_key=. The catalog never prefetches seed pages.
  • Server-side search plus modality, seed_type, and harm_category facets. Catalog q, sort, and unlabeled are not forwarded.
  • Cursor pagination with limit (default 20), has_more, next_cursor; visited cursors kept for Previous.
  • Filters, page size, cursor, and open example live in the URL and survive refresh and Back/Forward. Back to datasets restores the originating catalog search, facets, and sort.
  • Paging and selection reset only when one known runtime generation replaces another, so a refresh during backend startup keeps the saved page and example.
  • A mismatched example id shows "This example is not in the dataset." with a way back.
  • Members are inspection data only: nothing executed, templated, imported, or played (media placeholders until FEAT GUI: Share image, audio, and video previews with datasets #2749).
  • Replaces the temporary "Individual examples are not yet listed" copy and updates frontend/README.md.

Out of scope

Media previews (#2749), chat import (#2751), scenario multi-select (#2759).

Tests and Documentation

  • Unit/component tests for SeedExampleBrowser, seedExampleQuery, DatasetSelection, DatasetCatalog.
  • Mocked Playwright datasets.spec.ts: paging, expansion, return path, missing key, mismatched id, 390px wrapping, 44px touch targets.
  • Real-backend datasets.seeded.spec.ts (@seeded): open a stored example, paginate with limit=1, keep second-page selection after refresh. test_config.yaml preloads the bundled jailbreak_templates, so startup needs no downloads or model calls.

Validation completed during this work: frontend and Python lint passed; frontend tsc and Python source typing passed; datasets.spec.ts passed 70/70 across 10 repeats with retries=0; frontend unit tests passed 2,898/2,898 across 115 suites; pytest reported 26,729 passed and 11 skipped. The branch merges cleanly with the fetched main.

Both real-backend dataset tests passed. On this Mac, the full @seeded suite reported 86 passed and two failures in existing converter tests caused by their Home/End keyboard shortcuts. A local macOS shortcut adjustment produced 88/88 with retries=0; that converter-test adjustment is excluded from this PR, so 88/88 is not claimed for 088119a9.

The broader Python typing command ty check pyrit tests/unit reports 120 diagnostics in unchanged unit-test files; ty check pyrit passes.

No notebooks changed.

An empty or not-ready runtime id is unknown, so refresh keeps the cursor and open example. A mismatched example id shows a not-found message with a way back, and the seeded browser test reads the local jailbreak templates from the real backend.

@romanlutz Roman Lutz (romanlutz) 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.

Reviewed commit 088119a against the PR diff and #2745 acceptance criteria. The read-only API integration is appropriately scoped, but three reproduced navigation/recovery issues need fixing: keyboard access when the selected example is off-page, runtime invalidation through DatasetSelection, and recovery from a rejected cursor. Details are inline.

Comment thread frontend/src/components/Datasets/SeedExampleBrowser.tsx Outdated
Comment thread frontend/src/components/Datasets/useSeedExampleBrowserState.ts
Comment thread frontend/src/components/Datasets/SeedExampleBrowser.tsx
@romanlutz

Copy link
Copy Markdown
Contributor

Screenshots of commit 088119a96ff45809e9493f4b9f169e64ce450958, captured against the real backend with the bundled jailbreak_templates dataset. No source changes or mocked dataset responses were used.

Desktop

Dataset summary, filters, example table, and pagination at 1440 x 1100, with three examples per page:

Desktop dataset example table

Expanded example detail, including stored metadata, declared parameters, raw template text, and copy controls:

Desktop stored example detail

Mobile

Captured at 390 x 844 with touch input enabled. The table and detail screenshots show the current narrow-screen layout as rendered, including its cramped columns and heavily wrapped identifiers.

Dataset summary and filters

Mobile dataset summary and filters

Example table and pagination, with one example per page

Mobile example table and pagination

Expanded example detail

Mobile expanded example detail

Give the first visible Show example button a tab stop when the open example is not on the page, so arrow keys stay reachable. Remember the runtime generation on the selection page while the catalog reloads, without dropping a direct-link page at startup. Restart from the first page only after a rejected cursor is dismissed, and keep the current filters.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b12ca8cc-2040-41d9-a48c-a8c25ea41aa1
Preserve readable table columns within horizontal scrolling and stack detail fields on narrow viewports. Cover the layouts in browser regressions and allow real-backend assertions to wait for runtime initialization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: b12ca8cc-2040-41d9-a48c-a8c25ea41aa1
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Oct 14, 2026
Merged via the queue into microsoft:main with commit 921b5fd Oct 14, 2026
51 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 prompt table and seed detail view

2 participants