Skip to content

fix: workspace-projects bridge message lost — project selector falls back to stock opencode - #871

Merged
jeonghun-jj-lee merged 3 commits into
mainfrom
870-workspace-projects-bridge-message-lost-project-selector-falls-back-to-stock-opencode
Sep 7, 2026
Merged

jeonghun-jj-lee merged 3 commits into
mainfrom
870-workspace-projects-bridge-message-lost-project-selector-falls-back-to-stock-opencode

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Closes #870

What

The workspace-projects bridge message was registered as a one-shot onAppReady callback, which drains on the first app-ready and never fires again. After the M3 cutover shifted activation timing, the push no longer reliably delivered — the app fell back to engine-native project discovery (no type grouping, no Research/Dev labels).

How

  • onAppReadyPersistent() — a new callback mechanism on ChatPanel that fires on EVERY app-ready message (the existing one-shot contract is unchanged for other consumers like onboarding greeting)
  • ChatPanel.postToAll() — broadcasts a message to every live chat panel (primary + side-by-side), replacing the peek().postMessage pattern that only reached the singleton
  • pushWorkspaceProjects wired as persistent + broadcast

Testing

  • 7 new tests in chat_panel.test.ts covering all 4 ACs (persistent handler survives drain, fires on repeat, broadcast reaches multiple panels, workspace-folder changes re-push)
  • All 27 chat_panel tests pass

…870)

The workspace-projects bridge message was registered as a one-shot
onAppReady callback, which drains on the first app-ready and never
fires again. This broke the project selector on new sessions after
the M3 cutover shifted activation timing.

- Add onAppReadyPersistent(): callbacks that fire on EVERY app-ready
  (the one-shot contract is unchanged for other consumers)
- Add ChatPanel.postToAll(): broadcasts to every live panel, not just
  the primary singleton (fixes side-by-side sessions)
- Wire pushWorkspaceProjects as persistent + broadcast

Closes #870 (AC1, AC2, AC3)
@jeonghun-jj-lee jeonghun-jj-lee added bug Something isn't working hitl Needs human review before merge labels Sep 7, 2026
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 50d42f07-9555-479f-9e4c-e1b84a721ec3


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.

@jeonghun-jj-lee
jeonghun-jj-lee marked this pull request as ready for review September 7, 2026 03:54
… + dedup (#870)

Three interacting bugs silently killed the #841 expand/scroll-on-session-change:

1. renderRoots replayed pendingActiveProject with hardcoded mode='none'
   (sidebar_webview.ts:1010), permanently downgrading every session-change
   expand to highlight-only. Fix: replay with the STORED mode.

2. The dedup guard (sidebar_view.ts:444) checked path only, so a rescue
   attempt with the same path but mode='expand' was blocked after the
   'none' replay. Fix: dedup on (path, mode) together.

3. The sidebar replay on webview resolve (sidebar_view.ts:416) omitted
   the mode field entirely, defaulting to 'reset' (which collapses other
   folders). Fix: store and replay the mode.

The #841 code was fully intact — nothing was overwritten by subsequent
merges. The bug was a timing interaction present from merge day.
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 11fb2e7 into main Sep 7, 2026
10 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 hitl Needs human review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

workspace-projects bridge message lost — project selector falls back to stock opencode

1 participant