Skip to content

feat(datasets): managing them — the manage screen, the create wizard, and a home that knows where you were (PR7) - #427

Merged
athvin merged 2 commits into
mainfrom
bm/datasets-p7-management
Nov 3, 2026
Merged

athvin merged 2 commits into
mainfrom
bm/datasets-p7-management

Conversation

@athvin

@athvin athvin commented Nov 3, 2026

Copy link
Copy Markdown
Owner

PR7 of the datasets program, on top of PR6's switchover (#415). Tenant-facing dataset administration: nothing here needs an operator.

PR6 made the dataset the address; this makes it something a tenant can
administer without an operator. Four surfaces:

The manage screen (/{org}/datasets) — org-level, because it is the one
tenant screen ABOUT datasets rather than inside one. Every dataset with what
it resolves, whether it is running, its published config version and when it
was created; the row opens that dataset's dashboard. Admins get suspend and
resume inline. State is told without hue, as the design doc requires:
provisioning pulses because it is going to change on its own, suspended
is struck through because it was stopped deliberately, purging is dimmed,
and active carries no mark at all — the default needs none.

Purge is visible, disabled and explained, exactly as it is at the org
level. Dropping a dataset's lake is a destructive path the product
deliberately does not have yet, and a button that silently isn't there reads
as an oversight rather than a decision. The functional spec asserts the
disabled state and the explanation, so neither can quietly disappear.

The create wizard (/{org}/datasets/new) — name, optional label, and
what it resolves. Both permanent decisions are stated as such rather than
defaulted past: the name becomes a path segment every bookmark will carry,
and the entity type is what publish and model activation enforce agreement
with afterwards. Creation answers 202 and the wizard watches the row until
the provisioning job flips it active, then hands off to the sources wizard —
the one next step that actually makes the dataset do something.

The org home (/{org}) stops hard-redirecting to default. It now tries,
in order: the dataset you were last in, the only one you have, the manage
page to choose from, and the create flow when there is nothing to choose.
The memory is a per-org cookie written from the browser — a preference, not a
credential: it names a dataset you had to be a member of the org to open, and
every route it leads to re-checks that. Crucially the remembered name is
checked against the live list rather than followed on trust, because a
suspended-or-removed dataset would otherwise land you on the guard's
not-found; destinationFor is a pure function so those five branches are
unit-tested rather than driven through a browser.

The switcher is now always a menu, even at one dataset. It was a dead
label there, which left an org with a single dataset no route to the create
flow at all — and that is precisely the org that needs one. Its footer
carries "Manage datasets" and "New dataset", and the command palette gains
the same two plus an entry per sibling dataset.

Supporting changes: BFF routes for create (admin, slug- and reserved-name
checked so the message names the rule), rename, suspend and resume — 96
handlers now authorize; the mock grows per-org dataset state with a
datasets-dev fixture carrying two datasets, so the switcher, the manage
table and the home dispatcher have a real choice to make, and a created
dataset is born provisioning and flips on a later poll the way the real one
does. Two new a11y screens are registered, and the manage screen and wizard
get visual baselines — pinned on acme-dev rather than the multi-dataset org,
whose table the suspend/resume journey mutates. The wizard's entity-type
radios carry accent-foreground: a bare radio renders in the browser's own
blue, which the palette lint cannot see and only a baseline catches.

Verification

  • make check green on the rebased commit; make skills-check green (the generated screens reference picks up the two new routes)
  • Frontend: eslint 0, prettier clean, tsc 0, authz gate 96/96 handlers, vitest 732 passed (10 new covering the five dispatch branches and the cookie)
  • Contract gates green: mock ⊆ router, MCP manifest, response envelopes
  • tests/functional/datasets.spec.ts — 13 passed on desktop-chromium
  • Visual baselines regenerated in the pinned Linux container: 48 passed, six new files for the two new screens

Note on the two new @visual tests: ignoreSnapshots is on for non-Linux, so
they are no-ops on a developer's Mac and only assert in the container and on
CI. The wizard baseline is the one that can catch an unaccented radio, which
is invisible to the palette lint.

🤖 Generated with Claude Code

@athvin

athvin commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

Rust tier failures here are not from this PR — the diff is frontend-only (54 files under frontend/, one skill reference, zero Rust). Every failing Rust job dies identically in libduckdb-sys:

unpacking bundled DuckDB sources: Os { code: 39, kind: DirectoryNotEmpty }

That is the poisoned restore #425 is fixing. The v2 prefix bump did not cure it (this branch carries v2 and still fails), which matches #425's finding that the restore strips the .complete sentinel and the publish fs::rename then hits ENOTEMPTY. Blocked on #425; I'll re-run the Rust jobs once it lands rather than retrying into the same cache.

The one failure that was mine is fixed in 7a4725d: CI's webhooks journey could not tick an events checkbox on a Pixel 7 viewport, and the actionability log named it — <nav data-testid="bottom-tabs"> subtree intercepts pointer events right after "done scrolling". The shell's pb-24 keeps content clear of the fixed bars at rest but not where a scroll lands, so scrollIntoView, keyboard focus and #fragment navigation all park the target under a bar. Fixed with root scroll-padding rather than by touching that spec — a real thumb would have hit the same bar.

@athvin
athvin force-pushed the bm/datasets-p7-management branch 2 times, most recently from 3b8f029 to 5eb0c60 Compare November 3, 2026 04:37
bmoore813 and others added 2 commits November 2, 2026 23:52
… and a home that knows where you were (PR7)

PR6 made the dataset the address; this makes it something a tenant can
administer without an operator. Four surfaces:

**The manage screen** (`/{org}/datasets`) — org-level, because it is the one
tenant screen ABOUT datasets rather than inside one. Every dataset with what
it resolves, whether it is running, its published config version and when it
was created; the row opens that dataset's dashboard. Admins get suspend and
resume inline. State is told without hue, as the design doc requires:
`provisioning` pulses because it is going to change on its own, `suspended`
is struck through because it was stopped deliberately, `purging` is dimmed,
and `active` carries no mark at all — the default needs none.

**Purge is visible, disabled and explained**, exactly as it is at the org
level. Dropping a dataset's lake is a destructive path the product
deliberately does not have yet, and a button that silently isn't there reads
as an oversight rather than a decision. The functional spec asserts the
disabled state and the explanation, so neither can quietly disappear.

**The create wizard** (`/{org}/datasets/new`) — name, optional label, and
what it resolves. Both permanent decisions are stated as such rather than
defaulted past: the name becomes a path segment every bookmark will carry,
and the entity type is what publish and model activation enforce agreement
with afterwards. Creation answers 202 and the wizard watches the row until
the provisioning job flips it active, then hands off to the sources wizard —
the one next step that actually makes the dataset do something.

**The org home** (`/{org}`) stops hard-redirecting to `default`. It now tries,
in order: the dataset you were last in, the only one you have, the manage
page to choose from, and the create flow when there is nothing to choose.
The memory is a per-org cookie written from the browser — a preference, not a
credential: it names a dataset you had to be a member of the org to open, and
every route it leads to re-checks that. Crucially the remembered name is
checked against the live list rather than followed on trust, because a
suspended-or-removed dataset would otherwise land you on the guard's
not-found; `destinationFor` is a pure function so those five branches are
unit-tested rather than driven through a browser.

**The switcher is now always a menu**, even at one dataset. It was a dead
label there, which left an org with a single dataset no route to the create
flow at all — and that is precisely the org that needs one. Its footer
carries "Manage datasets" and "New dataset", and the command palette gains
the same two plus an entry per sibling dataset.

Supporting changes: BFF routes for create (admin, slug- and reserved-name
checked so the message names the rule), rename, suspend and resume — 96
handlers now authorize; the mock grows per-org dataset state with a
`datasets-dev` fixture carrying two datasets, so the switcher, the manage
table and the home dispatcher have a real choice to make, and a created
dataset is born `provisioning` and flips on a later poll the way the real one
does. Two new a11y screens are registered, and the manage screen and wizard
get visual baselines — pinned on acme-dev rather than the multi-dataset org,
whose table the suspend/resume journey mutates. The wizard's entity-type
radios carry `accent-foreground`: a bare radio renders in the browser's own
blue, which the palette lint cannot see and only a baseline catches.

Co-Authored-By: Claude Fable 5 <[email protected]>
The shell pins a header to the top on every viewport and a tab bar to the
bottom below `lg`. `main`'s padding keeps content clear of both AT REST, but
says nothing about where a scroll LANDS: `scrollIntoView`, focusing a control
with the keyboard, and following a `#fragment` each scroll the minimum
distance, which parks the target flush against the viewport edge — underneath
a bar. The person then has to scroll again to reach what the browser just
took them to, and a keyboard user may never see the focused control.

`scroll-padding` on the root is the mechanism designed for exactly this, and
it covers every scroll the browser performs rather than the one call site
that happened to surface it.

Found from the outside: CI's webhooks journey could not tick an events
checkbox on a Pixel 7 viewport, and the actionability log named the culprit —
`<nav data-testid="bottom-tabs"> subtree intercepts pointer events` after
"done scrolling". A real thumb would have hit the same bar.

Co-Authored-By: Claude Fable 5 <[email protected]>
@athvin
athvin force-pushed the bm/datasets-p7-management branch from 5eb0c60 to 30ac00f Compare November 3, 2026 04:57
@athvin
athvin merged commit 755710f into main Nov 3, 2026
37 checks passed
@athvin
athvin deleted the bm/datasets-p7-management branch November 3, 2026 05:23
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.

2 participants