feat(antigravity): theme polish + per-wallpaper scrim + README restructure#2
Conversation
Antigravity (shadcn / Catppuccin-Latte) template fixes in theme.rs: - reskin conversation-transcript markdown (blockquote, inline code, PrismJS syntax tokens, GFM alerts) from Latte-light leftovers to warm dark glass - repaint the per-turn sticky-header ::after and bottom scroll-fade overlays (both used the Latte light --background) to a warm-dark scrim fade - override --sidebar-secondary so the active conversation pill stops rendering as a near-white color(srgb) Catppuccin pill Per-theme scrim calibration: theme-forge shipped every theme with the same default scrim, leaving bright wallpapers under-darkened on Antigravity (chat text washed out). Tuned scrimTop/Mid/Bot per wallpaper brightness for the 8 bright themes (azurlane, sonata, zani, nailin, rose, frost, nocturne, duet); studio/carton kept the default (naturally dark wallpapers). Adds the antigravity-theme-tune workflow used to iterate the look live.
Reorganize README.md / README.en.md following the codex-app-transfer layout: NOTE callout, nav + badges, theme showcase, features, install, quick start, theme management (full theme.json schema + --cl-* knob reference), architecture (updated to Svelte + Vite), dev guide, FAQ, disclaimer, license, activity. - correct the theme count (5 -> 11) and list all built-in themes - update the stale architecture section (web/ Vanilla JS -> src/ Svelte + Vite) - add a disclaimer covering the character artwork + CDP runtime safety - add two Antigravity hero screenshots (changli / frost) under docs/antigravity/; sidebar + input text blurred for privacy
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a8428874d1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| so hover/active reads clearly on every theme without touching the shared knobs. */ | ||
| --cl-hover-strong:color-mix(in srgb,var(--cl-ink) 15%,transparent); | ||
| /* shadcn semantic tokens — the whole Antigravity agent UI is driven by these. | ||
| Override the seeds and every bg-*/text-* utility reskins at once. */ |
There was a problem hiding this comment.
Escape the CSS comment terminator
When this Antigravity CSS is injected, the bg-*/text-* text inside the comment contains */, so the browser closes the comment at bg-*/ and parses the remaining text-* utility... */ --background: transparent as a malformed declaration. That causes the intended --background: transparent override to be skipped, leaving Antigravity's light background token in effect for any surfaces/pseudo-gradients that still read the token.
Useful? React with 👍 / 👎.
| html button[aria-label="Send" i],html button[aria-label*="send" i],html button[data-testid*="send" i],html .composer-send-button{ | ||
| background:var(--cl-accent) !important;color:var(--primary-foreground) !important; | ||
| border-color:color-mix(in srgb,var(--cl-accent) 45%,transparent) !important; | ||
| } | ||
| html button[aria-label="Send" i] svg,html button[aria-label*="send" i] svg,html button[data-testid*="send" i] svg,html .composer-send-button svg{ | ||
| color:var(--primary-foreground) !important;opacity:1 !important; | ||
| } | ||
| /* model/agent selector chips: warm tint on the active/checked icon + border instead | ||
| of inert grey; also finally puts --cl-accent-soft to use. */ | ||
| html [data-state="checked"],html [data-state="on"],html [aria-selected="true"]{ | ||
| border-color:color-mix(in srgb,var(--cl-accent) 50%,transparent) !important;color:var(--cl-accent-soft) !important; | ||
| } | ||
| html [data-state="checked"] svg,html [data-state="on"] svg{color:var(--cl-accent) !important;} |
There was a problem hiding this comment.
🔴 Antigravity send button and selector chips break on accent-less themes (e.g. custom themes)
The ANTIGRAVITY_CSS_TEMPLATE has accent-dependent CSS rules (lines 708-720) placed after the __ACCENT_BLOCK__ placeholder in the main template, referencing var(--cl-accent) and var(--cl-accent-soft) without any CSS fallbacks. These custom properties are only defined inside ANTIGRAVITY_ACCENT_BLOCK, which is omitted entirely when the theme has no style.accent (the accent_block becomes String::new() at src-tauri/src/theme.rs:828).
Custom themes always have style: None (src-tauri/src/theme.rs:134), so when a user creates a custom theme and uses Antigravity, the send button gets background: var(--cl-accent) where --cl-accent is undefined → the CSS declaration becomes invalid at computed-value time → the background falls back to transparent, making the send button invisible. Similarly, checked/selected state styling (var(--cl-accent-soft) at line 718) and focus-within ring (var(--cl-focus) at lines 655-656) break.
Contrast with Codex's correct approach
In the Codex path, ALL accent-dependent rules (send button, selection) are inside CODEX_ACCENT_BLOCK (src-tauri/src/theme.rs:459-462), so they're cleanly omitted for accent-less themes. The Antigravity template should follow the same pattern.
Prompt for agents
The accent-dependent rules at lines 708-720 of src-tauri/src/theme.rs (inside ANTIGRAVITY_CSS_TEMPLATE) reference var(--cl-accent), var(--cl-accent-soft), and var(--cl-focus) without CSS fallbacks. These custom properties are only defined inside ANTIGRAVITY_ACCENT_BLOCK, which is omitted for accent-less themes (including all custom themes created via the UI).
Two possible fixes:
1. Move lines 708-720 into ANTIGRAVITY_ACCENT_BLOCK (the const at line 793), following the same pattern as CODEX_ACCENT_BLOCK which includes all accent-dependent rules (send button, selection). This way, accent-less themes get the agent's default button styling.
2. Add CSS fallbacks to every var(--cl-accent) reference in the main template, e.g. var(--cl-accent, #7aa2ff) to match the neutral blue default, and var(--cl-accent-soft, #7aa2ff) similarly. Also add fallbacks for var(--cl-focus, #7aa2ff) at lines 655-656.
Option 1 is cleaner and matches the established Codex pattern. The focus-within rule at lines 654-657 also references var(--cl-focus) without fallback and should be handled similarly.
Was this helpful? React with 👍 or 👎 to provide feedback.
概述
打磨 Antigravity 上的换肤效果(项目核心之一),并参考 codex-app-transfer 重构 README。
改动
Antigravity 主题渲染(
theme.rs)blockquote亮白块、行内code暗红、代码块 PrismJS 浅色语法、GFMmarkdown-alert品牌紫 → 暖深玻璃配色::after滚动渐隐、transcript 底部pointer-events:none渐隐遮罩(都用了浅色--background)→ 暖深 scrimbg-sidebar-secondary(color(srgb)近白)→ 暖 accent 洗;顺带修cdp.mjs::lightscan解析器支持color(srgb)记法逐壁纸 scrim 校准(8 个主题 theme.json)
theme-forge 给所有主题用了同一套默认 scrim,亮壁纸在 Antigravity 上欠压、正文糊。按壁纸亮度逐张真机调
scrimTop/Mid/Bot:azurlane / sonata / zani / nailin / rose / frost / nocturne / duet;studio / carton 壁纸本就暗,保持默认。README 重构 + 主题展示
web/Vanilla JS →src/Svelte + Vite)、补角色美术 + CDP 安全免责校验
cargo fmt --check✅ ·cargo clippy -- -D warnings✅ ·cargo test --lib7/7 ✅npm run build(Vite)✅