feat(settings): 7-pane sidebar + MCP Instructions; home 1:1 calibration (#40)#78
feat(settings): 7-pane sidebar + MCP Instructions; home 1:1 calibration (#40)#78cuic19053-hue wants to merge 4 commits into
Conversation
…:1 calibration (appergb#40) Settings: - Restructure from single-page scroll to sidebar + detail layout (mirrors upstream SettingsView.swift): 180px sidebar with icon+label rows and an active capsule on the left edge. - 8 pane entries (General, Appearance, Import, AI, MCP Instructions, Storage, Notifications, About) — the 7-pane scope from the issue, with General and Appearance kept as separate panes (upstream merges them under "general" but OpenTake's existing split is preserved). - New MCPInstructionsPane: surfaces the built-in MCP server URL (http://127.0.0.1:19789/mcp) with copy button, plus one-line install commands for Claude Code, Codex, Cursor, and Claude Desktop. Mirrors upstream Help/MCPInstructionsPane.swift, consolidated into Settings per the issue. - New StoragePane: cache + search-index fields (simplified placeholder; runtime statistics require Rust commands not yet wired). - New NotificationsPane: generation-complete toggle (front-end-only for now). Home (1:1 calibration with upstream ProjectCard.swift / HomeView.swift): - ProjectCard: hover scale 1.02 -> 1.03 (match upstream). - ProjectCard: title moved inside the thumbnail with a 60px bottom gradient overlay (upstream pattern), replacing the below-card title. - ProjectCard: relative time (today / yesterday / N days ago / N weeks ago / N months ago) replaces the raw path display, using the existing RecentProject.openedAt timestamp. - ProjectCard: delete button rounded to a circle (upstream glassEffect pattern). - NewProjectCard: hover scale 1.02 -> 1.03. i18n: 30+ new keys (zh-CN + en) for MCP, Storage, Notifications, and relative-time strings. Closes appergb#40.
appergb
left a comment
There was a problem hiding this comment.
@cuic19053-hue 自动审核结论:请修改(REQUEST_CHANGES)。代码类型安全、无冲突,但 issue #40 验收仅约 50%,且触发文件规约:
阻塞项:
- issue #40 主页 1:1 缺失:Sign in with Google 侧栏按钮、File missing 缺失态遮罩(上游 ProjectCard.swift questionmark.folder + 半透明)、SampleProjectsStrip 示例区、Update vX 徽标/WelcomeOverlay 均未实现。
- Settings 缺 pane:#40 要求 Account/Models/Notifications/Privacy/Shortcuts/Storage/MCP 共 7 个;本 PR 缺 Models/Privacy/Shortcuts/Account(对应上游 ModelsPane/PrivacyPane/ShortcutsPane)。
- SettingsView.tsx 合并后 ~884 行 > 800 规约;McpInstructionsPane ~90 行、SettingsSidebar ~75 行 > 50 行函数规约。请按上游模式拆为独立文件(McpInstructionsPane.tsx / StoragePane.tsx / NotificationsPane.tsx 等)。
其他(建议一并修):MCP 配置 Cursor 缺 type:http 字段、Claude Desktop 错用 Cursor 的 url 格式(上游用 npx mcp-remote);StoragePane 清缓存是 no-op 却显示成功;NotificationsPane 开关未持久化(上游走 UserDefaults)。请补齐后重新提交并自验 tsc + pnpm build。
- Split SettingsView.tsx into 12 panes + shared.tsx + SettingsSidebar (now 108 lines) - Add 4 new Settings panes: Models, Privacy, Shortcuts, Account - Add 4 home UI features: Sign in, File missing overlay, SampleProjectsStrip, Update badge + WelcomeOverlay - Fix MCP Cursor config: add type:http field - Fix MCP Claude Desktop config: use npx mcp-remote format - Fix StoragePane: show 'coming soon' instead of fake success - Fix NotificationsPane: persist toggle to localStorage
|
All 7 reviewer feedback items addressed: Blockers (3):
Suggestions (4): Changes: 18 files, +1542 / -828 lines (web/ only, no Rust backend changes) |
|
Closing as superseded by #155, which has been merged into main and includes this work in the integrated codebase. Keeping this PR closed avoids duplicate/conflicting review paths. |
|
Superseded by merged integration PR #155. |
Summary
Implements Issue #40: Settings multi-pane layout with MCP Instructions + Home 1:1 calibration.
Closes #40.
Changes
Settings — sidebar + detail layout (7 panes + MCP Instructions)
SettingsView.tsxfrom single-page scroll to a sidebar + detail layout (mirrors upstreamSettings/SettingsView.swift): 180px sidebar with icon + label rows and an active capsule on the left edge.McpInstructionsPane(the headline feature): surfaces the built-in MCP server URL (http://127.0.0.1:19789/mcp) with a copy button, plus one-line install commands for:claude mcp add --transport http opentake http://127.0.0.1:19789/mcpcodex mcp add opentake --url http://127.0.0.1:19789/mcpmcpServersclaude_desktop_config.jsonHelp/MCPInstructionsPane.swift, consolidated into Settings per the issue.StoragePane: cache + search-index fields (simplified placeholder; runtime statistics require Rust commands not yet wired — called out explicitly in the UI).NotificationsPane: generation-complete toggle (front-end-only for now; wiring to system notifications is a follow-up).Home — 1:1 calibration with upstream
ProjectCard.swift/HomeView.swift1.02→1.03(match upstreamProjectCard.swift:97).RecentProject.openedAttimestamp. Mirrors upstreamRelativeDateTimeFormatter.glassEffectpattern).1.02→1.03.i18n
Verification
pnpm tsc --noEmit— passespnpm build— passes (vite build OK)Notes
http://127.0.0.1:19789/mcpbecause the Rust server (opentake-agent::mcp::server::DEFAULT_ADDR) binds to a fixed port. A follow-up could add amcp_get_statusTauri command to surface runtime state (running/stopped, actual port).StoragePaneandNotificationsPaneare intentionally lightweight — they establish the pane structure and surface the UX, with backend wiring left for follow-ups (cache-clear command, system notification integration).