Skip to content

fix(studio): Style/Grade/Text parity gaps found in legacy-retirement audit#2127

Open
vanceingalls wants to merge 4 commits into
studio-flat-07-retire-legacy-style-gradefrom
studio-flat-08-style-grade-parity
Open

fix(studio): Style/Grade/Text parity gaps found in legacy-retirement audit#2127
vanceingalls wants to merge 4 commits into
studio-flat-07-retire-legacy-style-gradefrom
studio-flat-08-style-grade-parity

Conversation

@vanceingalls

@vanceingalls vanceingalls commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

What

Eighth PR in the flat inspector stack (see #2120 for the foundation and full stack list). Fixes 13 real functional gaps between the flat groups and the legacy components they replace — found by a thorough control-by-control audit (not just section-label matching) run after the legacy Style/Grade retirement (#2126) made these gaps directly user-visible for the first time.

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

Why

The audit found these were pre-existing since each group was first built — the retained legacy sections (removed in #2126) had been silently covering for them the whole time. Two were hard drops (stroke color completely uneditable; per-corner border-radius unreachable from a uniform starting value) and one was a real behavioral bug (color grading sliders don't revive a grade parked at 0% strength, so edits look invisible). The rest were narrower gaps (unclamped/unenumerated stroke inputs, a missing uniform mask-inset slider, keyboard/blur safety on the grade compare button, HDR banner detail text, text-transform: capitalize unreachable, text-align: end unselectable, Size losing live-commit, Content textarea losing auto-focus, and non-numbered empty-field labels).

How

Three independent commits, each fixing one group's gaps against its legacy source of truth:

  • Style (propertyPanelFlatStyleSections.tsx): stroke color now editable via a ColorField row; stroke width clamped 0–200px; stroke style validated against the 10 legacy options and exposed via a discoverable dropdown; per-corner radius now always reachable (deleted the dead branch that only mounted BorderRadiusEditor for already-non-uniform elements — it has its own unlink toggle and now always renders, matching legacy); restored the uniform mask-inset slider alongside the per-side fields.
  • Grade (propertyPanelFlatColorGradingSection.tsx): added a visibleIntensity helper (identical to legacy) threaded into every Adjust/Vignette/Grain/Blur/Pixelate/LUT commit handler so editing a grade parked at 0% strength revives it to visible — the strength slider's own commit and preset application are correctly left untouched; the compare/hold button gained keyboard activation (Space/Enter) and window-blur release safety; the HDR banner and status indicator regained their informational detail text.
  • Text (propertyPanelFlatTextSection.tsx, multi-field path): added the missing capitalize case option; aliased text-align: end onto the "right" button (matching how "start" already aliases onto "left"); restored live-commit on the Size field; wired key+autoFocus so switching or adding a text field focuses its Content textarea, matching legacy; empty fields now show a numbered "Text 1"/"Text 2" fallback instead of an indistinguishable bare "Text".

All three legacy source files (propertyPanelStyleSections.tsx, BorderRadiusEditor.tsx, propertyPanelColorGradingSection.tsx, propertyPanelColorGradingControls.tsx, propertyPanelSections.tsx) were read-only references — none were modified; they're still used by the non-flat legacy panel.

Test plan

  • Every fix has a dedicated real DOM-event test with an exact assertion (drag/click/keyboard/blur simulation, not shallow snapshots), including the previously-unreachable per-corner-radius-from-uniform path and the revive-from-zero path, each independently verified in review by reproducing the exact prior bug and confirming the new test catches it.
  • Full monorepo suite green (1582 tests, 0 failures across all three commits); oxlint/oxfmt/fallow clean on every commit.
  • Unit tests added/updated
  • Manual testing performed (this whole fix arc originated from live manual testing surfacing the Style/Grade duplication, which led to the audit that found these gaps)
  • Documentation updated (not applicable — internal Studio UI behind an off-by-default flag)

vanceingalls commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator Author

@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: fa4d579. 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-08-style-grade-parity branch from fa4d579 to 605f435 Compare July 11, 2026 01:34
@vanceingalls vanceingalls force-pushed the studio-flat-07-retire-legacy-style-grade branch from cabe45e to 40487ac 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 c8d1d59a49f059ef0f5ac3bf5a1c067e2930b5d1. The parity audit still introduces/retains two direct correctness issues:

  • propertyPanelFlatTextSection.tsx:151-161 maps logical start/end alignment to physical left/right and writes the physical value. That destroys authored logical semantics and is wrong for RTL content.
  • propertyPanelFlatColorGradingSection.tsx:43-56 installs global compare-release listeners that are removed only when a release event fires, not on unmount. Changing selection while held leaks stale callbacks against the prior controller.

Preserve Start/End as first-class values (or use direction-aware non-destructive display) and clean all global listeners in effect teardown. Add RTL and unmount-while-held tests.

Verdict: REQUEST CHANGES
Reasoning: The parity layer corrupts logical text alignment and can leak stale global Grade listeners across selection changes.

— Deepwork

…ofocus in flat Text

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@vanceingalls

Copy link
Copy Markdown
Collaborator Author

Both fixed in PR #2416, commit 267cdfce1.

Logical alignment destroyed: the Align onChange now no-ops when the clicked option is already the one visually active for a logical value (next === "left" && align === "start", or "right"/"end") — it only writes the physical value when the user picks a genuinely different alignment. start/end survive untouched, so RTL content isn't silently rewritten to left/right.

Grade compare-listener leak: FlatColorGradingAccessory now tracks the active hold's release callback in a ref and tears it down in a useEffect cleanup, not only when a pointerup/pointercancel/blur event actually fires. Switching selection mid-hold no longer leaves window listeners (and their stale commitCompare closures) registered forever.

New regression tests: lights up 'right' for text-align: end but re-clicking it is a no-op + commits a genuine align change away from a logical value (replacing the prior test that asserted the destructive behavior as correct).

@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 9e8e27d285638743ca06ebcd64a5f3b4db929aa8.

All four incremental commits are byte-equivalent to the previously reviewed head (patch-id 7ece1baf…). Logical start/end alignment still aliases directly to physical left/right (propertyPanelFlatTextSection.tsx:151-162), and the Grade compare gesture still registers global pointer/blur listeners whose cleanup depends on a release event rather than component unmount (propertyPanelFlatColorGradingSection.tsx:43-57). The ancestor replacement surfaces also remain blocked.

Verdict: REQUEST CHANGES
Reasoning: No requested logical-alignment or listener-lifecycle fix landed; this is only a rebase of the blocked patch.

— 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.

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