Skip to content

fix(wework): create coding sessions in the right sidebar - #2612

Merged
qdaxb merged 4 commits into
mainfrom
fix/right-sidebar-coding-session
Aug 12, 2026
Merged

qdaxb merged 4 commits into
mainfrom
fix/right-sidebar-coding-session

Conversation

@qdaxb

@qdaxb qdaxb commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

What changed

  • create coding sessions launched from the right workspace as right-sidebar tabs instead of replacing the central session
  • let users choose the coding tool and per-session model before confirming creation
  • keep bottom-panel creation behavior unchanged and archive a sidebar session when its tab closes
  • update Chinese and English documentation and desktop regression coverage

Root cause

The right workspace and bottom panel shared one session-creation callback. Registration always activated the new session globally, so a session requested from the right sidebar replaced the central workbench. The picker also launched immediately after choosing a tool and silently reused the configured model.

Validation

  • full pre-push ESLint, TypeScript, and Wework unit test suite passed
  • DesktopWorkbenchLayout.test.tsx: 183 tests passed
  • focused right-sidebar coding session regression passed after rebasing onto latest main
  • desktop E2E checkpoint updated for right-sidebar placement and model selection

Task: WEWORKC2FA61-141

Summary by CodeRabbit

  • New Features
    • Create local harness sessions from the right or bottom workspace panels.
    • Select both a harness and model before confirming session creation.
    • Open right-panel sessions as tabs while keeping the primary session active.
    • New sessions use the harness’s saved default model without changing it when overridden.
    • Close secondary harness tabs independently while preserving the primary session.
  • Documentation
    • Added English and Chinese guidance for session creation, placement, and model selection.

@qdaxb
qdaxb enabled auto-merge August 12, 2026 06:27
@coderabbitai

coderabbitai Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@qdaxb, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 30 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 9713f304-a9b0-445a-8b1c-e3f1f53f948d

📥 Commits

Reviewing files that changed from the base of the PR and between c844011 and 2aa3740.

📒 Files selected for processing (5)
  • wework/e2e/desktop/scenarios/local-terminal.scenario.mjs
  • wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
  • wework/src/components/layout/DesktopWorkbenchMain.tsx
  • wework/src/components/layout/HarnessSessionPickerDialog.test.tsx
  • wework/src/components/layout/HarnessSessionPickerDialog.tsx
📝 Walkthrough

Walkthrough

Local harness sessions can now be created from the main or right workspace panel with a selected harness and model. Right-panel sessions use tabs and do not replace the primary session. Model changes apply only to the new session.

Changes

Harness session creation

Layer / File(s) Summary
Harness picker model selection
wework/src/components/layout/HarnessSessionPickerDialog.tsx, wework/src/components/layout/WorkbenchHarnessModelSelector.tsx
The picker supports harness and model selection, reset behavior, submission state, and creation progress.
Session launch and target routing
wework/src/components/layout/DesktopWorkbenchMain.tsx, wework/src/components/layout/DesktopWorkbenchLayout.tsx, wework/src/components/layout/localHarnessWorkbench.ts
Session registration supports optional activation. Launching can target the main or right panel, and right-panel sessions use harness:<sessionId> tabs.
Right-panel harness tabs
wework/src/components/layout/workspace-panels/RightWorkspacePanel.tsx
The right panel resolves harness tabs to sessions, renders CentralHarnessTerminal, and handles session labels, titles, icons, and exits.
Workflow validation and documentation
wework/src/components/layout/DesktopWorkbenchLayout.test.tsx, wework/e2e/desktop/scenarios/local-terminal.scenario.mjs, docs/*/wework/settings.md, wework/src/i18n/locales/*/common.json
Tests validate model selection, right-panel closure, and preservation of the primary session. Documentation and localization describe the new behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant HarnessSessionPickerDialog
  participant DesktopWorkbenchMain
  participant RightWorkspacePanel
  User->>HarnessSessionPickerDialog: Select harness and model
  HarnessSessionPickerDialog->>DesktopWorkbenchMain: Submit session request
  DesktopWorkbenchMain->>DesktopWorkbenchMain: Launch without main-session activation
  DesktopWorkbenchMain->>RightWorkspacePanel: Open harness session tab
  RightWorkspacePanel->>User: Render harness terminal tab
Loading

Possibly related PRs

Suggested reviewers: sdadunderscoresdad, icycrystal4

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: coding sessions can be created in the right sidebar.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/right-sidebar-coding-session

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 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
wework/src/components/layout/DesktopWorkbenchMain.tsx (1)

1911-1980: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Right-panel session failures set centralHarnessError, which has no visible surface when a central harness session is running.

startAdditionalHarnessSession sets centralHarnessError on failure for both target === 'main' and target === 'right'. centralHarnessError renders only in the empty composer (!activeLocalHarnessSession && !hasConversation) and in the harness-resuming banner (activeLocalHarnessSession && !activeLocalHarnessSession.active). Neither branch renders while activeLocalHarnessSession.active is true.

If a running central harness session exists and an additional right-panel session creation fails, the user gets no feedback. Add a dedicated error/notice path for target === 'right' failures, for example a TransientNotice (already used elsewhere in this file), so the failure stays visible even when a central harness session is active.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@wework/src/components/layout/DesktopWorkbenchMain.tsx` around lines 1911 -
1980, Update startAdditionalHarnessSession so failures with target === 'right'
use a visible transient notice path instead of only setCentralHarnessError;
reuse the existing TransientNotice mechanism and its established state/update
pattern in DesktopWorkbenchMain. Preserve centralHarnessError for main-target
failures and unavailable-start conditions, while ensuring right-panel session
errors remain visible during an active central harness session.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@wework/src/components/layout/HarnessSessionPickerDialog.tsx`:
- Around line 45-50: Update the HarnessSessionPickerDialog submission flow
around closeDialog and the pending onSelect continuation to track a submission
generation counter. Increment the counter on every manual close, capture its
value when starting a submission, and skip post-await closeDialog/setSubmitting
effects when the captured generation no longer matches, preserving the reopened
dialog’s state.

---

Outside diff comments:
In `@wework/src/components/layout/DesktopWorkbenchMain.tsx`:
- Around line 1911-1980: Update startAdditionalHarnessSession so failures with
target === 'right' use a visible transient notice path instead of only
setCentralHarnessError; reuse the existing TransientNotice mechanism and its
established state/update pattern in DesktopWorkbenchMain. Preserve
centralHarnessError for main-target failures and unavailable-start conditions,
while ensuring right-panel session errors remain visible during an active
central harness session.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 294b5f08-7302-4ef3-ab94-26944f329580

📥 Commits

Reviewing files that changed from the base of the PR and between cf8aff9 and c844011.

📒 Files selected for processing (12)
  • docs/en/wework/settings.md
  • docs/zh/wework/settings.md
  • wework/e2e/desktop/scenarios/local-terminal.scenario.mjs
  • wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
  • wework/src/components/layout/DesktopWorkbenchLayout.tsx
  • wework/src/components/layout/DesktopWorkbenchMain.tsx
  • wework/src/components/layout/HarnessSessionPickerDialog.tsx
  • wework/src/components/layout/WorkbenchHarnessModelSelector.tsx
  • wework/src/components/layout/localHarnessWorkbench.ts
  • wework/src/components/layout/workspace-panels/RightWorkspacePanel.tsx
  • wework/src/i18n/locales/en/common.json
  • wework/src/i18n/locales/zh-CN/common.json

@qdaxb
qdaxb added this pull request to the merge queue Aug 12, 2026
Merged via the queue into main with commit 2cf028b Aug 12, 2026
50 checks passed
@qdaxb
qdaxb deleted the fix/right-sidebar-coding-session branch August 12, 2026 07:25
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