Skip to content

fix(wework): preserve attachment-only tasks in sidebar - #2073

Merged
qdaxb merged 2 commits into
mainfrom
fix/wework-attachment-only-sidebar
Jul 20, 2026
Merged

qdaxb merged 2 commits into
mainfrom
fix/wework-attachment-only-sidebar

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

What

  • identify sidebar tasks strictly by device and task ID
  • remove title/workspace duplicate inference in the frontend reducer and Executor task collection
  • add a real Tauri E2E flow for two same-title attachment-only tasks across refresh and app reopen
  • document the task identity invariant in Chinese and English

Why

Attachment-only tasks use the default title 新对话. The previous title/workspace heuristic treated a second distinct task as the resolved form of the first optimistic task, so one row disappeared after authoritative refresh.

Impact

Distinct same-title tasks remain visible. Exact task-ID reconciliation is unchanged, and task bodies are not cached or duplicated.

Verification

  • pnpm --filter wework exec vitest run src/features/workbench/workbenchReducer.test.ts (25 passed)
  • pnpm --filter wework typecheck
  • cargo test --manifest-path executor/Cargo.toml --test app_runtime_work_workspace_contract runtime_task_list_keeps_distinct_tasks_with_matching_titles
  • pnpm --filter wework e2e:desktop:attachment-only-sidebar
  • pre-push: Wework ESLint, TypeScript, unit tests; Executor fmt, lib tests, clippy

Summary by CodeRabbit

  • New Features

    • Added support for attachment-only task submissions in the desktop workflow.
    • Attachment-only tasks now appear correctly in the sidebar, including after reopening or refreshing the app.
  • Bug Fixes

    • Tasks with matching titles are now kept as separate entries instead of being incorrectly merged or removed.
    • Sidebar task identity now consistently distinguishes tasks by device and task ID, rather than display details.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 49c92b25-8fe5-4d5f-ad1a-40a1f9df69ff

📥 Commits

Reviewing files that changed from the base of the PR and between 3a8eabb and 20190f8.

📒 Files selected for processing (9)
  • docs/en/developer-guide/wework-codex-sidebar.md
  • docs/zh/developer-guide/wework-codex-sidebar.md
  • executor/src/runtime_work/handler.rs
  • executor/tests/app_runtime_work_workspace_contract.rs
  • wework/e2e/desktop/task-flow.e2e.mjs
  • wework/package.json
  • wework/src/e2e/automation.ts
  • wework/src/features/workbench/workbenchReducer.test.ts
  • wework/src/features/workbench/workbenchReducer.ts

📝 Walkthrough

Walkthrough

The PR defines task identity by state-owning device and task ID, removes title-based shadow filtering, preserves distinct optimistic tasks, and adds an attachment-only desktop E2E flow with file-drop automation and scenario validation.

Changes

Task identity and attachment-only sidebar validation

Layer / File(s) Summary
Task identity and refresh merging
docs/{en,zh}/developer-guide/wework-codex-sidebar.md, executor/src/runtime_work/handler.rs, executor/tests/..., wework/src/features/workbench/...
Task merging no longer uses title, workspace path, or runtime kind to infer duplicates; same-title pending and resolved tasks remain distinct and are covered by updated tests and documentation.
Desktop file-drop command
wework/src/e2e/automation.ts
Adds the dropFile automation command, optional file metadata, Base64 decoding, and browser drop-event dispatch.
Attachment-only sidebar E2E flow
wework/e2e/desktop/task-flow.e2e.mjs, wework/package.json
Adds attachment-only submission, refresh/reopen validation, mock SSE responses, payload assertions, and an npm entry point for the dedicated E2E mode.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant TaskFlow as task-flow.e2e.mjs
  participant Automation as automation.ts
  participant Composer
  participant ModelServer as DesktopE2EServer
  User->>TaskFlow: Start attachment-only sidebar mode
  TaskFlow->>Automation: Execute dropFile command
  Automation->>Composer: Dispatch drop event with decoded attachment
  User->>TaskFlow: Send attachment-only task
  TaskFlow->>ModelServer: Submit attachment_only request
  ModelServer-->>TaskFlow: Return indexed SSE completion
  TaskFlow->>Composer: Verify completion and sidebar task row
  TaskFlow->>TaskFlow: Reopen or refresh desktop UI
  TaskFlow->>Composer: Verify persisted sidebar rows
Loading

Possibly related PRs

Suggested reviewers: icycrystal4

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/wework-attachment-only-sidebar

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.

@qdaxb
qdaxb marked this pull request as ready for review July 20, 2026 07:08
@qdaxb
qdaxb merged commit f42e9ad into main Jul 20, 2026
29 of 30 checks passed
@qdaxb
qdaxb deleted the fix/wework-attachment-only-sidebar branch July 20, 2026 07:08
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.

1 participant