Skip to content

UI suggestion: align native desktop workbench surface with web (remove inset) - #2478

Merged
qdaxb merged 2 commits into
wecode-ai:mainfrom
qwertyerge:fix/wework-remove-native-surface-inset
Aug 7, 2026
Merged

UI suggestion: align native desktop workbench surface with web (remove inset)#2478
qdaxb merged 2 commits into
wecode-ai:mainfrom
qwertyerge:fix/wework-remove-native-surface-inset

Conversation

@qwertyerge

@qwertyerge qwertyerge commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

⚠️ 性质说明:这是一次 UI 建议性 PR(Suggestion),不是 bug fix,也不是 feature 提交。

本改动只是提出一种桌面端视觉呈现方案,供维护者评估是否采用:让 native(Tauri)端主区与 web 端保持一致,去掉内层卡片的 8px 内边距与圆角/边框/阴影。

  • 不包含任何功能、逻辑、数据或行为变更;
  • web 端代码路径完全不变,AppIframe(云端应用 iframe)样式刻意保留;
  • 改动集中在 wework/src/App.tsx 一个条件分支,若不采纳可无痛 revert。

如果维护者认为该视觉方案不应采用,直接关闭本 PR 即可,无需额外处理。

背景与建议

macOS 桌面端(Tauri)主区在顶部标签栏下方存在一层"浮层卡片"效果:内容左右与底部各留约 8px 内边距,并带 rounded-xl 圆角、边框和阴影。该内圆角与 macOS 窗口自身圆角叠加,出现双重圆角和一圈灰边,视觉上不协调。Web 端(浏览器)没有这层 surface 内边距,因此建议 native 端与其保持一致(全出血)。

补充观察:macOS 窗口聚焦时头部与主区容器底色存在色差,内层卡片边距才明显;失焦时两者底色一致,前后看起来都协调。以下截图均为真实 Tauri 会话、同一窗口位置 1280×720 的窗口级捕获,按聚焦外观渲染,状态一致可对比。

改动内容

  • wework/src/App.tsx:移除 native 端 workbench / auxiliary surface 上的 app-view-surface + 圆角/边框/阴影包裹,恢复全出血(h-full)容器;web 端路径不变,AppIframe 保留 app-view-surface
  • wework/src/App.apps.test.tsx:断言更新为 surface 仅含 h-full 且不含 app-view-surface / rounded-xl / border,并锁定 AppIframe 仍保留 app-view-surface
  • docs/zh|en/wework/workbench.md:更新为"标题栏下方全宽桌面内容容器"。

截图对比(窗口级,含 macOS 原生标题栏/交通灯)

工作台首页

Before(父提交 e15996de2) After(ef7cf6b8b)
before-home after-home

并排对比 + 左缘/底缘 4× 放大(红框 = Before 的 8px 内边距带):

home-compare

home-left

home-bottom

插件页

Before After
before-plugins after-plugins

plugins-compare

plugins-left

plugins-bottom

验证

  • 完整单元测试:307 files / 2992 tests 全部通过;tsc -b、eslint、prettier 通过。
  • 真实 Tauri 验证(before 基于 e15996de2,after 基于 ef7cf6b8b):工作台首页与插件页均确认全出血;像素采样与 QA 记录见 qa-record.md

Summary by CodeRabbit

  • Style

    • Updated workbench and workspace surfaces to use a full-height, full-width layout beneath the title bar.
    • Removed rounded borders and legacy surface styling from desktop content areas.
    • Preserved consistent sidebar positioning and appearance.
    • Retained the existing styled surface for Agent iframe content.
  • Documentation

    • Updated English and Chinese workbench documentation to reflect the revised desktop layout.

The native Tauri workbench and auxiliary pages were wrapped in an
`app-view-surface` floating card (8px side/bottom insets plus rounded
corners, border and shadow) below the chrome titlebar. On macOS this
doubled with the platform window corners and looked uncoordinated; the
web side never had this surface inset.

Drop the inset-card treatment for both shared surfaces so native content
is full-bleed below the titlebar, and update the App tests plus zh/en
workbench docs accordingly. Embedded cloud app iframes (AppIframe)
intentionally keep their own app-view-surface treatment on both web and
native.
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9333fdf7-06ef-4687-8347-cc27434b3e9b

📥 Commits

Reviewing files that changed from the base of the PR and between ef7cf6b and 1eeef9f.

📒 Files selected for processing (1)
  • wework/src/App.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • wework/src/App.tsx

📝 Walkthrough

Walkthrough

The workbench and app-center containers now use full-height, full-bleed surfaces without rounded borders. Tests validate the updated classes and preserve Agent iframe styling. Documentation describes the new desktop content container behavior.

Changes

Workbench surface styling

Layer / File(s) Summary
Full-height surface implementation
wework/src/App.tsx
Workbench and auxiliary containers no longer use Tauri-dependent rounded, bordered desktop surface classes. They use h-full while preserving routing and visibility behavior.
Surface validation and documentation
wework/src/App.apps.test.tsx, docs/en/wework/workbench.md, docs/zh/wework/workbench.md
Tests verify full-height surfaces and preserve app-view-surface on the Agent iframe. Documentation describes the full-bleed content container and stable sidebar behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: removing the native desktop workbench inset to align its surface with the web presentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qwertyerge
qwertyerge force-pushed the fix/wework-remove-native-surface-inset branch from 835edc3 to ef7cf6b Compare August 7, 2026 05:17
@qwertyerge qwertyerge changed the title fix(wework): remove native desktop surface inset UI suggestion: align native desktop workbench surface with web (remove inset) Aug 7, 2026
@qwertyerge
qwertyerge marked this pull request as ready for review August 7, 2026 05:39

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
wework/src/App.apps.test.tsx (1)

252-255: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover every removed surface style.

The change also removes shadow, background, and overflow styling. These assertions only reject app-view-surface, rounded-xl, and border, so a later shadow-*, bg-*, or overflow-* regression could pass. Assert the exact removed class tokens for both native surfaces.

Also applies to: 298-301

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wework/src/App.apps.test.tsx` around lines 252 - 255, Expand the assertions
for both native surfaces in the desktop auxiliary surface tests to reject every
removed style token, including the relevant shadow, background, and overflow
classes, in addition to app-view-surface, rounded-xl, and border. Apply the same
complete class coverage to both assertion blocks.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@wework/src/App.apps.test.tsx`:
- Around line 252-255: Expand the assertions for both native surfaces in the
desktop auxiliary surface tests to reject every removed style token, including
the relevant shadow, background, and overflow classes, in addition to
app-view-surface, rounded-xl, and border. Apply the same complete class coverage
to both assertion blocks.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: b54f1fd9-ace5-4208-baf2-91f6f8d117e2

📥 Commits

Reviewing files that changed from the base of the PR and between b30058e and ef7cf6b.

📒 Files selected for processing (4)
  • docs/en/wework/workbench.md
  • docs/zh/wework/workbench.md
  • wework/src/App.apps.test.tsx
  • wework/src/App.tsx

@qdaxb qdaxb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@qdaxb
qdaxb enabled auto-merge August 7, 2026 10:28
@qdaxb
qdaxb added this pull request to the merge queue Aug 7, 2026
Merged via the queue into wecode-ai:main with commit 4539639 Aug 7, 2026
47 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.

2 participants