Skip to content

fix(wework): pause goals for inactive tasks - #1871

Merged
qdaxb merged 1 commit into
mainfrom
fix/wework-goal-task-status-sync
Jul 10, 2026
Merged

qdaxb merged 1 commit into
mainfrom
fix/wework-goal-task-status-sync

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Derive a paused goal presentation and stop goal elapsed time when App Server explicitly reports the current task as not running.
  • Treat a missing running field as unknown, preventing incorrect state changes while data is incomplete.
  • Document the goal/task execution-state precedence in Chinese and English.

Root cause

The goal timer was driven solely by the persisted goal status. Reopening an interrupted task could therefore render an active, ticking goal even though the runtime task was idle.

Validation

  • pnpm --dir wework test (145 files, 1421 tests)
  • pnpm --dir wework typecheck
  • pnpm --dir wework lint
  • Pre-push quality gate (including full Wework checks)

Summary by CodeRabbit

  • New Features

    • Goal status now reflects the current task execution state in Wework.
    • Active goals are shown as paused, with elapsed time stopped, when the task is explicitly not running.
    • Goals resume their original status when task execution resumes.
  • Bug Fixes

    • Missing task execution status no longer incorrectly pauses goals.
    • Display-only pausing does not automatically persist a paused goal.

@coderabbitai

coderabbitai Bot commented Jul 10, 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: 3dae9ec8-b872-46a3-9f1b-d5518a2e3f9a

📥 Commits

Reviewing files that changed from the base of the PR and between 6a8f1e0 and 572a9db.

📒 Files selected for processing (5)
  • docs/en/developer-guide/wework-chat-state-sources.md
  • docs/zh/developer-guide/wework-chat-state-sources.md
  • wework/src/components/layout/useWorkbenchPaneSession.ts
  • wework/src/features/workbench/runtimePaneStatus.test.ts
  • wework/src/features/workbench/runtimePaneStatus.ts

📝 Walkthrough

Walkthrough

The change derives Wework goal presentation from explicit runtime task execution state. Known running: false tasks pause displayed active goals and stop elapsed time, while unknown states remain unchanged. The derivation is applied in the workbench pane, tested, and documented in English and Chinese.

Changes

Runtime goal state

Layer / File(s) Summary
Task execution and goal derivation
wework/src/features/workbench/runtimePaneStatus.ts, wework/src/features/workbench/runtimePaneStatus.test.ts
Task execution is known only when running is boolean, and active goals are copied with paused status when a known task is not running. Tests cover paused, unknown, and missing-field cases.
Workbench pane integration
wework/src/components/layout/useWorkbenchPaneSession.ts
The pane applies task-aware goal derivation to the previously resolved visible or pending goal.
Goal state specification
docs/en/developer-guide/wework-chat-state-sources.md, docs/zh/developer-guide/wework-chat-state-sources.md
Developer guides document display and elapsed-time behavior, explicit boolean handling, non-persistent UI derivation, and restoration when execution resumes.

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

✨ 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-goal-task-status-sync

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 10, 2026 14:57
@qdaxb
qdaxb merged commit bcdfeee into main Jul 10, 2026
11 checks passed
@qdaxb
qdaxb deleted the fix/wework-goal-task-status-sync branch July 10, 2026 14:57
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