Skip to content

Refine workbench layout and environment info UI - #1430

Merged
qdaxb merged 1 commit into
mainfrom
codex/codeserver
Jun 17, 2026
Merged

qdaxb merged 1 commit into
mainfrom
codex/codeserver

Conversation

@qdaxb

@qdaxb qdaxb commented Jun 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Update the desktop workbench layout and workspace panel actions for the new code-server flow
  • Improve the environment info popover and related i18n copy in English and Chinese
  • Add coverage for the desktop workbench layout behavior

Testing

  • Added unit test coverage for the desktop workbench layout
  • Not run (not requested)

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Open Project IDE" button in workspace panels to launch cloud-based code editor sessions for cloud devices.
    • Implemented error dialog displaying failure details if IDE session startup fails.
  • Localization

    • Added English and Chinese translations for Project IDE features, including error messages and cloud-only device constraints.
  • Tests

    • Added comprehensive test coverage for Project IDE functionality and error handling.

@coderabbitai

coderabbitai Bot commented Jun 17, 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: 7898036f-3e74-46ce-8e5d-5f0f6ece7228

📥 Commits

Reviewing files that changed from the base of the PR and between 3393852 and c4f0ec3.

📒 Files selected for processing (6)
  • wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
  • wework/src/components/layout/DesktopWorkbenchMain.tsx
  • wework/src/components/layout/EnvironmentInfoPopover.tsx
  • wework/src/components/layout/workspace-panels/WorkspacePanelActions.tsx
  • wework/src/i18n/locales/en/common.json
  • wework/src/i18n/locales/zh-CN/common.json

📝 Walkthrough

Walkthrough

Adds an "Open Project IDE" button to the desktop workspace titlebar that launches a code-server session for cloud-backed projects. WorkspacePanelActions gains session-start logic, a CodeServerErrorDialog modal, and cloud-device gating. DesktopWorkbenchMain forwards the required props, four i18n keys are added in English and Chinese, and comprehensive tests cover the happy path, pre-hydration visibility, local-device disabling, and error dialog rendering.

Changes

Code Server IDE Launch Feature

Layer / File(s) Summary
i18n strings and EnvironmentInfoPopover cosmetic refactors
wework/src/i18n/locales/en/common.json, wework/src/i18n/locales/zh-CN/common.json, wework/src/components/layout/EnvironmentInfoPopover.tsx
Adds four English and four Chinese workbench translation keys for Project IDE start failure, close label, and cloud-only tooltip. EnvironmentInfoPopover gains a shared environmentInfoLabel constant for aria-label and new title attribute; several JSX blocks are reformatted without logic changes.
WorkspacePanelActions Code Server logic, UI, and prop wiring
wework/src/components/layout/workspace-panels/WorkspacePanelActions.tsx, wework/src/components/layout/DesktopWorkbenchMain.tsx
Adds imports, currentProject/devices props, cloud-device eligibility check, memoized projectApi, handleOpenCodeServer async handler, IDE button with loading/error states, and CodeServerErrorDialog modal. DesktopWorkbenchMain forwards currentProject and devices to WorkspacePanelActions.
DesktopWorkbenchLayout Code Server tests
wework/src/components/layout/DesktopWorkbenchLayout.test.tsx
Adds createProjectApi mock, startCodeServerSessionMock setup in beforeEach, and four new test cases covering successful IDE open via window.open, button presence before device hydration, local-device disabling, and error dialog on session failure.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant WorkspacePanelActions
  participant projectApi
  participant Browser

  User->>WorkspacePanelActions: clicks "Open Project IDE" (cloud device only)
  WorkspacePanelActions->>WorkspacePanelActions: setIsCodeServerLoading(true)
  WorkspacePanelActions->>projectApi: startCodeServerSession(deviceId)
  alt session started
    projectApi-->>WorkspacePanelActions: { url, path }
    WorkspacePanelActions->>Browser: window.open(url, '_blank')
  else session failed
    projectApi-->>WorkspacePanelActions: throws Error
    WorkspacePanelActions->>WorkspacePanelActions: setCodeServerError(message)
    WorkspacePanelActions->>User: shows CodeServerErrorDialog
    User->>WorkspacePanelActions: dismisses dialog (overlay click or close button)
    WorkspacePanelActions->>WorkspacePanelActions: setCodeServerError(null)
  end
  WorkspacePanelActions->>WorkspacePanelActions: setIsCodeServerLoading(false)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • wecode-ai/Wegent#1280: Modifies workspace code-server/cloud IDE session availability by conditioning it on device capabilities (ClaudeCode restriction), directly affecting when the new IDE button should enable and start sessions.

Poem

🐇 A button appears in the titlebar row,
For cloud devices only — that's the rule, you know!
Click it once, a session starts to spin,
If it fails, a dialog pops in.
The rabbit hops through code with glee,
Now open your IDE — cloud-side, free! ☁️✨

✨ 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 codex/codeserver

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 and usage tips.

@qdaxb
qdaxb force-pushed the codex/codeserver branch from a4b821e to c4f0ec3 Compare June 17, 2026 02:23
@qdaxb
qdaxb merged commit 9ae8743 into main Jun 17, 2026
15 of 16 checks passed
@qdaxb
qdaxb deleted the codex/codeserver branch June 17, 2026 02:23
@coderabbitai coderabbitai Bot mentioned this pull request Jul 24, 2026
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