feat(web): make environment artwork theme aware - #6183
Conversation
Co-authored-by: codex <codex@users.noreply.github.com>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
ApprovabilityVerdict: Approved df5cb87 This PR adds theme-aware coloring to environment artwork (dev/nightly indicators) and restricts artwork to built-in themes. Changes are purely visual/UI, include comprehensive tests, and don't touch backend or sensitive code. Well-scoped theming feature. You can customize Macroscope's approvability policy. Learn more. |
Co-authored-by: codex <codex@users.noreply.github.com>
Dismissing prior approval to re-evaluate df5cb87
Twenty-two upstream commits. Roughly half needed no thought -- server and shared fixes that this fork never touched: Azure DevOps SSH remotes, bare Windows drive roots, self-hosted GitLab routing, unborn HEAD in VCS status, 256-color TERM on Windows, skipping Linux libc detection off Linux, and OpenCode model slugs containing a slash. The mobile commits do not apply; apps/mobile was removed here, and its files, patches and EAS workflow stay deleted. The rest crossed the shell redesign and needed deciding. OKLCH palettes (pingdotgg#6036) are adopted. The generator now emits themeRgbToThemeColor everywhere, including the roles this fork retuned -- the compressed surface tiers, the harder accent-blended border, and the sidebar rule at 0.2 rather than 0.12 in light. The tuning is the fork's, the color space is upstream's. Downstream of that: the boot script's hand-maintained palette copy is regenerated from the real generator output, and its default-palette copy is pinned back to hex, because getDefaultThemeColors still returns the Sakura role tables verbatim and the two halves have to agree or the splash disagrees with the app. Sidebar footer back buttons (pingdotgg#6031) are taken, rebuilt on this fork's footer: the meter stays full-bleed below the nav, the nav keeps the content inset, and the link is still Stats. The theme-aware environment artwork (pingdotgg#6183) is taken, with one correction. The merge attached sidebarArtwork to four of the five curated themes by line position and left OLED Void out. That flag is new; before it existed the artwork was gated only by the user's identification setting, so an accidental omission would have silently turned the artwork off for one theme. All five opt in. The hourly past-24-hour usage view (pingdotgg#6170) is taken wholesale -- it reshapes the page's state around windowSelection and sinceTime/untilTime -- with this fork's Escape-to-leave handler reapplied on top. Deliberately not taken: T3_CHAT_THEME and the other retired presets that upstream reintroduces through themePalette and its tests, LegacySidebar and useLegacySidebarEnabled, the pre-split index.css monolith, and the Clerk and react-native patch entries. Their ids stay claimed in RESERVED_THEME_IDS so a settings.json pinned to one still degrades to system, which now has a test of its own. @legendapp/list comes back to the catalog with its 3.3.5 patch. The virtual list behind the chat timeline is a web dependency, and apps/web/package.json was still asking for it through catalog: with nothing to resolve to. Two dead things went with the merge rather than surviving it: the theme editor's sidebar-artwork toggle, defined but rendered by neither side, and expectThemeColors, whose only callers were the retired-preset tests. Verified: typecheck and lint clean across web, server, contracts, client-runtime and desktop; 2238 tests pass; web builds; desktop smoke test passes. The ghostty runtimeAbi wasm test fails identically before and after the merge. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
## What's Changed * feat(web): make environment artwork theme aware by @juliusmarminge in pingdotgg/t3code#6183 * fix(shared): normalize a bare Windows drive root the same as C:\ / C:/ by @arhxam in pingdotgg/t3code#6189 * fix(shared): detect Azure DevOps SSH remotes (ssh.dev.azure.com) by @arhxam in pingdotgg/t3code#6187 * feat(web): add back buttons for the pull requests and usage pages in the sidebar footer by @UtkarshUsername in pingdotgg/t3code#6031 * fix(web): render dropdowns above toasts by @Brechard in pingdotgg/t3code#6165 * fix(web): thread error banner dismiss survives reconnect and rerenders by @myacoub91 in pingdotgg/t3code#6123 * fix(web): use a clearer pull action icon by @extoci in pingdotgg/t3code#6194 * feat(web): use OKLCH for theme palettes by @StiensWout in pingdotgg/t3code#6036 ## New Contributors * @extoci made their first contribution in pingdotgg/t3code#6194 **Full Changelog**: pingdotgg/t3code@v0.0.34-nightly.20260811.1068...v0.0.34-nightly.20260811.1069 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.34-nightly.20260811.1069
Fixed Dev and Nightly artwork used channel-specific colors that clashed with built-in themes, so palette themes disabled the artwork entirely. The compact artwork treatment in the send button had also been removed when themes were introduced.
This gives T3 Chat, Grove, Ocean, Ember, and Iris reviewed Dev and Nightly palettes in both light and dark appearances. It restores the matching artwork inside the send button, keeps custom themes on the safe pill fallback, and removes the custom-theme artwork toggle so user-controlled colors cannot accidentally opt into an unsupported treatment.
Validation
vp test run apps/web/src/components/SidebarStageBackdrop.test.tsx apps/web/src/components/chat/ComposerPrimaryActions.test.ts apps/web/src/themePalette.test.ts— 40 tests passedvp run --filter @t3tools/web typecheckvp run lintvp run fmt:checkvp run --filter @t3tools/web buildModel: GPT-5 · Harness: Codex in T3 Code
Note
Low Risk
UI/theming and identification behavior only; custom themes lose artwork opt-in (intentional fallback to pill).
Overview
Dev/Nightly environment artwork now pulls colors from CSS tokens (
--stage-art-*,--stage-night-*) instead of hardcoded SVG hex, with per–built-in-theme palettes inindex.css(T3 Chat, Grove, Ocean, Ember, Iris) so artwork can stay on when users pick those themes.Send button gets compact
StageBackdropButtonArtwhen environment identification is Artwork and the active theme allows it; sidebar triggers use palette-matched focus-ring offsets viaresolveSidebarStageFocusRingOffsetClass.Custom themes no longer support sidebar artwork:
themeAllowsSidebarArtwork()is built-in-only,sidebarArtworkis dropped from theme files and the theme editor toggle, and live preview always suppresses artwork (pill fallback). Docs note artwork in the sidebar and send button.Reviewed by Cursor Bugbot for commit df5cb87. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Make environment artwork colors theme-aware and restrict artwork to built-in themes
themeAllowsSidebarArtworkutil in themePalette.ts gates artwork to built-in themes; custom themes fall back to the version pill identification mode.sidebarArtworkis removed fromThemeFile, stored themes, import/export serialization, and the theme editor UI — built-in themes carrysidebarArtwork: truedirectly in their definitions.StageBackdropButtonArtcomponent renders compact artwork crops inside controls (e.g., the composer send button and sidebar triggers), with variant-specific focus-ring offset classes.sidebarArtworkset will lose the artwork flag on next load and fall back to pill mode.Macroscope summarized df5cb87.