Repository navigation
fix(wework): create coding sessions in the right sidebar - #2612
Conversation
|
Warning Review limit reached
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 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughLocal 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. ChangesHarness session creation
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
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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 winRight-panel session failures set
centralHarnessError, which has no visible surface when a central harness session is running.
startAdditionalHarnessSessionsetscentralHarnessErroron failure for bothtarget === 'main'andtarget === 'right'.centralHarnessErrorrenders only in the empty composer (!activeLocalHarnessSession && !hasConversation) and in the harness-resuming banner (activeLocalHarnessSession && !activeLocalHarnessSession.active). Neither branch renders whileactiveLocalHarnessSession.activeistrue.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 aTransientNotice(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
📒 Files selected for processing (12)
docs/en/wework/settings.mddocs/zh/wework/settings.mdwework/e2e/desktop/scenarios/local-terminal.scenario.mjswework/src/components/layout/DesktopWorkbenchLayout.test.tsxwework/src/components/layout/DesktopWorkbenchLayout.tsxwework/src/components/layout/DesktopWorkbenchMain.tsxwework/src/components/layout/HarnessSessionPickerDialog.tsxwework/src/components/layout/WorkbenchHarnessModelSelector.tsxwework/src/components/layout/localHarnessWorkbench.tswework/src/components/layout/workspace-panels/RightWorkspacePanel.tsxwework/src/i18n/locales/en/common.jsonwework/src/i18n/locales/zh-CN/common.json
What changed
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
DesktopWorkbenchLayout.test.tsx: 183 tests passedmainTask: WEWORKC2FA61-141
Summary by CodeRabbit