feat(cli): let agents drive the right sidebar with superset panes

Merged
KI
1d ago
+1342-212

Summary

superset panes only saw the main area. With the right sidebar on for everyone, agents can now read and arrange it too.

  • Read: panes list and every mutation result carry a sidebar block (shown, full screen, tabs and panes).
  • Arrange: split, resize, focus, close, swap, equalize and move find a pane in either area. move --to and swap work across areas; move --sidebar / move --main give a pane its own tab there. focus on a sidebar pane shows the sidebar.
  • Open: panes open changes|file|files|pages|browser shows the sidebar with that tab in front, like "Open in right pane" in the app. --background adds it quietly. open file PATH [--line N] shows a file in the editor; open changes PATH [--line N] points Changes at one file. The host turns the path into the form each pane needs and rejects missing files and paths outside the workspace.
  • Show: panes sidebar show [--full-screen], panes sidebar hide.
  • new-tab --sidebar opens a terminal there.
  • Right pane full screen moved from useRightPaneMode state to stores/right-pane-full-screen.ts so the CLI can set it. Both pane layout stores now register for live edits.
  • The panes skill covers the sidebar.

Film of it running against this branch: https://app.superset.sh/page/agents-can-drive-the-right-sidebar-ux0iq2

Compatibility

New procedures (panes.open, panes.sidebar) and optional inputs (area, background, path, line). The sidebar block on results is optional. A newer CLI against an older desktop app gets "too old" for the new commands; --sidebar on new-tab/move errors when the result has no sidebar block.

Testing

  • Desktop applyPaneLayoutOp tests (22), host-service panes tests incl. resolveOpenPath, CLI suite (464) pass. Typecheck clean in desktop, host-service, CLI, shared. check:plugins passes.
  • In the dev app over CDP: every command above, including moves both ways, full screen and back, open file --line, open changes PATH, and the error cases.
  • Seen once, not reproduced in three repeats: a terminal moved from the sidebar into the main area drew blank until its tab re-rendered, seconds after the workspace opened.

Summary by cubic

Lets agents read and arrange the right sidebar with superset panes, not just the main pane area.

  • panes list and every mutation result now carry a sidebar block: whether it's open, full screen, and its tabs and panes.
  • split, resize, focus, close, swap, equalize, and move find a pane in either area; move --to and swap work across areas, and move --sidebar / move --main give a pane its own tab there. Focus on a sidebar pane shows the sidebar. The main area only accepts terminals and chats: move and swap refuse to place viewer panes there.
  • New panes open changes|file|files|pages|browser shows the sidebar with that tab in front — --background adds it quietly — and open file PATH [--line N], open changes PATH [--line N] point the editor or Changes at a specific file. open file without --line opens the code view. The host resolves the path against the worktree, follows symlinks, and rejects missing files and paths outside it.
  • New panes sidebar show [--full-screen] and panes sidebar hide; new-tab --sidebar opens a terminal there.
  • Right-pane full screen moved from component state to stores/right-pane-full-screen.ts so the CLI can set it; both pane layout stores now register for live edits.

Compatibility

  • The new ops are optional inputs; a newer CLI against an older desktop app fails with "too old" for open, sidebar, or --sidebar on new-tab and move. move --main needs no sidebar support.

Summary by CodeRabbit

  • New Features
    • Manage panes in the main workspace and right sidebar. Open files, Changes, Files, Pages, and browser tabs in the sidebar, move panes between areas, and show or hide the sidebar, including in full-screen mode.
    • Use CLI commands and options to open sidebar content, control sidebar visibility, and create or move tabs in a chosen area.
    • Pane listings now include sidebar tabs and their split layouts.
  • Bug Fixes
    • Pane details and terminal information are now available for sidebar tabs as well as main workspace tabs.