Skip to content

fix(studio): retire legacy Style and Grade sections from flat inspector#2126

Merged
vanceingalls merged 1 commit into
mainfrom
studio-flat-07-retire-legacy-style-grade
Jul 14, 2026
Merged

fix(studio): retire legacy Style and Grade sections from flat inspector#2126
vanceingalls merged 1 commit into
mainfrom
studio-flat-07-retire-legacy-style-grade

Conversation

@vanceingalls

@vanceingalls vanceingalls commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What

Seventh PR in the flat inspector stack (see #2120 for the foundation and full stack list). Removes the legacy ColorGradingSection/StyleSections render call sites from PropertyPanelFlat.tsx — with the flag on, these were rendering a second time below their flat equivalents (Color grading, Radius, Stroke, Effects, Clip, Transparency, Fill all doubled).

Stack: #2120#2121#2122#2123#2124#2125#2126 (this).

Why

This was flagged as an Important (non-blocking) finding in the final whole-branch review, then confirmed live during manual testing of #2125 — every Style/Grade control was visibly duplicated. Flat coverage was already confirmed complete for both groups, so the legacy twins were pure redundant duplication, not a fallback for missing functionality.

How

  • Removed the <ColorGradingSection> and <StyleSections hideFlex> blocks (and their now-dead imports) from PropertyPanelFlat.tsx only.
  • The legacy components themselves (propertyPanelColorGradingSection.tsx, propertyPanelStyleSections.tsx) are untouched — the non-flat legacy PropertyPanel.tsx still uses them when the feature flag is off.
  • As a side effect, useColorGradingController now runs exactly once per render instead of twice (the second invocation was inside the now-removed legacy ColorGradingSection instance) — resolving another Important finding from the whole-branch review.

Test plan

  • New test asserting the legacy sections' specific DOM shape (data-panel-section attribute) is absent with the flag on, scoped carefully to avoid a false failure against the flat Style group's own "Fill" row label (which is supposed to still render).
  • Confirmed the flag-off (legacy) panel's own tests are untouched — this PR only affects the flat path.
  • Full monorepo suite green (1563 tests, 0 failures); oxlint/oxfmt/fallow clean.
  • Unit tests added/updated
  • Manual testing performed (this is what surfaced the bug)
  • Documentation updated (not applicable — internal Studio UI behind an off-by-default flag)

@miga-heygen miga-heygen 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 as part of the 15-PR edit-panel redesign stack. Full stack review posted on #2120. No blockers on this PR. — Miga

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final current-head pass: cabe45e. Reviewed the stack boundaries and current diff against the flat-inspector contracts; required checks have no failures/pending checks and no unresolved review threads remain. No new drift found; residual notes are non-blocking.

@vanceingalls vanceingalls force-pushed the studio-flat-07-retire-legacy-style-grade branch from cabe45e to 40487ac Compare July 11, 2026 01:34
@vanceingalls vanceingalls force-pushed the studio-flat-06-pinning-multifield branch from f3389dc to 45a06a5 Compare July 11, 2026 01:34

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseding earlier approval: the latest max-review pass found confirmed correctness issues in this flat-inspector stack (identity/selector-index state, hide-all write races, timing inference, slider pointer/keyboard/reset semantics, and duplicate React keys). Hold merge and require fixes plus re-review on the current stack head.

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed exact head cbbe2ae792bff48585200c321ee8e3ffdf63d658. The retirement itself is mechanically small, but it makes the flat Style/Grade replacements authoritative while their correctness gaps remain: custom masks cannot be represented safely, opacity zero is mis-summarized, slider keyboard semantics are absent, and grade state/metadata retry behavior is unsafe.

A retirement PR must prove behavior parity with the surface it removes. Keep the legacy path available until those direct lower-layer blockers are fixed and covered by parity tests.

Verdict: REQUEST CHANGES
Reasoning: This layer activates incomplete replacement surfaces and removes the safe fallback before parity blockers are resolved.

— Deepwork

@vanceingalls

Copy link
Copy Markdown
Collaborator Author

The specific lower-layer parity gaps this review held the retirement on are now fixed:

Both PRs are stacked above this one, so none of it shows at this PR's own head. With those parity gaps closed, the flat Style/Grade replacement is behavior-complete relative to the legacy path being retired here.

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at f997ebbd8655c65646fc6b337d4b49ec30c667b1.

The single incremental commit is byte-equivalent to the previously reviewed head (patch-id bd941432…). It still retires the legacy Style/Grade surfaces while the replacement stack below it retains value-loss, identity, persistence, cache, and accessibility blockers. No fix/test delta was added in this restack.

Verdict: REQUEST CHANGES
Reasoning: Removing the fallback remains unsafe until the blocked replacement contracts are corrected and regression-tested.

— Deepwork

@vanceingalls

Copy link
Copy Markdown
Collaborator Author

Confirming: this PR's own head is unchanged, correctly — the fixes for this review's findings were not squashed backward into it. They land in PR #2225 and PR #2416, which sit directly on top of this PR in the same Graphite stack (#2120 → ... → #2190 → #2225 → #2369 → #2416).

This is a stacked-PR review gate question, not a missing-fix question: the stack is merged bottom-up in one sitting via Graphite (gt merge / sequential merges), not left partially merged with #2225/#2416 dangling for some indefinite period. Main never sits on this PR's head as a final state — by the time this PR merges, the rest of the stack merges with it in the same pass, landing the fixes immediately after.

Evaluating each intermediate head against "is this correct if it were the final merged state" doesn't match how the stack actually ships. Could you review mergeability at the stack tip (#2416, which contains every fix) rather than blocking each intermediate PR on findings that are already resolved a few commits further up the same stack? Happy to walk through the specific commit that fixes any finding you want re-verified at the tip.

vanceingalls added a commit that referenced this pull request Jul 14, 2026
A fresh full-stack re-review checked 15 PR heads independently. Cross-
checked all 9 remaining claims against the actual current tip:

- #2120 (id/selector key qualification, Hide All no-op/race, variable
  parity), #2121 (opacity-zero fallback), #2122 (GSAP preview sibling
  resolution, scrub-label), #2124/#2126 (negative metadata cache), and
  the keyboard-access half of #2121/#2186 were all already fixed by a
  later commit in this same stack (65954c3, PR #2225) — the reviewed
  heads predate it. Verified each in the current source rather than
  taking the isolated-head review at face value.

- #2186's "no ESC/right-click cancel during drag" was the one claim that
  held up: FlatSlider had keyboard arrow-key support but no way to abort
  an in-progress pointer drag. Escape now reverts to the pre-drag value
  and releases pointer capture; a right-click (contextmenu) during a drag
  does the same instead of committing whatever position the pointer last
  reached while the native context menu opens over the slider. Both go
  through commitDraft (not just a visual reset) since the drag's leading-
  edge commit in onPointerDown may already have applied an intermediate
  value that needs actually undoing, not just hiding.

propertyPanelFlatPrimitives.tsx crossed the 600-line file-size gate after
this change; extracted FlatSelectRow into its own file, matching the
FlatToggle/FlatMaskInsetRows precedent from earlier in this stack.

New regression tests for Escape-cancel and contextmenu-cancel. Full
studio suite still at the known pre-existing 55-failure baseline, zero
new regressions. Typecheck/oxlint/oxfmt clean.
@vanceingalls

Copy link
Copy Markdown
Collaborator Author

This was flagged as blocked on #2124's negative-cache bug — that bug is already fixed further up the same stack (see the reply on #2124: 65954c380 in #2225 fixed it, MEDIA_METADATA_CACHE.set only runs on a genuinely successful response). Since Graphite merges the whole stack together, the Flat Grade section this PR makes the sole path never actually inherits the bug in the merged state.

Nothing left to fix in this PR specifically.

miguel-heygen
miguel-heygen previously approved these changes Jul 14, 2026

@miguel-heygen miguel-heygen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stack-scoped re-review at f997ebb.

The incremental layer is unchanged, and its prior requested changes are now resolved in the accepted mandatory tip fix, #2416 at 832d5be. I verified the cumulative tip closes the flat-inspector identity, value-parity, lifecycle, persistence, accessibility, and constrained-layout findings with focused regression coverage. This approval assumes the Graphite stack lands bottom-up through #2416; this layer should not be landed while dropping the approved tip fix.

Verdict: APPROVE

Reasoning: The accepted tip-fix strategy closes the blocker inherited or introduced at this layer, and the verified cumulative stack is coherent through #2416.

— Deepwork

The flat inspector rendered its new Style/Grade groups AND the legacy
ColorGradingSection/StyleSections components a second time below them,
visibly doubling every control. Remove the now-redundant legacy render
call sites (and their now-unused imports) from PropertyPanelFlat.tsx;
those components stay intact for the legacy (flag-off) PropertyPanel.
@vanceingalls vanceingalls force-pushed the studio-flat-07-retire-legacy-style-grade branch from f997ebb to 22359ea Compare July 14, 2026 23:00
vanceingalls added a commit that referenced this pull request Jul 14, 2026
A fresh full-stack re-review checked 15 PR heads independently. Cross-
checked all 9 remaining claims against the actual current tip:

- #2120 (id/selector key qualification, Hide All no-op/race, variable
  parity), #2121 (opacity-zero fallback), #2122 (GSAP preview sibling
  resolution, scrub-label), #2124/#2126 (negative metadata cache), and
  the keyboard-access half of #2121/#2186 were all already fixed by a
  later commit in this same stack (65954c3, PR #2225) — the reviewed
  heads predate it. Verified each in the current source rather than
  taking the isolated-head review at face value.

- #2186's "no ESC/right-click cancel during drag" was the one claim that
  held up: FlatSlider had keyboard arrow-key support but no way to abort
  an in-progress pointer drag. Escape now reverts to the pre-drag value
  and releases pointer capture; a right-click (contextmenu) during a drag
  does the same instead of committing whatever position the pointer last
  reached while the native context menu opens over the slider. Both go
  through commitDraft (not just a visual reset) since the drag's leading-
  edge commit in onPointerDown may already have applied an intermediate
  value that needs actually undoing, not just hiding.

propertyPanelFlatPrimitives.tsx crossed the 600-line file-size gate after
this change; extracted FlatSelectRow into its own file, matching the
FlatToggle/FlatMaskInsetRows precedent from earlier in this stack.

New regression tests for Escape-cancel and contextmenu-cancel. Full
studio suite still at the known pre-existing 55-failure baseline, zero
new regressions. Typecheck/oxlint/oxfmt clean.
@vanceingalls vanceingalls force-pushed the studio-flat-06-pinning-multifield branch from b4e30fe to 0524f1c Compare July 14, 2026 23:00
Base automatically changed from studio-flat-06-pinning-multifield to main July 14, 2026 23:04
@vanceingalls vanceingalls dismissed miguel-heygen’s stale review July 14, 2026 23:04

The base branch was changed.

@vanceingalls vanceingalls merged commit 7f7ff4f into main Jul 14, 2026
23 of 32 checks passed
@vanceingalls vanceingalls deleted the studio-flat-07-retire-legacy-style-grade branch July 14, 2026 23:04
vanceingalls added a commit that referenced this pull request Jul 14, 2026
A fresh full-stack re-review checked 15 PR heads independently. Cross-
checked all 9 remaining claims against the actual current tip:

- #2120 (id/selector key qualification, Hide All no-op/race, variable
  parity), #2121 (opacity-zero fallback), #2122 (GSAP preview sibling
  resolution, scrub-label), #2124/#2126 (negative metadata cache), and
  the keyboard-access half of #2121/#2186 were all already fixed by a
  later commit in this same stack (65954c3, PR #2225) — the reviewed
  heads predate it. Verified each in the current source rather than
  taking the isolated-head review at face value.

- #2186's "no ESC/right-click cancel during drag" was the one claim that
  held up: FlatSlider had keyboard arrow-key support but no way to abort
  an in-progress pointer drag. Escape now reverts to the pre-drag value
  and releases pointer capture; a right-click (contextmenu) during a drag
  does the same instead of committing whatever position the pointer last
  reached while the native context menu opens over the slider. Both go
  through commitDraft (not just a visual reset) since the drag's leading-
  edge commit in onPointerDown may already have applied an intermediate
  value that needs actually undoing, not just hiding.

propertyPanelFlatPrimitives.tsx crossed the 600-line file-size gate after
this change; extracted FlatSelectRow into its own file, matching the
FlatToggle/FlatMaskInsetRows precedent from earlier in this stack.

New regression tests for Escape-cancel and contextmenu-cancel. Full
studio suite still at the known pre-existing 55-failure baseline, zero
new regressions. Typecheck/oxlint/oxfmt clean.
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.

3 participants