Skip to content

feat(studio): implement appearance foundation - #1873

Merged
samuv merged 15 commits into
plan/studio-appearance-foundationfrom
impl/studio-appearance-foundation
Sep 24, 2026
Merged

samuv merged 15 commits into
plan/studio-appearance-foundationfrom
impl/studio-appearance-foundation

Conversation

@samuv

@samuv samuv commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Tracking: #1843

Stage and baseline

Stage: Implementation, stacked on Plan / Interface PR #1861. This PR targets plan/studio-appearance-foundation; the plan targets main at 545ffc6ba21ec409017ec456b4bee451dd5f0de6. The current pinned plan contract is 0be57c15d4652bf915402f3010b4e5f74c25eb71. Both PRs remain open for human review.

Interfaces match the pinned Plan / Interface contract: Yes. The directing user authorized two review amendments on the plan and implementation branches: ship Merriweather 300 only, and derive the fixed Default swatch from --default-palette-accent. Studio retains ADR 0351's browser/BFF boundary and the published SDK. No external design-system dependency or deployment palette override was added.

Acceptance coverage

Plan criteria Implementation and proof
AC1.1–1.3 Semantic Default, Aztec, Mono, and Solar roles in light/dark; same-origin Inter and Merriweather 300; contrast corrections limited to failing values. The computed matrix, contrast report, and Shiki proof cover all eight palette/theme pairs.
AC2.1–2.3 A same-origin parser-blocking script applies theme, palette, and UI scale before CSS and React. State persists across reload and tabs, falls back safely when storage or media queries fail, and suppresses transitions only during an appearance change. See the first-paint record and browser interactions.
AC3.1–3.3 Shared OptionField uses a radio dropdown at 500px and a bottom sheet below 500px. Appearance exposes Light, Dark, System, Default, Aztec, Mono, and Solar. Keyboard selection, focus restoration, resizing, and visible light/dark focus were checked in the built app.
AC4.1–4.2 Desktop/mobile captures cover shell, form, dialog, and list in all 16 palette/theme/width combinations. The #1779 evidence comment links the screenshots and frozen-value comparisons for maintainer review. The local token and control API is ready for #1844 and #1846.

Review follow-up

  • Removed all 46 PNGs from the final tree and from every implementation commit, so they do not enter main with either a squash or merge commit. The images linked in Studio design review and parity tracking #1779 remain accessible at pinned review commit 45d5bd6a004d1232e14d3639f1889acbfd3821f3. Small JSON and text records stay in this PR.
  • One stable root --default-palette-accent supplies the Default swatch and default light brand roles. Its rendered Stacklok green is unchanged, including while a named palette is selected. Existing shell and auth branding already consumes semantic CSS tokens.
  • Removed unused Merriweather 400/700 imports. The production web build has zero 400/700 font assets, about 660 KB less than the prior candidate.

Verification

  • Current implementation head: cff5dfe7b790ad1c97689fc0d81f22a13bffc9c0, rebased onto plan tip 0be57c15d4652bf915402f3010b4e5f74c25eb71. The rebase preserved the public-status sign-in banner's wrapping actions and uses semantic warning colors. Local merge-tree checks are clean for both PRs; the implementation PR is mergeable.
  • task studio:check passed on the rebased head: 408 web and 150 server tests, lint, typecheck, and generated-artifact checks. task studio:browser passed all 26 desktop/mobile Playwright journeys; task studio:build passed.
  • The built app passed all 16 palette/theme/width cases with HTTP 200, no horizontal overflow, and no external asset requests. All 36 browser appearance interactions passed. Computed palette and rendered badge/banner contrast checks found zero failures.
  • PR CI at the current head passed all 30 applicable checks, including Studio, docs, site build, Go race, lint, SDK, and performance; five jobs were skipped by design. task ac-trace-strict also passed locally for every landed plan after the rebase.

This PR stops before merge.

@peppescg

Copy link
Copy Markdown
Contributor

Quick review. It looks solid:

  • CI is green, and every AC is covered by a named test or by the attached evidence.
  • The boot script runs first in <head>, and all storage access is in try/catch.
  • Missing matchMedia falls back to light.
  • Dropping the Google Fonts @import for self-hosted @fontsource is a nice CSP win.

Points:

  1. Med — 46 PNGs (~4.7 MB) committed under docs/acceptance/evidence/studio-appearance-foundation/. The plan (AC1.3, AC4.1, DoD 3) puts this evidence in Studio design review and parity tracking #1779. Once merged, every clone carries it forever, so please attach the images to the issue and keep only the small JSON/txt files.
  2. Low — unused font weights. apps/web/src/styles.css imports Merriweather 400 and 700, but the plan only specifies 300 for titles. Both extra weights ship in the production bundle.
  3. Low — branding swap cost. The Default swatch hardcodes hsl(161 94% 21%) / "Stacklok green" (apps/web/src/lib/palettes.ts:16), and the same literal is repeated three times in styles.css (--brand, --brand-label, --brand-ink), besides top-nav.tsx:20,27 and auth-gate.tsx:84. Deriving the swatch from the CSS token would stop them drifting and make the eventual rebrand smaller.

@samuv
samuv force-pushed the impl/studio-appearance-foundation branch from 47ba370 to a405658 Compare September 24, 2026 14:16
@samuv

samuv commented Sep 24, 2026

Copy link
Copy Markdown
Contributor Author

@peppescg Thanks for the review. I addressed all three points in the updated stack:

  1. Screenshot evidence: Removed all 46 PNGs from the implementation PR's final tree and every commit in its branch. The small JSON/txt evidence remains. Issue #1779's evidence comment links the screenshots at pinned review commit 45d5bd6a0. Those are commit links, rather than native issue attachments.
  2. Fonts: With the plan amendment approved, Merriweather now ships at weight 300 only. The 400/700 assets are absent from the production build, removing about 660 KB.
  3. Default branding: With the plan amendment approved, the Default swatch and default light brand roles use the stable --default-palette-accent token. The rendered green is unchanged. auth-gate.tsx uses bg-brand; the white logo in top-nav.tsx sits on the dark shell gradient.

The stack is rebased on origin/main at 20f1220e9 (plan PR #1861 at b2871dcc6, implementation PR #1873 at a405658c6). Current CI has no failures: 7 passing checks on the plan PR and 30 on the implementation PR, with the remaining checks skipped as expected. Both PRs are open and mergeable.

@samuv
samuv force-pushed the impl/studio-appearance-foundation branch from a405658 to 2ffe9a8 Compare September 24, 2026 14:59
@samuv
samuv force-pushed the impl/studio-appearance-foundation branch from 2ffe9a8 to 99bccb8 Compare September 24, 2026 15:30
samuv and others added 15 commits September 24, 2026 17:50
Co-Authored-By: mecatl <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
Co-Authored-By: mecatl <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
Co-Authored-By: mecatl <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
Co-Authored-By: mecatl <[email protected]>
Signed-off-by: Samuele Verzi <[email protected]>
Co-Authored-By: mecatl <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
Co-Authored-By: mecatl <[email protected]>

Signed-off-by: Samuele Verzi <[email protected]>
Use one stable default accent token for the palette swatch and default color roles. Keep the small text evidence in the acceptance directory.

Signed-off-by: Samuele Verzi <[email protected]>

Co-Authored-By: mecatl <[email protected]>
Remove unused 400 and 700 font imports and pin the 300-only asset contract in the Studio test.

Signed-off-by: Samuele Verzi <[email protected]>

Co-Authored-By: mecatl <[email protected]>
@samuv
samuv force-pushed the impl/studio-appearance-foundation branch from 99bccb8 to cff5dfe Compare September 24, 2026 15:57

@peppescg peppescg 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.

🚢

@samuv
samuv merged commit 627d07b into main Sep 24, 2026
36 checks passed
@samuv
samuv deleted the impl/studio-appearance-foundation branch September 24, 2026 16:20
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Sep 25, 2026
2 tasks
peppescg added a commit that referenced this pull request Oct 9, 2026
#2211 replaced the input with the prototype's verbatim, which brought
the prototype's aria-invalid, file:, and selection: states but also
swapped Studio's border-control-border and solid ring-2 ring-ring focus
ring for the prototype's border-input and translucent 3px ring. Those
fall below 3:1 non-text contrast, which #1873 had fixed.

Keep the prototype's states and restore Studio's border and focus ring.
An invalid field focuses with a solid destructive ring rather than the
prototype's translucent one, for the same reason. Inputs look as they
did before #2211: a darker border at rest and a solid ring on focus.

Refs #2204

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.

2 participants