Skip to content

fix(wework): log runtime terminal state transitions - #2039

Merged
qdaxb merged 1 commit into
mainfrom
fix/wework-runtime-terminal-logs
Jul 18, 2026
Merged

qdaxb merged 1 commit into
mainfrom
fix/wework-runtime-terminal-logs

Conversation

@qdaxb

@qdaxb qdaxb commented Jul 18, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • log accepted and mismatched runtime terminal events with task-scoped identifiers
  • log dispatch of the runtime task settlement transition
  • document how to correlate the packaged-app terminal event chain in Chinese and English
  • cover accepted and mismatched terminal event logging with unit tests

Why

A runtime reply can finish rendering its text while the sidebar and composer remain in a running state. Previously, packaged-app logs did not show whether the terminal event was lost before Tauri forwarding, subscription routing, pane identity validation, or task settlement.

These logs make each boundary observable without recording response content or credentials.

Validation

  • Wework pre-push ESLint
  • Wework pre-push TypeScript check
  • Wework full unit suite: 180 files, 1798 tests
  • focused runtime pane message tests: 26 tests
  • Prettier and git diff --check
  • isolated real Tauri startup and desktop workbench assertion

Summary by CodeRabbit

  • Bug Fixes

    • Improved handling and diagnostics for completed or failed runtime tasks when the interface remains in a running state.
    • Terminal events with mismatched task details are now safely ignored, preventing incorrect task updates.
    • Added clearer logging to distinguish accepted terminal events from discarded mismatches.
  • Documentation

    • Added English and Chinese troubleshooting guidance for tracing runtime completion events across the application.

@coderabbitai

coderabbitai Bot commented Jul 18, 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: 09a49fc7-e410-41e2-b00d-949664c547dc

📥 Commits

Reviewing files that changed from the base of the PR and between ba26634 and 8cbfcdf.

📒 Files selected for processing (5)
  • docs/en/developer-guide/runtime-local-work.md
  • docs/zh/developer-guide/runtime-local-work.md
  • wework/src/features/workbench/WorkbenchProvider.tsx
  • wework/src/features/workbench/runtimePaneMessages.test.ts
  • wework/src/features/workbench/runtimePaneMessages.ts

📝 Walkthrough

Walkthrough

Adds structured logging and tests for accepted or dropped runtime terminal events, logs Workbench settlement dispatch identifiers, and documents cross-layer log correlation for diagnosing incomplete terminal-state propagation.

Changes

Runtime terminal diagnostics

Layer / File(s) Summary
Terminal event identity handling
wework/src/features/workbench/runtimePaneMessages.ts
Completion and error events now log standardized acceptance details and warn before dropping events with mismatched runtime identities.
Settlement propagation observability
wework/src/features/workbench/WorkbenchProvider.tsx, docs/en/developer-guide/runtime-local-work.md, docs/zh/developer-guide/runtime-local-work.md
Workbench settlement dispatch logs runtime identifiers, and English and Chinese guides document correlating terminal-state logs across runtime layers.
Terminal event validation
wework/src/features/workbench/runtimePaneMessages.test.ts
Tests verify accepted completion logging and suppression of mismatched terminal events.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • wecode-ai/Wegent#1788: Adds runtime task scope identifiers used by terminal-event identity matching and logging.

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-runtime-terminal-logs

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 18, 2026 16:04
@qdaxb
qdaxb merged commit 005f665 into main Jul 18, 2026
21 of 22 checks passed
@qdaxb
qdaxb deleted the fix/wework-runtime-terminal-logs branch July 18, 2026 16:04
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