Skip to content

feat(plan): will-run / won't-run summary and a clearer Renames section - #1602

Merged
kvlonge merged 4 commits into
mainfrom
feat/plan-summary
Nov 19, 2026
Merged

kvlonge merged 4 commits into
mainfrom
feat/plan-summary

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Why

On a large project the plan page opened on long lists without saying what the command would actually do. Renamed models were mixed in with the other migrations, so a rename read as several unrelated steps.

Changes

  • The plan index groups sections under Will run and Won't run, each with its node count. Every plan section is capped at 1,100 px, and the toolbar and Checks tab end with it.
  • Renames and migrations lists renamed models as old → new, with what stays at the old name, apart from the migration steps by kind. Its filter finds a renamed model by its old name.
  • Plan JSON: a renamed model's row carries origin_model and old_name, and every migration row has is_rename. The server's plan summary has migration_steps, the steps other than renames' own migrations.
  • The UI requires sections and migration_steps on a server plan summary and refuses one without them, so the server and the UI must run the same version. There is no fallback for older servers.
  • A failed row read is kept to its group, and to paging or filtering in Renames; planning again clears them.
  • The static demo's plan previews are recorded again through the summary and rows reads (ui/scripts/record-demo-plans.mjs).

Verification

  • New browser test ui/e2e/plan-server.spec.ts runs the plan page through the real server client against a faked control server and covers migration_steps, origin_model, old_name, is_rename and the server filter. It fails when the client drops the step count.
  • svelte-check, vitest, plan browser tests and the plan budget test.
  • cargo test -p sqlbuild-core plan_display, clippy, the CLI plan JSON and migration integration tests.
  • By hand: sqb dev on a DuckDB project with a renamed model, and the static demo's plan pages.
  • make check-ci.

…rations apart, and renames marked in the plan JSON (CHI-1563)
…r client, and keep read failures to their group

- The server client copied a plan summary's fields one by one and dropped
  migration_steps, so the Renames and migrations section lost its data
  moves and its step count on a real server. It is now required on every
  summary and copied; a summary without it is refused.
- A browser test runs the plan page through the real server client
  against a faked control server (e2e/support/fake-plans.ts), covering
  migration_steps, origin_model, old_name and is_rename; it fails when the
  client drops the step count again.
- A failed read is kept to its group, warnings included, and to paging or
  filtering in Renames and migrations; a re-plan clears them all.
- The static demo's plan previews predated plan summaries and paged
  sections; they are recorded again from DuckShop on sqb dev through the
  summary, rows and diff reads (scripts/record-demo-plans.mjs).
…n output constants, and branch-free test helpers
@kvlonge
kvlonge enabled auto-merge November 19, 2026 18:43
@kvlonge
kvlonge added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit d715c7e Nov 19, 2026
35 checks passed
@kvlonge
kvlonge deleted the feat/plan-summary branch November 19, 2026 19:36
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