Skip to content

feat(ui): implement extensible theme system with dark/light modes#7

Merged
Shadow-Azure merged 8 commits into
mainfrom
feat/theme-system
May 20, 2026
Merged

feat(ui): implement extensible theme system with dark/light modes#7
Shadow-Azure merged 8 commits into
mainfrom
feat/theme-system

Conversation

@Shadow-Azure

Copy link
Copy Markdown
Owner

Summary

  • Add VS Code-inspired CSS custom property theme architecture with dark/light modes
  • Replace hardcoded Tokyo Night colors with semantic --sandbox-* CSS custom properties
  • Add VS Code Light theme (white bg, #f3f3f3 surfaces, #0090f1 accent)
  • Redesign layout with 32px header bar bridging native macOS title bar and terminal content
  • Reduce xterm top padding from 48px to 8px — eliminates the dark gap
  • Theme toggle button in header bar persists choice to localStorage
  • Extensible ThemeRegistry — add future themes with one registry.register() call

Test plan

  • pnpm typecheck passes
  • pnpm test:unit passes
  • pnpm build succeeds
  • Visual: verify no dark gap between title bar and terminal in both themes
  • Visual: verify theme toggle switches between Tokyo Night and VS Code Light
  • Visual: verify terminal colors update on theme switch

🤖 Generated with Claude Code

Add VS Code-inspired CSS custom property theme architecture supporting
Tokyo Night (dark) and VS Code Light themes. Replace hardcoded colors
with semantic tokens. Redesign layout with a 32px header bar that
bridges the native macOS title bar and terminal content, eliminating
the 48px dark padding gap.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

github-actions Bot commented May 20, 2026

Copy link
Copy Markdown

🔒 门禁检查结果

检查项 状态
Rust 格式化 ✅ success
Rust Clippy ✅ success
Rust 测试 ✅ success
安全检查 ✅ success

Rust 测试覆盖率

指标 覆盖率
行覆盖率 73.8%
分支覆盖率 0.0%
模块 行覆盖率
crates.sandbox-core.src.automation █████████░░░░░░░░░░░ 45.3%
crates.sandbox-core.src.capture ██████████░░░░░░░░░░ 50.0%
crates.sandbox-core.src.process ███████████░░░░░░░░░ 56.2%
crates.sandbox-core.src.sandbox ███████████████████░ 98.2%
crates.sandbox-core.src.server ██████████████████░░ 94.8%
crates.sandbox-core.src.instance ███████████████████░ 98.7%

详细报告见 Rust 覆盖率 artifact

✅ 所有检查通过,可以合入

点击 Squash and merge 合并此PR

ZN-Ice and others added 7 commits May 20, 2026 20:32
AXUIElementCopyAttributeValue crashed with SIGSEGV when called with
invalid pointers (e.g. address 0x9). Added triple validation before
every AX call: null check, address range check (MIN_VALID_PTR=0x1000),
and AXUIElementGetPid validation. Also fixed theme switch bug where
terminal content was lost by updating xterm theme in-place instead
of disposing and recreating the terminal.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The Tauri window had a visible black border around the webview content
caused by the default opaque window background. Fixed by enabling
transparent window mode with no native decorations, using our custom
header bar as the title bar. Added macOS traffic light spacing and
window drag region for proper frameless window behavior.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Restructure the sandbox window UI from single-panel to a professional
three-panel layout matching the Atlas-style design:
- Dark sidebar with logo, navigation, and instance list
- Main dashboard with terminal card (resource stats), screenshot button, and instances list
- Right detail panel with sandbox status, tools, network, and files info

Extended theme system with 5 new tokens (sidebarBg/Fg/Border/Active, panelBg)
for consistent theming across both dark and light modes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Terminal now fills the entire middle panel (removed fixed 320px height)
- Removed Instances list from Dashboard (kept only in sidebar)
- Sidebar shows actual command (e.g., "claude -p 你是谁?") instead of sandbox ID
- Fetches command from Tauri IPC get_sandbox_config

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… tests

- Remove right detail panel, terminal fills full width
- Simplify sidebar to instances list + dark/light mode toggle only
- Use titleBarStyle "Overlay" for native macOS traffic light buttons
- Add min window size (800x500) and center on launch
- Add logging to CLI start and Tauri arg parsing for debugging
- Add 17 unit tests covering arg parsing, config construction,
  kind derivation, and CLI→Tauri round-trip scenarios

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Set Tauri window title to empty string to remove "System Test Sandbox" text next to traffic light buttons
- Replace sandbox ID with actual command name in Dashboard card header
- Remove unused health state and HealthResponse import

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@Shadow-Azure
Shadow-Azure merged commit 22e0ceb into main May 20, 2026
6 checks passed
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