Repository navigation
feat(wework): match Codex archive settings and fix plugin navigation - #1921
Conversation
📝 WalkthroughWalkthroughThe change refactors archived conversations into grouped archived-task management, adds filtering and deletion flows, introduces a coding settings category, improves menu behavior, and standardizes runtime-task navigation from plugin pages. ChangesArchived task management
Settings navigation
Plugin runtime navigation
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant PluginSidebar
participant RuntimeTaskOpener
participant Workbench
participant RuntimeTasksRoute
PluginSidebar->>RuntimeTaskOpener: submit task address
RuntimeTaskOpener->>Workbench: openRuntimeTask(address)
Workbench-->>RuntimeTaskOpener: task opened
RuntimeTaskOpener->>RuntimeTasksRoute: navigate with task query parameters
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
wework/src/components/settings/ArchivedConversationsSettingsPage.tsx (1)
502-519: 🩺 Stability & Availability | 🟡 Minor | ⚡ Quick winSingle-item delete has no error handling. Unlike the bulk path (which sets
operationErrorin acatch), a rejecteddeleteArchivedConversationpropagates out unhandled: the confirm dialog stays open (setPendingDelete(null)is never reached), no error is surfaced to the user, and onlybusyKeyis reset. Wrap the awaited call in atry/catchthat reports viasetOperationError, mirroring the bulk branch.🛡️ Suggested error handling
const { item } = pendingDelete const key = `delete:${item.id}` setBusyKey(key) try { const response = await api.deleteArchivedConversation(archivedConversationAddress(item)) const cleanupText = cleanupErrorsFromResults([response as unknown as Record<string, unknown>]) if (cleanupText) { setOperationError( t('workbench.archived_cleanup_partial_failed', '部分文件清理失败: {{message}}', { message: cleanupText, }) ) } setItems(currentItems => currentItems.filter(currentItem => currentItem.id !== item.id)) setPendingDelete(null) + } catch (deleteError) { + const message = deleteError instanceof Error ? deleteError.message : '' + setOperationError( + message + ? t('workbench.archived_bulk_delete_failed_detail', '删除已归档任务失败:{{message}}', { + message, + }) + : t('workbench.archived_bulk_delete_failed', '删除已归档任务失败') + ) } finally { setBusyKey(null) }🤖 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/components/settings/ArchivedConversationsSettingsPage.tsx` around lines 502 - 519, Update the single-item delete flow around deleteArchivedConversation to add a catch handler that reports rejected deletions through setOperationError, matching the bulk delete branch. Preserve the existing cleanup, item removal, pending-dialog reset on success, and busyKey reset in finally.
🤖 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.
Outside diff comments:
In `@wework/src/components/settings/ArchivedConversationsSettingsPage.tsx`:
- Around line 502-519: Update the single-item delete flow around
deleteArchivedConversation to add a catch handler that reports rejected
deletions through setOperationError, matching the bulk delete branch. Preserve
the existing cleanup, item removal, pending-dialog reset on success, and busyKey
reset in finally.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2ade553d-b120-4c34-8d00-a0fddb668bb1
📒 Files selected for processing (14)
wework/src/App.plugins.test.tsxwework/src/components/common/ActionMenu.tsxwework/src/components/settings/ArchivedConversationsSettingsContent.tsxwework/src/components/settings/ArchivedConversationsSettingsPage.test.tsxwework/src/components/settings/ArchivedConversationsSettingsPage.tsxwework/src/components/settings/ConnectionsSettingsPage.test.tsxwework/src/components/settings/ConnectionsSettingsPage.tsxwework/src/components/settings/MobileSettingsPage.test.tsxwework/src/i18n/locales/en/common.jsonwework/src/i18n/locales/zh-CN/common.jsonwework/src/pages/PluginCreatePage.tsxwework/src/pages/PluginManagementPage.tsxwework/src/pages/PluginsPage.tsxwework/src/pages/plugin-route-navigation.ts
Summary
Why
The archived settings UI had diverged from Codex, and Worktrees was grouped under Integrations instead of Coding. The homepage Plugins route also deferred mounting the desktop sidebar and did not leave
/pluginsafter opening a sidebar task, which caused a visible sidebar refresh/jitter and made the selected task appear not to open.Impact
/settings/worktreeswith its existing test IDs, now under CodingTask
qjtigcmwpk/1022749_3#72292— 复刻设置页Worktree与归档Validation
pnpm --filter wework exec vitest run src/App.plugins.test.tsx src/components/settings/ArchivedConversationsSettingsPage.test.tsx src/components/settings/ConnectionsSettingsPage.test.tsx src/components/settings/MobileSettingsPage.test.tsx(63 tests passed)cargo test/cargo clippySummary by CodeRabbit
New Features
Improvements