From a4167ede074cc4a3e86bc14571ff6a406d664271 Mon Sep 17 00:00:00 2001 From: Vance Ingalls Date: Thu, 16 Jul 2026 23:48:53 -0700 Subject: [PATCH] feat(studio): default the flat inspector on MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flip STUDIO_FLAT_INSPECTOR_ENABLED's default from false to true — the bug-fix pass on the flat inspector is complete (right-aligned values, Stroke width/style split, promote-badge overlap, Layout/Style section gating for non-visual elements like audio). VITE_STUDIO_FLAT_INSPECTOR_ENABLED=false still opts back into the legacy panel. Updates the two tests that asserted the old false default: the flag's own default test, and the "classic PropertyPanel input coverage" suite, which relied on that default to reach the legacy panel and now mocks it explicitly (mirroring the adjacent "flat" suite's existing pattern). --- .../editor/manualEditingAvailability.test.ts | 14 +++++++------- .../components/editor/manualEditingAvailability.ts | 8 +++++--- .../editor/propertyPanelInputCoverage.test.tsx | 7 +++++++ 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/packages/studio/src/components/editor/manualEditingAvailability.test.ts b/packages/studio/src/components/editor/manualEditingAvailability.test.ts index 2b36fe640..5bc29cc43 100644 --- a/packages/studio/src/components/editor/manualEditingAvailability.test.ts +++ b/packages/studio/src/components/editor/manualEditingAvailability.test.ts @@ -106,13 +106,13 @@ describe("manual editing availability", () => { expect(resolveStudioBooleanEnvFlag({ UNKNOWN: "maybe" }, ["UNKNOWN"], false)).toBe(false); }); - it("defaults the flat inspector flag to false and honors an explicit override", async () => { - const off = await loadAvailabilityWithEnv({}); - expect(off.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(false); - - const on = await loadAvailabilityWithEnv({ - VITE_STUDIO_FLAT_INSPECTOR_ENABLED: "true", - }); + it("defaults the flat inspector flag to true and honors an explicit override", async () => { + const on = await loadAvailabilityWithEnv({}); expect(on.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(true); + + const off = await loadAvailabilityWithEnv({ + VITE_STUDIO_FLAT_INSPECTOR_ENABLED: "false", + }); + expect(off.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(false); }); }); diff --git a/packages/studio/src/components/editor/manualEditingAvailability.ts b/packages/studio/src/components/editor/manualEditingAvailability.ts index 5a9c80234..5e6f4213f 100644 --- a/packages/studio/src/components/editor/manualEditingAvailability.ts +++ b/packages/studio/src/components/editor/manualEditingAvailability.ts @@ -98,12 +98,14 @@ export const STUDIO_SDK_RESOLVER_SHADOW_ENABLED = resolveStudioBooleanEnvFlag( ); // Studio inspector redesign ("Ledger, flat" — design_handoff_studio_inspector): -// flat identity header/footer/groups behind a flag for incremental review. -// Default false; enable via VITE_STUDIO_FLAT_INSPECTOR_ENABLED=true. +// flat identity header/footer/groups. Default true as of v0.7.59+ bug-fix pass +// (right-aligned values, Stroke select-only, promote-badge overlap, Layout/ +// Style section gating); disable via VITE_STUDIO_FLAT_INSPECTOR_ENABLED=false +// to fall back to the legacy panel. export const STUDIO_FLAT_INSPECTOR_ENABLED = resolveStudioBooleanEnvFlag( env, ["VITE_STUDIO_ENABLE_FLAT_INSPECTOR", "VITE_STUDIO_FLAT_INSPECTOR_ENABLED"], - false, + true, ); export const STUDIO_MANUAL_EDITING_DISABLED_TITLE = "Manual editing is temporarily disabled"; diff --git a/packages/studio/src/components/editor/propertyPanelInputCoverage.test.tsx b/packages/studio/src/components/editor/propertyPanelInputCoverage.test.tsx index 808680bc7..822223047 100644 --- a/packages/studio/src/components/editor/propertyPanelInputCoverage.test.tsx +++ b/packages/studio/src/components/editor/propertyPanelInputCoverage.test.tsx @@ -455,6 +455,13 @@ function representativeElement() { describe("classic PropertyPanel input coverage", () => { it("emits only named, known-section events across body inputs and header/footer chrome", async () => { + vi.resetModules(); + vi.doMock("./manualEditingAvailability", async () => { + const actual = await vi.importActual( + "./manualEditingAvailability", + ); + return { ...actual, STUDIO_FLAT_INSPECTOR_ENABLED: false }; + }); const { PropertyPanel } = await import("./PropertyPanel"); const host = render(