feat(ab-corpus): dashboard-applied-filter-tag ab-v1 prompt for add_tag_v0

This commit is contained in:
Fini 2026-04-27 08:58:00 +08:00
parent 072856e522
commit a2bf13bfce
3 changed files with 31 additions and 11 deletions

View file

@ -21,9 +21,9 @@ Batches:
- 2026-04-25 — 9 prompts (social_login_row / pricing_card / stat_card /
range_slider / phone_input / input_with_action / cookie_banner /
toast_v1 / empty_chart_v1)
- 2026-04-27 — 3 prompts (sidebar_nav_v0 — desktop persistent left rail;
- 2026-04-27 — 4 prompts (sidebar_nav_v0 — desktop persistent left rail;
avatar_group_v0 — stacked presence tile group; data_table_row_v0 —
desktop dashboard tabular row)
desktop dashboard tabular row; tag_v0 — single closable filter chip)
ab-v0 stays frozen (the A/B v1 results in
`openpencil-docs/superpowers/notes/2026-04-20-ab-v1-results.md` are

View file

@ -0,0 +1,19 @@
id: dashboard-applied-filter-tag
category: dashboard
difficulty: obvious
prompt: |
Design ONLY a single applied-filter tag chip that lives in a list-of-
applied-filters bar above a dashboard data table. The chip is a
fit_content blue-100 background pill with 12px corner radius and 6px
gap between its two children:
1. blue-600 13/500 label "Status: Active"
2. trailing 14×14 lucide "x" icon (close affordance, blue-600)
Padding 4px vertical, 10px horizontal. Do NOT render the surrounding
filter bar, other applied-filter chips, the table itself, or the
page chrome — just this one closable tag chip.
expected:
must_contain_roles:
- tag
- tag-label
- tag-remove
expected_tool_if_any: add_tag_v0

View file

@ -65,21 +65,21 @@ describe('loadCorpus — real corpus', () => {
describe('loadCorpus — v1 supplemental corpus (new tools)', () => {
// v1 covers tools added after the v0 freeze, in chronological batches:
// 2026-04-22 (12 tools) / 2026-04-24 (5 tools, 4 v0 + first v1) /
// 2026-04-25 (9 tools, 7 v0 + 2 v1) / 2026-04-27 (3 tools, sidebar nav
// + avatar group + data-table row). All obvious — one prompt per tool
// so A/B runs can measure routing + legality on the new surface
// without re-running the v0 corpus. See `corpus/ab-v1/README.md`.
it('loads 29 prompts, all obvious, one per new tool', () => {
// 2026-04-25 (9 tools, 7 v0 + 2 v1) / 2026-04-27 (4 tools: sidebar nav
// + avatar group + data-table row + tag). All obvious — one prompt
// per tool so A/B runs can measure routing + legality on the new
// surface without re-running the v0 corpus. See `corpus/ab-v1/README.md`.
it('loads 30 prompts, all obvious, one per new tool', () => {
const prompts = loadCorpus(REPO_CORPUS_V1_DIR);
expect(prompts).toHaveLength(29);
expect(new Set(prompts.map((p) => p.id)).size).toBe(29);
expect(prompts).toHaveLength(30);
expect(new Set(prompts.map((p) => p.id)).size).toBe(30);
for (const p of prompts) {
expect(p.difficulty).toBe('obvious');
expect(p.expected_tool_if_any).toMatch(/^add_[a-z_]+_v\d+$/);
}
});
it('covers 2026-04-22 (12) + 2026-04-24 (5) + 2026-04-25 (9) + 2026-04-27 (3) batches', () => {
it('covers 2026-04-22 (12) + 2026-04-24 (5) + 2026-04-25 (9) + 2026-04-27 (4) batches', () => {
const prompts = loadCorpus(REPO_CORPUS_V1_DIR);
const tools = new Set(prompts.map((p) => p.expected_tool_if_any));
expect(tools).toEqual(
@ -113,10 +113,11 @@ describe('loadCorpus — v1 supplemental corpus (new tools)', () => {
'add_cookie_banner_v0',
'add_toast_v1',
'add_empty_chart_v1',
// 2026-04-27 batch (3 tools) — desktop sidebar nav rail + avatar group + data-table row
// 2026-04-27 batch (4 tools) — desktop sidebar nav + avatar group + data-table row + tag
'add_sidebar_nav_v0',
'add_avatar_group_v0',
'add_data_table_row_v0',
'add_tag_v0',
]),
);
});