UI suggestion: align native desktop workbench surface with web (remove inset) - #2478
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe 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. ChangesWorkbench surface styling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
835edc3 to
ef7cf6b
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
wework/src/App.apps.test.tsx (1)
252-255: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover every removed surface style.
The change also removes shadow, background, and overflow styling. These assertions only reject
app-view-surface,rounded-xl, andborder, so a latershadow-*,bg-*, oroverflow-*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
📒 Files selected for processing (4)
docs/en/wework/workbench.mddocs/zh/wework/workbench.mdwework/src/App.apps.test.tsxwework/src/App.tsx
背景与建议
macOS 桌面端(Tauri)主区在顶部标签栏下方存在一层"浮层卡片"效果:内容左右与底部各留约
8px内边距,并带rounded-xl圆角、边框和阴影。该内圆角与 macOS 窗口自身圆角叠加,出现双重圆角和一圈灰边,视觉上不协调。Web 端(浏览器)没有这层 surface 内边距,因此建议 native 端与其保持一致(全出血)。改动内容
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 原生标题栏/交通灯)
工作台首页
e15996de2)ef7cf6b8b)并排对比 + 左缘/底缘 4× 放大(红框 = Before 的 8px 内边距带):
插件页
验证
tsc -b、eslint、prettier 通过。e15996de2,after 基于ef7cf6b8b):工作台首页与插件页均确认全出血;像素采样与 QA 记录见 qa-record.md。Summary by CodeRabbit
Style
Documentation