Skip to content

vscode: alternative layout — second activity-bar button, combined Workspace/Tower/Agents panel, and an architect | Work + Decisions split #1963

Done

Description

@waleedkadous

The ask (owner's words)

we're going to work on a slightly different version of the ide. I want it to be accessed through clicking the button under the codev button. Can you start by adding a button that is the codev button but rotated 90 degrees? Then I want you to create a new panel that combines the existing workspace, tower and agent panel into a single panel on the left hand side. Then I want you to port the current work panel and the current decision panel and then create a split view where these two are on the right and the main architect of a project is on the left.

This is an additive, alternative layout for the Codev extension (apps/vscode). The existing Codev activity-bar container and its views stay exactly as they are; nothing is removed or moved.

What gets built — three steps, in the owner's order

1. A second activity-bar button

  • A new viewsContainers.activitybar entry, registered directly after the existing codev container so it sits under the Codev button.
  • Its icon is the Codev icon (apps/vscode/icons/codev.svg) rotated 90 degrees. Make it a new SVG file that rotates the same path (transform="rotate(90 400 400)"), not a redrawn shape.

2. One combined left-hand panel

Clicking the new button opens a primary-sidebar panel that brings together what is today spread across three places:

Today View id Where it lives today
Workspace codev.workspace Codev activity-bar container
Agents codev.agents Codev activity-bar container
Tower codev.tower secondary sidebar (codev-tower)

"A single panel" is read as one view with three sections, not three stacked views that happen to share a container. The new panel reuses the existing data sources and row behaviour (views/workspace.ts, views/builders.ts, views/tower.ts, overview-data.ts, tower-cache.ts) — one source of truth, no second copy of the fetch or grouping logic. Every click and context-menu action available on a row today must work on the same row in the combined panel.

3. Work + Decisions ported, in a split with the main architect

  • Port the dashboard's Work view (apps/web/src/components/WorkView.tsx and the components it pulls in) and Decisions view (apps/web/src/components/DecisionsView.tsx, hooks/useDecisions.ts) into the extension.
  • Arrange the editor area as a split: left = the workspace's main architect terminal; right = Work and Decisions.
  • The Decisions view must stay fully functional, not read-only: ruling on an item (POST …/api/decisions/rule) and item images (GET …/api/decisions/image) work as they do in the dashboard.
  • The architect goes through the existing resolution path (open-architect.ts, TerminalManager). Its invariant holds: a terminal is never opened under a name other than its occupant's, and a non-live main refuses with the existing warning rather than substituting another architect. When main isn't live, the right side still renders.

Prescribed design choices

  • Reuse the React components; don't rewrite them. The extension already bundles React into webviews (esbuild.js, the markdown-preview and contextual-panel webviews) and already depends on @cluesmith/codev-artifact-canvas, which DecisionsView uses. If the components have to move to be shared between apps/web and apps/vscode, move them to a shared location and have both import from it. A forked copy inside apps/vscode is not acceptable.
  • Webviews don't talk to Tower directly. Data and actions go through the extension host's existing Tower connection (connection-manager.ts) over webview messaging. That keeps auth, the workspace-scoped route prefix and web-workbench (/ide/) mode working, and respects the codev-core / codev-sdk import boundary.
  • Dashboard-only affordances need an extension equivalent or get dropped, explicitly. WorkView creates shell tabs, opens builder tabs and shows a file tree — dashboard concepts. For each one the spec says what it maps to in VS Code (e.g. clicking a builder opens its terminal via TerminalManager) or that it is left out. No dead buttons.
  • Theme with VS Code variables, so the ported views read correctly in light, dark and high-contrast themes.
  • Both channels. The same extension ships as the marketplace vsix and inside the Codev IDE. This must work in both, including a builder-worktree window (where codev.agents is hidden today) and a window with no Codev workspace.

Open points for the spec to settle (my working assumptions, to be confirmed at the spec gate)

  1. Name of the new container. Working title: "Codev Cockpit".
  2. Rotation direction. Assumed clockwise.
  3. Right-hand arrangement. Assumed Work on top, Decisions below (two stacked editor groups), rather than two tabs in one group.
  4. What triggers the split. Assumed: showing the new container arranges the split, and there is also a command to do it on demand. The spec must say what happens to editors the user already has open — the layout must never close or discard a user's unsaved work.
  5. No decisions file. A workspace that hasn't run afx decisions init gets a sensible empty state, not an error.

Related

Read these for overlap; don't absorb their scope.

Acceptance

  • New rotated button visible under the Codev button; existing Codev container unchanged.
  • Combined panel shows Workspace, Tower and Agents content with working row actions.
  • Split view: main architect terminal on the left, Work and Decisions on the right, with live data and a working ruling round-trip on Decisions.
  • Verified by rendering it, not only by unit tests: screenshots in the PR of the button, the combined panel, and the split view (N=0, N=1 and N>1 builders; a pending decision; light and dark theme), taken from a running extension — the Codev IDE at /ide/ is drivable with Playwright.
  • contributes-* tests updated for the new container/views/commands.

Activity

  1. added
    area/vscode
    on Nov 24, 2026
  2. waleedkadous commented on Nov 24, 2026

    @waleedkadous
    ContributorAuthor

    Owner revision at the spec gate: the combined panel is one hierarchy, not three sections

    The owner's words, on reading the spec:

    on the combined panel, they should share a single combined hierarchy of towers -> architects / decisions screens -> builders spawned by the architects.

    This supersedes the issue body's reading of step 2 ("one view with three sections", Workspace / Tower / Agents side by side). The spec's section-based design (three section headers, three delegated providers) is replaced. Steps 1 and 3 are unaffected, except where step 3's Decisions panel is now also reachable from the tree.

    The hierarchy

    One tree, one hierarchy:

    1. Tower at the top.
    2. Architects, and a Decisions entry alongside them.
    3. Under each architect, the builders that architect spawned.

    My reading of the level the owner didn't spell out: architects and the decisions file both belong to a workspace, and Tower knows many workspaces, so I expect a workspace level between Tower and architects (Tower → workspace → architects + Decisions → builders). That is my inference, not the owner's word. If the spec finds a better way to make twelve workspaces' main architects distinguishable without it, propose it and flag it at the gate.

    What the spec needs to place in the new shape

    Nothing the three source views do today should silently disappear from the combined panel. For each of these, the spec says where it lives in the hierarchy, or that it is deliberately left to the existing views:

    • Workspace actions: Spawn Builder, New Shell, Start/Stop Dev and dev URLs, Open Web Interface, Add/Remove Architect.
    • Architect rows: click opens that architect's terminal, under the vscode: open-architect silently substitutes architects[0] for a non-live 'main', strips the disambiguating label, and captures the text-injection path #1497 invariant.
    • Decisions entry: opens that workspace's Decisions screen. Say what it shows for a workspace with no decisions file, and whether it carries a pending-count.
    • Builder rows: the existing actions (open terminal, approve gate, view spec/plan/review/diff, worktree, dev) and the changed-files expansion.
    • Tower's attention rows: pending gates, waits, architects at a prompt, held mail, queued feedback; plus Open/Deactivate and the dormant-workspaces group.
    • Builders with no recorded spawning architect, and architects with no builders.
    • Grouping axes: the hierarchy fixes the architect axis. Stage/area grouping stays in the existing Agents view unless the spec finds a natural place for it.
    • Builder-worktree and no-workspace windows.

    Data

    Check what Tower actually exposes today for workspaces other than the window's own: their architects, their builders, and each builder's owning architect. If the hierarchy needs data Tower doesn't serve, say so in the spec and bring it to the gate as a scope question. Don't add a per-workspace poll loop to paper over it, and don't quietly drop the spec's "no Tower route changes" constraint.

    The single-source-of-truth requirement stands: the combined panel still reads the existing caches and reuses the existing row-building and action wiring. There is still no second copy of fetch or row logic.

    Still open from the gate

    The owner has not yet ruled on the other points raised at the gate (first-show trigger, terminalPosition override, worktree windows, shared package, whether the button is on for every user, builder terminals landing over Work). The gate is not approved.

  3. waleedkadous commented on Nov 24, 2026

    @waleedkadous
    ContributorAuthor

    Owner confirmed the hierarchy, workspace level included. His words:

    towers -> workspaces -> architects / decisions -> builders.

    So the workspace level in my previous comment is no longer my inference — it is the owner's word. The combined panel's tree is: Tower → workspaces → each workspace's architects plus its Decisions entry → under each architect, the builders it spawned.

  4. waleedkadous commented on Nov 24, 2026

    @waleedkadous
    ContributorAuthor

    Owner ruled on the remaining spec-gate points ("go with your recommendation"), so the spec is approved with these:

    1. Other workspaces' rows: navigate-only in this spec. Acting in place is a follow-up: vscode: Cockpit — act on other workspaces' rows from the current window (terminals, builder actions, Decisions) #1969
    2. Decisions entry: no pending count in this spec. The additive Tower overview field is a follow-up: Decisions summary in Tower's overview payload, so the Cockpit's Decisions entry can show a pending count #1970
    3. Dev URLs: one Open Dev URL… context-menu entry on the workspace row, as specced.
    4. First auto-arrange notice: add it — a one-time notification on the first auto-arrange with a Don't arrange automatically action that turns codev.cockpit.autoArrange off.

    The nice-to-know defaults stand as specced (the window's workspace keeps its urgency slot; Decisions sits after the architects).

  5. waleedkadous commented on Nov 24, 2026

    @waleedkadous
    ContributorAuthor

    Implementation note (architect, pending the owner's review at the PR gate): the Cockpit in a dormant window.

    The spec says that in a window with no Codev workspace the Cockpit still lists the fleet and every workspace's rows navigate. That holds in the Codev IDE with no workspace open (the ide-empty tier, which connects to Tower). It does not hold in a dormant window — stock VS Code with the marketplace extension, opened on a folder without Codev — because #1144 keeps that window inert: the Tower connection is never initialised there. The spec's line that today's Tower view shows the fleet in such a window was wrong for this tier.

    I told the builder to keep #1144's inertness: a dormant window's Cockpit shows a Not connected to Tower row that says why, with the Open Folder link. Connecting from a dormant window (automatically or on a click) would weaken #1144, which is the owner's call, not ours. This is a deviation from one spec criterion in one window type; it is listed for the owner at the PR gate and can become a follow-up if he wants the fleet there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/vscode

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions