Skip to content

feat(antigravity): theme polish + per-wallpaper scrim + README restructure#2

Merged
Cmochance merged 2 commits into
mainfrom
antigravity-theme-polish-readme
Jun 1, 2026
Merged

feat(antigravity): theme polish + per-wallpaper scrim + README restructure#2
Cmochance merged 2 commits into
mainfrom
antigravity-theme-polish-readme

Conversation

@Cmochance
Copy link
Copy Markdown
Owner

概述

打磨 Antigravity 上的换肤效果(项目核心之一),并参考 codex-app-transfer 重构 README。

改动

Antigravity 主题渲染(theme.rs)

  • 对话正文 markdown 重映射:blockquote 亮白块、行内 code 暗红、代码块 PrismJS 浅色语法、GFM markdown-alert 品牌紫 → 暖深玻璃配色
  • 修掉两类 Catppuccin-Latte 浅色泄漏:每条消息吸顶表头的 ::after 滚动渐隐、transcript 底部 pointer-events:none 渐隐遮罩(都用了浅色 --background)→ 暖深 scrim
  • 选中会话 pill bg-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 重构 + 主题展示

  • 参考 codex-app-transfer 结构(NOTE 提示 / 徽章 / 主题展示 / 功能 / 安装 / 快速开始 / 主题管理 / 架构 / FAQ / 免责 / 活跃度)
  • 修正主题数 5 → 11、更新架构(web/ Vanilla JS → src/ Svelte + Vite)、补角色美术 + CDP 安全免责
  • 新增 2 张 Antigravity hero 图(changli / frost),侧栏与输入框文字已模糊

校验

  • cargo fmt --check ✅ · cargo clippy -- -D warnings ✅ · cargo test --lib 7/7 ✅
  • npm run build(Vite)✅

主题旋钮(theme.json style)与 Codex 共享;本次按 Antigravity 可读性调整 scrim,对 Codex 单层 scrim 是更温和的同向加强(亮壁纸两边都受益),Codex 侧真机复验待后续单独 pass。

Cmochance added 2 commits June 1, 2026 15:27
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
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src-tauri/src/theme.rs
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. */
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@Cmochance Cmochance merged commit e41f3c2 into main Jun 1, 2026
2 checks passed
@Cmochance Cmochance deleted the antigravity-theme-polish-readme branch June 1, 2026 07:33
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment thread src-tauri/src/theme.rs
Comment on lines +708 to +720
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;}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant