Skip to content

Render ALTER rows as a tree with per-change details in plan/deploy ou…#3071

Draft
sfc-gh-jsommerfeld wants to merge 9 commits into
feature/dcm-dependenciesfrom
feature/dcm-alter-detail-tree
Draft

Render ALTER rows as a tree with per-change details in plan/deploy ou…#3071
sfc-gh-jsommerfeld wants to merge 9 commits into
feature/dcm-dependenciesfrom
feature/dcm-alter-detail-tree

Conversation

@sfc-gh-jsommerfeld

Copy link
Copy Markdown

…tput

Each ALTER row in snow dcm plan and snow dcm deploy output now expands into a child tree showing individual property changes, colored by operation (added/modified/removed) with only the keyword colored, not the full line. Children are sorted: added → modified → removed.

  • Expand ALTER rows with per-change detail lines indented as a tree
  • Color only the operation keyword on ALTER child lines
  • Sort nested ALTER children by kind
  • Drop kind-column padding on ALTER child rows (cleaner alignment)

Pre-review checklist

  • If my changes add or modify user-facing interface (commands, flags, output formats), I consulted maintainers and got sign-off beforehand (how).
  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated unit tests to verify correctness of my new code.
  • I've added or updated integration tests to verify correctness of my new code.
  • Manually tested on macOS
  • Manually tested on Windows
  • I've confirmed my changes are up-to-date with the target branch.
  • I've described my changes in RELEASE-NOTES.md (see when and how).
  • I've updated documentation if behavior changed.

Changes description

...

@sfc-gh-jsommerfeld sfc-gh-jsommerfeld requested a review from a team as a code owner May 31, 2026 20:33
@sfc-gh-jsommerfeld sfc-gh-jsommerfeld marked this pull request as draft May 31, 2026 20:33
sfc-gh-jsommerfeld and others added 2 commits June 8, 2026 22:22
…tput

Each ALTER row in `snow dcm plan` and `snow dcm deploy` output now
expands into a child tree showing individual property changes, colored
by operation (added/modified/removed) with only the keyword colored,
not the full line. Children are sorted: added → modified → removed.

- Expand ALTER rows with per-change detail lines indented as a tree
- Color only the operation keyword on ALTER child lines
- Sort nested ALTER children by kind
- Drop kind-column padding on ALTER child rows (cleaner alignment)

Co-authored-by: Cursor <cursoragent@cursor.com>
Map the 'changed' kind to ALTER_STYLE so it matches 'modified'/'renamed'
and the top-level ALTER operation, instead of falling through to the
unknown (blue) style.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sfc-gh-jsommerfeld sfc-gh-jsommerfeld force-pushed the feature/dcm-alter-detail-tree branch from 1aef3ca to db1e79e Compare June 8, 2026 20:24
@sfc-gh-jsommerfeld sfc-gh-jsommerfeld changed the base branch from main to feature/dcm-dependencies June 8, 2026 20:24
sfc-gh-jsommerfeld and others added 7 commits June 9, 2026 20:31
Collapse the two divergent blues — the periwinkle hex #a0a8fe (refresh
status / unknown rows) and the terminal-default named "blue" (running
phase, progress bar/spinner, analyze INFO findings / file headers) —
onto one BLUE constant in styles.py, and route progress.py's hardcoded
style="blue" literals through it, so every blue in DCM output renders
the same hue.

Co-authored-by: Cursor <cursoragent@cursor.com>
Modified properties under ALTER now render as `NAME: <prev> → <new>`
(or `NAME = <value>` when only a new value is present). Long or
multi-line values are collapsed to one line and truncated so the tree
layout stays compact. Property names are uppercased and colored
(terminal-default magenta/purple) to stand out from their values and the
operation keyword.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Property values (set/changed) render blue; the separators stay neutral.
- Property names render neutral (no longer magenta).
- The "set" keyword renders neutral so it doesn't read as a creation.
- A modified property's "→" renders in the ALTER color to split prev/new.
- Top-level operation object names (the FQN) render magenta.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align refresh and test table-name columns with the plan/deploy top-level
object name color (magenta). DOMAIN_STYLE was only ever used for object
names, so it's folded into the shared OBJECT_NAME_STYLE.

Co-authored-by: Cursor <cursoragent@cursor.com>
The set/changed value color was a named "blue" that didn't match the cyan
hue object names used before. Switch VALUE_STYLE to cyan so values keep
that recognizable color now that object names are magenta.

Co-authored-by: Cursor <cursoragent@cursor.com>
The ALTER detail rows uppercase property names (e.g. EXPRESSION), so the
nested-expectation test assertion and snapshot now expect the uppercased
form.

Co-authored-by: Cursor <cursoragent@cursor.com>
The top-level CREATE/ALTER/DROP keyword now renders bold so each entity row
stands out (the shared styles stay non-bold for the sub-change keywords in
the tree). A rendered tree is followed by a blank line separating it from the
next entity; the final entity is skipped since the summary adds its own.

Co-authored-by: Cursor <cursoragent@cursor.com>
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