Skip to content

fix(runtime): retain completion subtitles for paired workspaces - #9930

Merged
nwparker merged 10 commits into
stablyai:mainfrom
innocarpe:fix/remote-workspace-last-message-subtitle
Oct 24, 2026
Merged

nwparker merged 10 commits into
stablyai:mainfrom
innocarpe:fix/remote-workspace-last-message-subtitle

Conversation

@innocarpe

@innocarpe innocarpe commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Paired workspace cards can lose the last assistant reply when a title update rebuilds completed agent status. The host still has the reply, but the paired client receives a status without the completion subtitle.

Preserve the existing completion message and its tool-output classification in both demotion paths. Title-only reconstruction retains that text and the interruption verdict only for completed status, so new working/blocked title intervals cannot replay older replies. State, prompt clearing, title ownership, and provider-session checks keep their existing behavior. The completed projection lives in the existing status module to keep the session projection within the lint file budget.

Fixes #9914. Original contribution by @innocarpe is retained in the branch history.

Validation: 73 focused tests across eight runtime suites, three production mobile-preview boundary checks, full Node TypeScript, all changed-code quality gates, base lint, anti-slop lint, formatting, and diff check passed. Independent review is LOW at 1f75bb02c107dd377e25c3f299b88e54b4d9e161; a fresh owner repeat passed afterward.

A real Claude Code conversation in a folder project reproduced the missing reply on untouched main before adoption. Actual paired Electron apps over the production transport then verified the fix, with the client still on main. The fresh post-review completion reaches the paired card as done with its prompt cleared and exact reply retained. Both apps ran hidden and unfocused. Separate mobile-device rendering and Linux/Windows native execution were not exercised locally.

Before — clean main on host and client: the local card retains the reply while the paired card shows Before - Claude.

Paired card on main omits the completion reply

After — reviewed host and client still on main: a fresh real completion renders OK-9930-1029 in the paired subtitle with a done indicator.

Paired card retains a fresh completion reply

@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

  • Last reviewed commit: e05d2fcdbbb33b9a00ab4be36f2d68ba9648ae6c
  • Latest commit, not reviewed: 824d4ff

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 74d7aeae-ee50-4f78-8440-7c85f860f110

📥 Commits

Reviewing files that changed from the base of the PR and between 212c0e4 and e05d2fcdbbb33b9a00ab4be36f2d68ba9648ae6c.

📒 Files selected for processing (2)
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/main/runtime/orca-runtime.ts
Files not reviewed due to moderation or processing errors (1)
  • src/main/runtime/orca-runtime.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The mobile session agent-status projection now preserves lastAssistantMessage and interrupted. A test covers stale working-state demotion under a neutral terminal title. It verifies that the state becomes done, preserved fields remain intact, and prompt and terminalTitle are cleared.

Merge Risk: Moderate · up to e05d2

The change is narrowly scoped to preserving remote completion text, but the current head has a failing runtime test check, so merge should wait until that validation is resolved.

Pre-merge checks: Passed 5
Check name Status Explanation
Linked Issues check Passed The changes satisfy issue #9914 by preserving lastAssistantMessage in the remote/mobile status projection used by paired clients. The regression test verifies message retention while stale working ind…
Out of Scope Changes check Passed The two changed files are directly related to the linked issue. The runtime change preserves the required status fields, and the test covers the regression without unrelated behavior or API changes.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Title check Passed The title is concise, specific, and accurately describes the primary change: retaining completion subtitles for paired workspaces.
Description check Passed The description provides a clear user-facing summary, implementation details, rationale, linked issue (#9914), before/after visual proof, testing results, review status, and platform limitations. It d…
Full details: Linked Issues check

Explanation

The changes satisfy issue #9914 by preserving lastAssistantMessage in the remote/mobile status projection used by paired clients. The regression test verifies message retention while stale working indicators remain suppressed.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (2 skipped: 2 too large.)

Full details: Description check

Explanation

The description provides a clear user-facing summary, implementation details, rationale, linked issue (#9914), before/after visual proof, testing results, review status, and platform limitations. It does not use the repository template headings or explicitly complete the AI Disclosure, Agent skill upstream boundary, Notes, and Checklist sections, but the required information is mostly present.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@innocarpe

Copy link
Copy Markdown
Contributor Author

Rebased onto current main after the complementary client-side write-up on #14716.

Head is now b5230c0d2. Same focused host change: keep lastAssistantMessage / interrupted on the demoted listMobileSessionTabs projection. Still complementary to #14716 (client merge); this PR does not take that path.

Regression: keeps lastAssistantMessage when demoting… plus neighbouring suppressions — 4 passed. Quality gate 0 findings on the 2-file diff.

@innocarpe
innocarpe force-pushed the fix/remote-workspace-last-message-subtitle branch from b5230c0 to 764d8dd Compare August 20, 2026 01:22
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (764d8dd00)

Rebased onto current main so CI is no longer running the stale palette-search fixtures from 18 Aug. Scope unchanged: host-only lastAssistantMessage / interrupted on the demoted listMobileSessionTabs projection. Complementary to merged #14716 (client merge). Focused tests 4 passed; changed-code quality 0 on the 2-file diff.

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@innocarpe
innocarpe force-pushed the fix/remote-workspace-last-message-subtitle branch from 764d8dd to abc6e43 Compare August 23, 2026 02:21
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (abc6e435c1)

Rebased onto current main (063b804). Scope unchanged: keep lastAssistantMessage on the demoted listMobileSessionTabs projection. Complementary to merged #14716. Evidence: focused demote test 1 passed.

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@innocarpe
innocarpe force-pushed the fix/remote-workspace-last-message-subtitle branch from abc6e43 to e05d2fc Compare August 31, 2026 13:43
@innocarpe

Copy link
Copy Markdown
Contributor Author

Sync update (e05d2fcdb)

Rebased onto current upstream/main with the focused host-side scope unchanged. This complements merged #14716 by preserving lastAssistantMessage and interrupted on the demoted listMobileSessionTabs projection; it does not modify the client merge path. Evidence: 1,217 runtime tests passed (1 skipped), Node typecheck, Oxlint, and Oxfmt pass.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown

Greptile Summary

This PR preserves completion metadata when stale agent activity is demoted for remote session-tab publication, allowing paired and mobile clients to display the last assistant message without restoring a stale working indicator.

  • Retains lastAssistantMessage and interrupted in the demoted agent-status projection.
  • Continues forcing the projected state to done and clearing stale prompt and terminal-title ownership.
  • Adds regression coverage for a neutral terminal title with a previously working agent status.

Confidence Score: 5/5

The PR appears safe to merge, with the focused projection change preserving completion metadata while maintaining stale working-state suppression.

The retained fields are valid members of the normalized done-state payload, and the existing demotion behavior for state, prompt, and terminal-title ownership remains intact with regression coverage.

Important Files Changed

Filename Overview
src/main/runtime/orca-runtime.ts Preserves bounded completion metadata in the remote/mobile demotion branch while retaining the existing stale-activity suppression behavior.
src/main/runtime/orca-runtime.test.ts Adds focused coverage showing that the message and interrupt flag survive demotion while the spinner, prompt, and title ownership remain suppressed.

Reviews (1): Last reviewed commit: "fix(runtime): keep lastAssistantMessage ..." | Re-trigger Greptile

Paired clients mirror the mobile/session terminal projection. Demoting a
stale working status under a neutral title dropped lastAssistantMessage, so
remote workspace cards lost the completion subtitle that local cards still
show from the in-process hook row.

Fixes stablyai#9914
@innocarpe
innocarpe force-pushed the fix/remote-workspace-last-message-subtitle branch from e05d2fc to ddb72e7 Compare October 22, 2026 03:18
@nwparker nwparker changed the title fix(runtime): keep lastAssistantMessage on demoted remote agent status fix(runtime): retain completion subtitles for paired workspaces Oct 23, 2026
Mid-turn hook snapshots carry tool stdout as lastAssistantMessage; a shell or idle
title must not surface that as the final reply.
@nwparker

Copy link
Copy Markdown
Contributor

Maintainer follow-up (824d4ff, merged current main):

  • Narrowed the retained preview to completed turns only. lastAssistantMessage, its tool-output flag and interrupted now carry over only when the source status was already done. A still-working hook snapshot can hold mid-turn tool stdout through prompt-field carry-forward, so a shell or idle title no longer surfaces that text as the final reply.
  • The existing shell-title demotion of working to done on main is left exactly as it was. This PR now only adds the reply for turns that had already completed.
  • Added regressions for a working source under both the idle-title renewal and the shell-title demotion paths. The focused mobile/runtime status suites pass (60 tests), as do oxlint and the changed-code quality gate.

@nwparker
nwparker merged commit f4a3860 into stablyai:main Oct 24, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working orca-remote-server Remote Orca Server / orca serve / paired remote runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remote (paired) workspaces don't show last agent message in workspace-tab subtitle (works for local)

4 participants