Skip to content

feat(wework): match Codex archive settings and fix plugin navigation - #1921

Merged
qdaxb merged 2 commits into
wecode-ai:mainfrom
icycrystal4:codex/feat-wework-archived-settings-ui
Jul 13, 2026
Merged

qdaxb merged 2 commits into
wecode-ai:mainfrom
icycrystal4:codex/feat-wework-archived-settings-ui

Conversation

@icycrystal4

@icycrystal4 icycrystal4 commented Jul 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • rebuild the archived tasks settings page to match the current Codex layout and interactions
  • add a dedicated Coding settings category and move Worktrees out of Integrations
  • keep the homepage sidebar mounted while opening Plugins and route sidebar task selections back to the runtime task page

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 /plugins after opening a sidebar task, which caused a visible sidebar refresh/jitter and made the selected task appear not to open.

Impact

  • archived tasks now use combined type/sort filtering, project filtering and grouping, project-level deletion, compact persistent row actions, and localized task counts
  • global and project deletion retain the existing runtime work APIs and cleanup/progress behavior, without Backend, Executor, database, or public API changes
  • Worktrees remains at /settings/worktrees with its existing test IDs, now under Coding
  • Plugins, Plugin Management, and Plugin Create routes consistently navigate to the selected runtime task

Task

  • 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)
  • Wework ESLint passed
  • Wework TypeScript check passed
  • Wework production build passed
  • repository pre-push quality checks passed, including Wework tests and Executor cargo test / cargo clippy
  • manual Wework UI verification completed by the requester

Summary by CodeRabbit

  • New Features

    • Archived conversations are now presented as archived tasks with search, filtering, sorting, project grouping, and project-level actions.
    • Added bulk, project, and individual task deletion with progress tracking and clearer error reporting.
    • Added a dedicated Coding settings category for worktrees.
    • Runtime tasks opened from plugin pages now navigate directly to the runtime task view.
  • Improvements

    • Action menus support bottom-end placement, Escape-to-close behavior, and improved accessibility.
    • Updated English and Chinese labels, empty states, filters, and deletion dialogs.

@coderabbitai

coderabbitai Bot commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Archived task management

Layer / File(s) Summary
Archived task filters, groups, and menus
wework/src/components/common/ActionMenu.tsx, wework/src/components/settings/ArchivedConversationsSettingsContent.tsx
Adds reusable filters, grouped task rows, project actions, configurable menu placement, Escape handling, and accessibility attributes.
Archived task grouping and deletion flow
wework/src/components/settings/ArchivedConversationsSettingsPage.tsx
Replaces cleanup-oriented handling with project grouping, filtering, project/all-task deletion, progress tracking, operation errors, and distinct empty states.
Archived task tests and translations
wework/src/components/settings/ArchivedConversationsSettingsPage.test.tsx, wework/src/i18n/locales/*/common.json
Updates coverage and localized strings for archived-task filters, grouping, deletion, progress, failures, and empty states.

Settings navigation

Layer / File(s) Summary
Coding settings category
wework/src/components/settings/ConnectionsSettingsPage.tsx, wework/src/components/settings/*SettingsPage.test.tsx, wework/src/i18n/locales/*/common.json
Adds the coding category, moves worktrees into it, and expands desktop/mobile navigation assertions.

Plugin runtime navigation

Layer / File(s) Summary
Plugin runtime-task routing
wework/src/pages/plugin-route-navigation.ts, wework/src/pages/Plugin*Page.tsx, wework/src/pages/PluginsPage.tsx, wework/src/App.plugins.test.tsx
Standardizes runtime-task opening through a route-aware callback, removes the desktop sidebar placeholder gate, and verifies navigation to runtime-task routes.

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
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 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 two main changes: archived settings alignment and plugin navigation fixes.
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.

@icycrystal4
icycrystal4 marked this pull request as ready for review July 13, 2026 10:51

@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.

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 win

Single-item delete has no error handling. Unlike the bulk path (which sets operationError in a catch), a rejected deleteArchivedConversation propagates out unhandled: the confirm dialog stays open (setPendingDelete(null) is never reached), no error is surfaced to the user, and only busyKey is reset. Wrap the awaited call in a try/catch that reports via setOperationError, 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

📥 Commits

Reviewing files that changed from the base of the PR and between fc21e45 and 0185142.

📒 Files selected for processing (14)
  • wework/src/App.plugins.test.tsx
  • wework/src/components/common/ActionMenu.tsx
  • wework/src/components/settings/ArchivedConversationsSettingsContent.tsx
  • wework/src/components/settings/ArchivedConversationsSettingsPage.test.tsx
  • wework/src/components/settings/ArchivedConversationsSettingsPage.tsx
  • wework/src/components/settings/ConnectionsSettingsPage.test.tsx
  • wework/src/components/settings/ConnectionsSettingsPage.tsx
  • wework/src/components/settings/MobileSettingsPage.test.tsx
  • wework/src/i18n/locales/en/common.json
  • wework/src/i18n/locales/zh-CN/common.json
  • wework/src/pages/PluginCreatePage.tsx
  • wework/src/pages/PluginManagementPage.tsx
  • wework/src/pages/PluginsPage.tsx
  • wework/src/pages/plugin-route-navigation.ts

@qdaxb
qdaxb merged commit daca0dc into wecode-ai:main Jul 13, 2026
19 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