Skip to content

feat(sidebar): New tab with agent… in a workspace row's menu - #3838

Merged
devswha merged 1 commit into
mainfrom
feat/sidebar-workspace-new-tab
Nov 14, 2026
Merged

devswha merged 1 commit into
mainfrom
feat/sidebar-workspace-new-tab

Conversation

@devswha

@devswha devswha commented Nov 14, 2026

Copy link
Copy Markdown
Owner

Fixes #3772. Requested by @sergiorademacher, thank you.

Change

A workspace row's menu in the sidebar (its ⋯, right-click and the context-menu key; the sheet on a phone) now offers New tab with agent…, second after Pin workspace. It opens the same New tab dialog as the tab row's own New tab with agent…, aimed at that workspace (actions.openNewTab({ machineId, workspaceId }), as the split view's tab strips already call it), without switching to it first.

Screenshots (demo data)

The menu on checkout-api: before (main) and after; then the dialog it opens.

Before After
Phone 390, dark
Phone 390, light
Desktop 1440, dark
Desktop 1440, light

The dialog it opens:

Tests

  • src/components/Sidebar.appLayout.test.tsx (new case): on a connected PC the row's menu lists new-tab after the pin, running it calls openNewTab with that row's PC and workspace, and a watching device's menu has none. The offline cases already in the file keep their lists, so they cover the disconnected PC.
  • The browser scripts that pin a workspace menu's whole item list now include the item: ui-regression, workspace-rows-regression, sidebar-activity-demo-regression, workspace-touch-reorder-demo-regression (the phone sheet, opened by touch) and session-history-browser-qa.

Validation

  • bun run check fast: exit 0 (workflow syntax, generated types and themes, typecheck, build; unit tests 17241 pass, 0 fail, 54 skip).
  • Browser scripts, locally, one at a time: workspace-rows-regression, sidebar-activity-demo-regression, workspace-touch-reorder-demo-regression, session-history-browser-qa and ui-regression (under bun run check run), all pass. ui-regression ran with a temporary folder outside the home folder, as its folder step needs.
  • Captures: headless Chromium on demo builds of main and of this branch, a 390 px touch context and a 1440 px window.
  • Not run: the other browser scripts (GitHub's checks run them), a real phone.

It opens the New tab dialog aimed at that workspace without switching to it first (#3772). Left out on a watching device and on a PC that is not connected.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • New Features
    • Added New tab with agent… to workspace menus, allowing you to open a new-tab dialog for a workspace without switching to it first.
    • The option is available when the sidebar is online and the device is not watching. The menu label is available in Japanese, Korean, and Simplified Chinese.
  • Documentation
    • Documented where the new menu item appears and when it is unavailable.

The workspace-row menu now offers “New tab with agent…” for online devices that are not watching. Selecting it opens the New tab dialog for that workspace without switching to it first. Tests, menu expectations, documentation, and translations were updated.

Changes: Workspace row New tab action

Layer / File(s) Summary
Add the workspace menu action
src/components/Sidebar.tsx, src/components/Sidebar.appLayout.test.tsx
The workspace menu adds the action for online, non-watching devices. The component test checks that it targets the selected workspace and is absent when watching.
Update menu expectations and supporting text
scripts/session-history-browser-qa.ts, scripts/sidebar-activity-demo-regression.ts, scripts/ui-regression.ts, scripts/workspace-rows-regression.ts, scripts/workspace-touch-reorder-demo-regression.ts, DESIGN.md, changelog.d/sidebar-workspace-new-tab.md, src/lib/i18n.*.ts, src/lib/i18n/terminal.*.ts
Regression expectations include the new menu item. Design and changelog text describe the action. Japanese, Korean, and Simplified Chinese translations were added to base locale files and removed from terminal locale files.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature · Severity of issue fixed: Low

Suggested reviewers: jiunshinn, haeminway1

Merge Risk: Minimal · up to 37e4c

Adds a "New tab with agent…" action to the workspace row menu for connected, non-watching devices. It opens the existing New tab dialog for that workspace. No concrete merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a New tab with agent… item added to a workspace row's sidebar menu. It follows the conventional-commit style and is specific. It matches the changeset and the PR objec…
Description check Passed The description follows the repository template. It has a Change section that explains the problem, the resulting behavior, and the linked issue #3772. It has a Validation section that lists the comma…
Linked Issues check Passed Issue #3772 requires a New tab item in the workspace row menu. It must open the New tab dialog for that workspace through actions.openNewTab({ machineId, workspaceId }) without switching to it, and it…
Out of Scope Changes check Passed All changes connect to #3772. The Sidebar.tsx change adds the menu item. The Sidebar.appLayout.test.tsx change covers that item. The browser scripts (ui-regression, workspace-rows-regression, sidebar-…
Full details: Title check

Explanation

The title names the main change: a New tab with agent… item added to a workspace row's sidebar menu. It follows the conventional-commit style and is specific. It matches the changeset and the PR objectives.

Full details: Description check

Explanation

The description follows the repository template. It has a Change section that explains the problem, the resulting behavior, and the linked issue #3772. It has a Validation section that lists the commands run (bun run check fast), the unit test counts, the browser scripts run locally, and the scripts not run. The template asks for contract tests on HTTP/WS changes. This change touches no HTTP/WS surface, so that omission is acceptable. The description also includes screenshots and the test changes.

Full details: Linked Issues check

Explanation

Issue #3772 requires a New tab item in the workspace row menu. It must open the New tab dialog for that workspace through actions.openNewTab({ machineId, workspaceId }) without switching to it, and it must be hidden on watching devices. In src/components/Sidebar.tsx, the workspace menu adds a new-tab item after pin-workspace. Its run() calls actions.openNewTab({ machineId, workspaceId: workspace.workspace_id }). The item is gated by online && !watching, so watching devices do not get it. src/components/Sidebar.appLayout.test.tsx adds a case that checks the item's position, its openNewTab arguments, and its absence on a watching device. The issue's last clause, unfolding the workspace when the fold from #3771 exists, applies only if #3771 lands. #3771 is not merged, and the PR says it will be handled there, so that clause does not apply to this PR. Hiding the item on a disconnected PC is a choice the issue does not forbid. The label reuses the existing New tab with agent… string, which is a reasonable choice and does not conflict with the issue. Automated tests and browser-script expectations were updated. Evidence reviewed: the Sidebar.tsx diff at the reviewed head. The test file and scripts were taken from the PR summary and not inspected directly.

Full details: Out of Scope Changes check

Explanation

All changes connect to #3772. The Sidebar.tsx change adds the menu item. The Sidebar.appLayout.test.tsx change covers that item. The browser scripts (ui-regression, workspace-rows-regression, sidebar-activity-demo-regression, workspace-touch-reorder-demo-regression, session-history-browser-qa) pin the workspace menu item list, so they must change with the new item. The i18n changes move the existing New tab with agent… translations into the base dictionary so the sidebar can reuse the label, as the PR describes. The DESIGN.md and changelog.d entries document the new item. The i18n files for terminal.* only remove the moved entries. No unrelated behavior change was found in the reviewed Sidebar.tsx diff.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 79420d0 and 37e4cf3.

Files selected for processing: 15

  • DESIGN.md
  • changelog.d/sidebar-workspace-new-tab.md
  • scripts/session-history-browser-qa.ts
  • scripts/sidebar-activity-demo-regression.ts
  • scripts/ui-regression.ts
  • scripts/workspace-rows-regression.ts
  • scripts/workspace-touch-reorder-demo-regression.ts
  • src/components/Sidebar.appLayout.test.tsx
  • src/components/Sidebar.tsx
  • src/lib/i18n.ja.ts
  • src/lib/i18n.ko.ts
  • src/lib/i18n.zh.ts
  • src/lib/i18n/terminal.ja.ts
  • src/lib/i18n/terminal.ko.ts
  • src/lib/i18n/terminal.zh.ts
Files with no reviewable changes: 3

  • src/lib/i18n/terminal.ja.ts
  • src/lib/i18n/terminal.ko.ts
  • src/lib/i18n/terminal.zh.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.

@devswha
devswha merged commit e9aa834 into main Nov 14, 2026
13 checks passed
@devswha
devswha deleted the feat/sidebar-workspace-new-tab branch November 14, 2026 08:47
@devswha

devswha commented Nov 14, 2026

Copy link
Copy Markdown
Owner Author

Merge pass

Merged head 37e4cf3ace79 as e9aa83499497 on GitHub's checks, with no unresolved review threads.

Reviewer Verdict Note
claude CLEAR
codex CLEAR

Two reviewers at this head: Claude (Opus) CLEAR with no findings, Codex Terra CLEAR. src/, browser scripts and docs only; outside the release freeze. It touches the sidebar, a shared component; the browser regressions covering it run in the required check.

A workspace row's menu offers "New tab with agent…", which opens the new-tab dialog for that workspace on its own PC. The item is hidden on a watching device and on a disconnected PC. The Opus reviewer put main's Sidebar.tsx back: only the new test fails there.

Left, MEDIUM (Codex, traced): reloading the page with the dialog open reopens it for the selected workspace, not the row's (the address records only new=tab); for an unselected workspace with several panes, the dialog's folder comes from herdr's active pane, not the pane the row would open. Sent to the author's lane.

devswha added a commit that referenced this pull request Nov 15, 2026
…der workspaces is on (#3845)

Fixes #3771. Proposed by @sergiorademacher, thank you.

## Change

With Settings → Appearance → **Agents under workspaces** on, a workspace
row with agents under it is now a fold, as a project row is in the Codex
app and T3 Code:

- A click, Enter or Space on the row folds or unfolds what hangs under
it and opens nothing; the agent rows are what open panes. On a phone the
drawer stays open, so one can fold a way to the workspace wanted. Left
folds and Right unfolds, and the row carries `aria-expanded`.
- A workspace with no agent under it opens as before, and with the
setting off every row behaves exactly as today (the browser regressions
that click `.workspace-select` run with it off).
- One fold per row: a repository's row with worktrees folds its agents
together with its worktrees, through the worktree fold's own face
button, menu item (Collapse / Expand), state and storage. Any other
row's menu gets the same Collapse / Expand item for its agents.
- Folded, the row keeps what it already shows: the selected agent's
place (`has-selected-agent`), the rolled-up state (a waiting agent shows
there) and a `+N` count of what is put away.
- Agent folds are kept per PC on this device as one list
(`ovis:workspace-agents-folded:<machineId>`), pruned to the roster at
each change. Everything starts unfolded.
- Under the filter, a match among a folded row's agents holds them open
for the filter's time, as worktree folds do.

- **New tab with agent…** from a folded row's menu (#3838, merged)
unfolds the row first, as opening a worktree from the menu unfolds its
group, so the new agent is in sight (the last point of #3772).

Not in this PR: the optional Collapse all / Expand all palette actions.

## Screenshots (demo data)

The PCs list with the tree on: before (`main`), and after one tap or
click on `checkout-api`. Its two agents and the worktree that is not
selected are put away (`+3`); the selected worktree and its agent stay,
and the row says one agent is waiting.

| | Before | After (folded) |
|---|---|---|
| Phone 390, dark | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-before-390-dark.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-after-390-dark.png"
width="220"> |
| Phone 390, light | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-before-390-light.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-after-390-light.png"
width="220"> |
| Desktop 1280, dark | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-before-1280-dark.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-after-1280-dark.png"
width="220"> |
| Desktop 1280, light | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-before-1280-light.png"
width="220"> | <img
src="https://raw.githubusercontent.com/devswha/ovis/0a45ac790cee7e7da692925d67075eefc0ba1d04/3771-after-1280-light.png"
width="220"> |

## Tests

- `src/components/Sidebar.agentTree.test.tsx` (3 new cases): a click
folds a row's agents and opens nothing, the folded row keeps
`has-selected-agent`, the waiting state and `+2`, the fold is stored and
survives a new render, and Left, Right, Enter and Space fold and unfold;
a row with no agent and every row with the setting off open their pane
as before; a filter match opens a folded row for its time, and a change
prunes the stored list to the roster.
- `src/components/Sidebar.appLayout.test.tsx` (new case): the menu's
Collapse / Expand for a row's agents, New tab with agent… from a folded
row unfolds it, and a repository's row keeps a single fold item.
- `scripts/sidebar-agent-tree-demo-regression.ts`: a real tap on a phone
and a click on a desktop, dark and light, fold `checkout-api` (agents
gone, `aria-expanded` false, `+3`, the selection unchanged, the phone's
drawer still open), a reload keeps the fold, and Right unfolds.

## Validation

- `bun run check fast`: exit 0 (workflow syntax, generated types and
themes, typecheck, build; unit tests 17248 pass, 0 fail, 54 skip; on
`main` with #3838 merged).
- `bun scripts/sidebar-agent-tree-demo-regression.ts`: 4 of 4 pass
(desktop and phone, dark and light). It is the only browser script that
turns the tree on.
- Not run: the other sidebar browser scripts (they run with the tree
off, where nothing changes), a real phone.
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.

Sidebar: New tab in a workspace row's menu

1 participant