Repository navigation
feat(native): close AP-THEME and advance ST-APPEARANCE parity - #433
Merged
Merged
Conversation
…CSS, default-theme sync, first-frame boot)
This was referenced Nov 19, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #252
Refs #1, #391
Problem
AP-THEMEandST-APPEARANCEwere missing upstream web parity frompingdotgg/t3code#35247andpingdotgg/t3code#36042, plus theRender mathtoggle in Appearance settings:css, remote-fetch sanitization, orThemeCssEditor.defaultTheme/defaultThemeSetAtanddefaultAppearance/defaultAppearanceSetAtgeneration tracking (useDefaultTheme.ts) was not implemented or wired toServerConfigupdates.ThemeStatewith defaults before reading saved preferences and had no cachedt3code:environment-themes:v1fallback, causing a stock-palette flash until the server replied.mathRenderingEnabledwas wired in markdown/preview rendering andClientSettingsDocbut had no UI toggle insettings/appearance.rs.Approach
ThemeCssEditor(pingdotgg/t3code#35247):crates/core/src/themes/css.rsportingthemeCssValueFetches,themeCssLoadsRemoteFiles, CSS custom-property cascade parsing (:root,.dark,:not(.dark),[data-app-sidebar],!important,var(...)),--app-theme-*role & semantic token overrides, andThemeCssEditorTab/Shift+Tab/Enter indentation & cursor Ln/Col helpers.css: Option<String>toThemeDefinitionwithMAX_CSS_LEN(20_000UTF-16 units) validation, export/import/rename preservation, legacy built-in alias resolution (t3-grove,t3-chat-dark, etc.), andpalette_for_with_css.crates/core/src/themes/editor.rsandcrates/app/src/theme_editor.rswith collapsible Custom CSS editing, live custom-property preview (restored on cancel/close), merge CSS inheritance & conflict validation, remote-fetch/length diagnostics, and Escape panel dismissal.pingdotgg/t3code#35247,pingdotgg/t3code#36042):crates/core/src/themes/default_sync.rsportinguseDefaultTheme.tsgeneration tracking (t3code:default-theme-applied:v2:<envId>,t3code:default-appearance-applied:v1:<envId>, single-appearance auto-mode, late-resolution retry) andt3code:environment-themes:v1persistence helpers.crates/app/src/sidebar/controller.rs(sync_server_config) to keep cached environment themes beforeenvironment_themes_received, persist live published themes (including explicit empty clears), and adoptdefaultTheme/defaultAppearanceonce per generation.pingdotgg/t3code#36042):theme::init_from_doc/theme::boot_savedincrates/app/src/theme/mod.rsand invokedtheme::boot_saved(cx)incrates/app/src/main.rsbefore window creation so saved preferences, custom themes, cached environment themes, and CSS custom properties paint from frame 1.ST-APPEARANCE):Render math(mathRenderingEnabled) switch and reset action tocrates/app/src/settings/appearance.rs.Ledger Updates (
apps/native/parity/LEDGER.md)AP-THEME:partial(#1, #252) →done(blank Issue). Arbitrary CSS DOM selectors & DOMgetComputedStyleinspector/usage highlights are documented as[D]/DOM n/ain GPUI.ST-APPEARANCE: updated Native summary; honestly keptpartial(#1) for remainingAppearanceSettingsPanel.tsxInterface rows (ThreadDetailsItemsRow,effortDisplay,panelAnimationDurationMs,environmentIdentificationMode,persistComposerContextStrip) outside this slice's ownership.Verification
cargo clippy --workspace --all-targets -- -D warnings: pass (0 warnings)cargo test -p t3-core themes -- --test-threads=1: 60/60 passcargo test -p t3-core --test conformance -- --test-threads=1: 8/8 passcargo test -p t3-client -- --test-threads=1: 151/151 passT3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot theme -- --test-threads=1: 11/11 passT3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot sync_server_config_preserves_cached_themes -- --test-threads=1: 1/1 passcargo build -p t3-native: passvp fmt --check apps/native/parity/LEDGER.md: passnode apps/native/scripts/gen-theme.ts --check: passnode --test apps/native/parity/sync.test.ts: 47/47 passBuilt with Antigravity (
f5-appearance-theme).