Skip to content

feat(desktop): reconstruct UI visual texture, tokens, shell, worklog, and composer - #1983

Merged
NanmiCoder merged 3 commits into
mainfrom
feat/reconstruct-ui-texture
Nov 22, 2026
Merged

NanmiCoder merged 3 commits into
mainfrom
feat/reconstruct-ui-texture

Conversation

@NanmiCoder

Copy link
Copy Markdown
Owner

Summary

Reconstructs the desktop UI visual system and surface craftsmanship across tokens, primitives, Electron window chrome, app shell, sidebar, conversation stream, composer, and secondary settings/product surfaces:

  • Tokens & Textures (desktop/src/theme/globals.css, systemAppearance.ts, index.html):
    • Upgrades default white to crisp Cold Porcelain (#FCFCFC canvas / #FFFFFF card / #1D4ED8 cobalt accent) and default dark neutral-dark to true black OLED (#000000 canvas / #111111 card / #346BF1 cobalt accent), preserving all legacy palettes (paper, warm-classic, celadon, dark, ink-blue) and full WCAG contrast gates.
    • Adds Safari 15-safe texture utilities (zero color-mix()): .surface-grain, @layer components .control-bevel / .control-bevel-cta (1px light bottom bevel / dark top specular rim + press feedback), layered frosted glass (0.82–0.86 + @supports opaque fallback), .topbar-scroll-fade, .scroll-edge-fade, .scrollbar-autohide, and stepped low-GPU keyframes.
  • UI Primitives (desktop/src/components/ui/**):
    • Upgrades Button, IconButton, Input, TextArea, SelectField, SearchField, Switch, Checkbox, SegmentedControl, Dropdown, Tooltip, Modal, ActionDialog, ConfirmDialog, Card, Badge, and Skeleton with tactile bevels, frosted popovers, and tabular-nums.
    • Adds reusable Kbd / KbdGroup and ScrollArea primitives, indexed in desktop/src/components/AGENTS.md and ComponentGallery.tsx.
  • Electron Chrome, Shell, Topbar & Sidebar (desktop/electron/**, desktop/src/components/layout/**, desktop/src/components/workbench/**):
    • Dynamically centers macOS traffic lights (x = 16, y = Math.round((52 * zoomFactor) / 2 - 7)) across zoom levels and syncs pre-paint #FCFCFC / #000000 backgrounds.
    • Frames <main> as a floating inset canvas (SidebarInset) over the grained sidebar frame, simplifies TabBar to a borderless capsule strip, moves WorkspaceTabStrip inside WorkspaceSurface, streamlines layout toggles, and upgrades sidebar session items with SidebarSessionCard, top navigation (Scheduled Tasks / Phone / Connectors), and <ScrollArea autohide>.
  • Chat Stream, WorkLog & Composer (desktop/src/components/chat/**, desktop/src/components/controls/**, desktop/src/pages/EmptySession.tsx):
    • De-noises routine tool calls, tool groups, and thinking blocks into borderless WorkLog rows while keeping elevated cards for Plan, ChangedFiles, CodeViewer, and Permission/Question approvals (fixing ExitPlanModePermissionDialog Cmd/Ctrl+Enter feedback handling and platform-aware shortcut keycaps).
    • Upgrades ChatInput and EmptySession to a floating .composer-glass card with a clean under-card context strip, docked effort + permissions shortcut inside ModelSelector, and centered Draft Hero layout.
  • Settings & Secondary Surfaces (desktop/src/pages/Settings.tsx, pages/settings/**, market/, connectors/, tasks/, agentTeams/, features/tokenUsage/):
    • Keeps Settings inline beside the sidebar with live category search (/ shortcut guarded against nested dialogs), grouped elevated SettingsGroup cards, and unified surface polish across Extensions, Scheduled Tasks, Agent Teams, and Token Usage.

Feature Quality Contract

  • Changed surface: desktop, native (Electron window chrome)
  • Tests added or updated:
    • Added Kbd.test.tsx, ScrollArea.test.tsx, SidebarSessionCard.test.tsx
    • Added/updated regression tests across desktop/src/theme/*.test.ts, desktop/electron/services/windows.test.ts, nativeAppearance.test.ts, desktop/src/components/ui/*.test.tsx, layout/*.test.tsx, chat/*.test.tsx, controls/*.test.tsx, pages/*.test.tsx, and settings/*.test.tsx
  • Coverage evidence:
    • bun run check:desktop passed (691/691 Vitest test files, eslint, tsc --noEmit, tsc -b, vite build, build:h5-mobile) on merged HEAD c160da6ff (base origin/main 2cfc4dd21)
    • Full CI coverage lane runs in GitHub Actions on this PR
  • E2E / live-model evidence:
    • bun run check:desktop-ui-smoke: PASSED (desktop-ui-smoke 16.1s + desktop-ui-replay 8.5s) against deterministic mock CLI/replay; live model checks not run (no provider quota used)
    • bun run check:persistence-upgrade: PASSED (48/48 migration tests)
    • Live desktop macOS arm64 DMG built (MAC_TARGETS=dmg bash ./desktop/scripts/build-macos-arm64.sh) and package-smoke passed; visual inspection completed across Light (white) and OLED Dark (neutral-dark)
  • Known risk / rollback:
    • Broad CSS and desktop UI surface touch across 149 files; all legacy themes and persisted localStorage keys remain backward-compatible. Can be cleanly reverted via git revert -m 1 on the merge commit.

Verification

  • I ran the relevant local checks, or explained why they do not apply.
  • I added or updated same-area tests for every production behavior change.
  • I ran the checks selected by bun run check:impact (check:desktop, check:persistence-upgrade, check:desktop-ui-smoke, plus package-smoke via macOS arm64 DMG build); remaining cross-surface lanes run in GitHub Actions PR CI.
  • New or changed executable production lines include matching regression tests; CI coverage gate runs on this PR.
  • I summarized local verification pass counts above (check:desktop 691/691 files, check:persistence-upgrade 48/48, check:desktop-ui-smoke passed).
  • I ran deterministic E2E/smoke checks (check:desktop-ui-smoke); live-model checks explicitly not run.

Risk

  • This PR does not touch CLI core paths (src/ untouched; desktop/electron only).
  • Production code changes include matching tests.
  • No coverage baseline/threshold changes.
  • No quarantine-policy changes.
  • No provider/runtime changes.

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

PR quality triage

Changed areas: area:desktop, area:docs

CLI core policy: No CLI-core policy block detected.

Missing-test policy: No missing-test policy block detected.

Coverage baseline policy: No coverage-baseline policy block detected.

CLI core files:

  • none

Coverage policy files:

  • none

Required check plan:

  • See PR Quality / scope-plan; it is the single source of truth for selected jobs.

Test coverage signals:

  • No obvious missing-test signal from changed paths.

Risk notes:

  • Desktop state/API layer changed: verify store persistence, WebSocket behavior, and startup errors.

Hard merge gates come from the deterministic GitHub Actions contract lanes above.

@NanmiCoder
NanmiCoder merged commit 3a6ba46 into main Nov 22, 2026
20 checks passed
@NanmiCoder
NanmiCoder deleted the feat/reconstruct-ui-texture branch November 22, 2026 17:46
mojie126 added a commit to mojie126/cc-haha that referenced this pull request Nov 23, 2026
…Coder#1982 与问询卡 Markdown、引导折叠与 Windows 路径修复

- 移植上游 NanmiCoder#1982 索引监听过滤、子代理增量投影与重试、查询中止信号、子代理页终态停止轮询
- 移植上游 NanmiCoder#1981 侧边栏会话菜单锚点定位与 portal,聊天滚动不再关闭侧边栏菜单
- 移植上游 NanmiCoder#1977 Grok 官方上下文窗口解析、目录按账号隔离与按模型覆盖
- 移植上游 NanmiCoder#1980 移动端屏幕常亮、后台暂停心跳与重连、前台提示宽限重算
- 摘取上游 NanmiCoder#1983 的 Kbd 组件、权限卡与计划卡快捷键、计划反馈提交修订与长计划折叠
- 问询卡的问题、选项与说明改用 Markdown 渲染,卡片内链接不连带选中所在选项
- 后台唤醒段只有回执时折叠,真正执行了工具的唤醒段保持展开,避免用户引导后的收尾结论被隐藏
- 输入框项目与分支胶囊去掉 leading-none,被截断文字的伸部笔画不再被溢出裁掉
- 桌面跨平台路径断言按斜杠归一化,主题与调色板守卫在 Windows 可运行,补齐 missing 的持久化迁移断言
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant