Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
080fe81
chore(porch): 1963 init spir
waleedkadous Nov 24, 2026
914ae87
[Spec 1963] Initial specification draft
waleedkadous Nov 24, 2026
ca5162d
chore(porch): 1963 specify build-complete
waleedkadous Nov 24, 2026
aca1e16
[Spec 1963] Specification with multi-agent review
waleedkadous Nov 24, 2026
96939d9
chore(porch): 1963 spec-approval gate-requested
waleedkadous Nov 24, 2026
365740b
[Spec 1963] Thread: spec consultation and gate
waleedkadous Nov 24, 2026
49db12c
[Spec 1963] Rebuttal for spec review iteration 1
waleedkadous Nov 24, 2026
76e1dc4
[Spec 1963] Specification with user feedback: single Tower → workspac…
waleedkadous Nov 24, 2026
af957cf
[Spec 1963] Thread: hierarchy revision
waleedkadous Nov 24, 2026
f18ec4f
[Spec 1963] Hierarchy revision: address re-consultation feedback
waleedkadous Nov 24, 2026
95029fd
[Spec 1963] Record spec-gate rulings; add first auto-arrange notice
waleedkadous Nov 24, 2026
1cb3000
chore(porch): 1963 spec-approval gate-approved
waleedkadous Nov 24, 2026
29ac171
chore(porch): 1963 plan phase-transition
waleedkadous Nov 24, 2026
9475ca9
[Spec 1963] Initial implementation plan
waleedkadous Nov 24, 2026
125157c
chore(porch): 1963 plan build-complete
waleedkadous Nov 24, 2026
3958e4d
[Spec 1963] Thread: spec approved, plan drafted
waleedkadous Nov 24, 2026
08699b0
[Spec 1963] Plan with multi-agent review
waleedkadous Nov 24, 2026
6efe704
chore(porch): 1963 plan re-iter (iter 2)
waleedkadous Nov 24, 2026
80fc8df
chore(porch): 1963 plan build-complete
waleedkadous Nov 24, 2026
5e74a52
[Spec 1963] Plan with multi-agent review (iteration 2)
waleedkadous Nov 24, 2026
0d109a4
chore(porch): 1963 plan-approval gate-requested
waleedkadous Nov 24, 2026
d9fc55d
[Spec 1963] Thread: plan consultation, plan-approval
waleedkadous Nov 24, 2026
c1030da
[Spec 1963] Plan: harness reaches only the isolated Tower (no Tower-c…
waleedkadous Nov 24, 2026
1e0378b
[Spec 1963] Plan: harness becomes Phase 1 with the layout spike; revi…
waleedkadous Nov 24, 2026
43b79ae
[Spec 1963] Thread: harness revision
waleedkadous Nov 24, 2026
d8c3873
[Spec 1963] Plan: webview CSP default-src 'none' and scenario-22 tests
waleedkadous Nov 24, 2026
922aee1
[Spec 1963] Plan: confirmation-round fixes (issue-id parity, import b…
waleedkadous Nov 24, 2026
f04c694
[Spec 1963] Plan: layout spike run before approval — all four cases h…
waleedkadous Nov 24, 2026
33d0ddd
chore(porch): 1963 plan-approval gate-approved
waleedkadous Nov 24, 2026
5b9e19b
chore(porch): 1963 plan build-complete
waleedkadous Nov 24, 2026
045552e
chore(porch): 1963 implement phase-transition
waleedkadous Nov 24, 2026
72e9015
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
2412180
[Spec 1963][Phase: verification_harness] feat: isolated verification …
waleedkadous Nov 24, 2026
84ed62e
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
ef05107
[Spec 1963][Phase: verification_harness] fix: ide-server VS Code mode…
waleedkadous Nov 24, 2026
2417bb5
chore(porch): 1963 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
21397fe
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
67d9076
[Spec 1963][Phase: verification_harness] fix: content-digest vsix fre…
waleedkadous Nov 24, 2026
8e192e4
chore(porch): 1963 advance plan phase → fleet_overviews
waleedkadous Nov 24, 2026
0f53ccf
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
acd2a93
[Spec 1963][Phase: fleet_overviews] feat: keep each active workspace'…
waleedkadous Nov 24, 2026
dafe95a
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
17ec98b
[Spec 1963][Phase: fleet_overviews] docs: thread entry for Phase 2
waleedkadous Nov 24, 2026
d21d998
[Spec 1963][Phase: fleet_overviews] docs: retained overview is shared…
waleedkadous Nov 24, 2026
a89159c
chore(porch): 1963 advance plan phase → architect_tree_builder
waleedkadous Nov 24, 2026
252491c
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
57963d0
[Spec 1963][Phase: architect_tree_builder] feat: reusable, workspace-…
waleedkadous Nov 24, 2026
fd11b54
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
5954466
[Spec 1963][Phase: architect_tree_builder] fix: review notes — naviga…
waleedkadous Nov 24, 2026
7763f1d
chore(porch): 1963 advance plan phase → cockpit_hierarchy
waleedkadous Nov 24, 2026
39ae22a
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
18f10db
[Spec 1963][Phase: cockpit_hierarchy] feat: Codev Cockpit button and …
waleedkadous Nov 24, 2026
ecb0812
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
6cefa05
[Spec 1963][Phase: cockpit_hierarchy] fix: review notes — badge follo…
waleedkadous Nov 24, 2026
8df51c2
[Spec 1963][Phase: cockpit_hierarchy] docs: entryOfRow's throw is the…
waleedkadous Nov 24, 2026
f0148bc
chore(porch): 1963 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
d211f16
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
a3a1837
[Spec 1963][Phase: cockpit_hierarchy] docs: thread — iteration 2 appr…
waleedkadous Nov 24, 2026
e5e9f76
chore(porch): 1963 advance plan phase → cockpit_actions
waleedkadous Nov 24, 2026
cbce2b1
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
8cecfe8
[Spec 1963] Thread: architect ruling (b) on the agent cycle for Phase 5
waleedkadous Nov 24, 2026
063a471
[Spec 1963][Phase: cockpit_actions] feat: Cockpit row actions — menus…
waleedkadous Nov 24, 2026
17c1b73
[Spec 1963][Phase: cockpit_actions] test: menu-parity oracle, parity …
waleedkadous Nov 24, 2026
67fda9e
[Spec 1963][Phase: cockpit_actions] fix: Spawn Builder runs afx spawn…
waleedkadous Nov 24, 2026
af390da
[Spec 1963][Phase: cockpit_actions] test: increment-1 rendered verifi…
waleedkadous Nov 24, 2026
8001fa1
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
0da7092
[Spec 1963][Phase: cockpit_actions] test: unanchored source-view filt…
waleedkadous Nov 24, 2026
1edc2b4
chore(porch): 1963 advance plan phase → workspace_views_package
waleedkadous Nov 24, 2026
e3c8f9a
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
7aa7363
[Spec 1963][Phase: workspace_views_package] feat: shared Work/Decisio…
waleedkadous Nov 24, 2026
fff3a22
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
b159f7a
[Spec 1963][Phase: workspace_views_package] fix: host-owned links, on…
waleedkadous Nov 24, 2026
7a02a71
chore(porch): 1963 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
9be7c7e
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
8a37cad
chore(porch): 1963 advance plan phase → decisions_panel
waleedkadous Nov 24, 2026
1a2585e
[Spec 1963][Phase: workspace_views_package] docs: thread — iteration …
waleedkadous Nov 24, 2026
2330252
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
e770c1f
[Spec 1963][Phase: decisions_panel] feat: Decisions panel in VS Code,…
waleedkadous Nov 24, 2026
55b2944
[Spec 1963][Phase: decisions_panel] fix: reload restore and high-cont…
waleedkadous Nov 24, 2026
c1bd6be
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
5d15ce0
[Spec 1963][Phase: decisions_panel] fix: refused remote images, reada…
waleedkadous Nov 24, 2026
550ba20
[Spec 1963][Phase: decisions_panel] docs: iteration 1 review responses
waleedkadous Nov 24, 2026
80d8af2
chore(porch): 1963 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
f388b5a
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
70c7f36
chore(porch): 1963 advance plan phase → work_panel
waleedkadous Nov 24, 2026
20fe8eb
[Spec 1963][Phase: decisions_panel] docs: thread — iteration 2 approv…
waleedkadous Nov 24, 2026
0bd7b0d
[Spec 1963][Phase: decisions_panel] docs: thread — two pre-existing W…
waleedkadous Nov 24, 2026
6b340c6
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
a9b148b
[Spec 1963][Phase: work_panel] feat: Work panel in VS Code, fed from …
waleedkadous Nov 24, 2026
bb3e257
[Spec 1963][Phase: work_panel] fix: Work readable and whole in a half…
waleedkadous Nov 24, 2026
432d706
[Spec 1963][Phase: work_panel] fix: progress track visible in Light M…
waleedkadous Nov 24, 2026
22d28d4
[Spec 1963][Phase: work_panel] docs: Phase 8 rendered evidence (verif…
waleedkadous Nov 24, 2026
30fdcd0
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
d51e28e
[Spec 1963][Phase: work_panel] fix: panels sized and toned like the w…
waleedkadous Nov 24, 2026
f14ddaa
[Spec 1963][Phase: work_panel] docs: evidence at b3aa8873 (work 14/14…
waleedkadous Nov 24, 2026
ce43aeb
[Spec 1963][Phase: work_panel] fix: review round — loading under the …
waleedkadous Nov 24, 2026
669cde0
[Spec 1963][Phase: work_panel] docs: iteration 1 responses; evidence …
waleedkadous Nov 24, 2026
a50cd80
chore(porch): 1963 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
cd1aa80
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
ccd025a
[Spec 1963][Phase: work_panel] chore: drop an unused class from the l…
waleedkadous Nov 24, 2026
7a17598
chore(porch): 1963 advance plan phase → arrange_cockpit
waleedkadous Nov 24, 2026
6a5b76f
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
b57b78e
[Spec 1963][Phase: work_panel] docs: thread — Phase 8 closed, PR body…
waleedkadous Nov 24, 2026
2323785
[Spec 1963][Phase: arrange_cockpit] feat: Arrange Cockpit — main | (W…
waleedkadous Nov 24, 2026
703442b
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
77f61a7
[Spec 1963][Phase: arrange_cockpit] fix: refuse a namesake architect …
waleedkadous Nov 24, 2026
9b0c3ae
chore(porch): 1963 implement re-iter (iter 2)
waleedkadous Nov 24, 2026
a9d8c7a
chore(porch): 1963 implement build-complete
waleedkadous Nov 24, 2026
38bfd17
[Spec 1963][Phase: arrange_cockpit] fix: wait out a closing namesake;…
waleedkadous Nov 24, 2026
4a15d5a
chore(porch): 1963 all plan phases complete → review
waleedkadous Nov 24, 2026
3907123
chore(porch): 1963 acknowledge context refresh
waleedkadous Nov 24, 2026
8e2d3fb
[Spec 1963][Phase: review] test: render the arrange fixes; bare harne…
waleedkadous Nov 24, 2026
bded2c4
[Spec 1963] Review: review document, lessons, final-code rendered evi…
waleedkadous Nov 24, 2026
548bb7e
chore(porch): 1963 review build-complete
waleedkadous Nov 24, 2026
eb705f3
[Spec 1963][Phase: review] fix: PR review iteration 1 (claude): no ra…
waleedkadous Nov 24, 2026
226e1a0
Merge origin/main into builder/spir-1963 (3.3.8; CHANGELOG and lesson…
waleedkadous Nov 24, 2026
54d03f8
[Spec 1963][Phase: review] test: the arrange wiring throws without a …
waleedkadous Nov 24, 2026
b8a634e
[Spec 1963] Move rendered evidence to the evidence/spir-1963 branch; …
waleedkadous Nov 24, 2026
2b3f876
[Spec 1963] Review: PR consultation iteration 1 rebuttals
waleedkadous Nov 24, 2026
6d4a21d
chore(porch): 1963 pr gate-requested
waleedkadous Nov 24, 2026
c92790c
[Spec 1963][Phase: review] feat: log a warning when an on-screen pane…
waleedkadous Nov 24, 2026
7db2da9
[Spec 1963] docs(changelog): the Codev button's badge clears while To…
waleedkadous Nov 24, 2026
e29d97f
[Spec 1963][Phase: review] test: the dashboard's Work wrapper maps Op…
waleedkadous Nov 24, 2026
0a8414f
[Spec 1963] ci: syntax-check the cockpit harness scripts in the unit job
waleedkadous Nov 24, 2026
2613cd9
[Spec 1963] Review: the owner's decisions in one section
waleedkadous Nov 24, 2026
644a5eb
[Spec 1963] harness: the tripwire stops the run; ide-server settings …
waleedkadous Nov 24, 2026
6fc8b5f
[Spec 1963] Review: the tripwire incident, and 1.138.0/1.128 unverifi…
waleedkadous Nov 24, 2026
4551275
[Spec 1963] Spec: the dormant window's behaviour, as the owner ruled …
waleedkadous Nov 24, 2026
513bbd9
[Spec 1963] Review: the owner's rulings at the PR gate; verification …
waleedkadous Nov 24, 2026
b164e48
[Spec 1963] Merge origin/main: named architects (#1957) and the suite…
waleedkadous Nov 24, 2026
8cad56b
[Spec 1963] harness: verify webviews, a diagnostic for panels that st…
waleedkadous Nov 24, 2026
10f4d9c
[Spec 1963] harness: close VS Code 1.128's modal Workspace Trust edit…
waleedkadous Nov 24, 2026
92a5ae4
[Spec 1963] Merge origin/main: porch failed-check logs (#1964)
waleedkadous Nov 24, 2026
1342db4
[Spec 1963] Work and Decisions carry their bundle inline (cluesmith/c…
waleedkadous Nov 24, 2026
ce4e75a
[Spec 1963] harness: activeEditorTab reads the active group's active tab
waleedkadous Nov 24, 2026
9cc06c4
[Spec 1963] Thread: the 1.138 diagnosis, the 1.128 runs, ruling ide-3
waleedkadous Nov 24, 2026
6cf6b5b
[Spec 1963] Panel style-src: 'unsafe-inline', no nonce, no source; bu…
waleedkadous Nov 24, 2026
4ab7ed1
[Spec 1963] Test where the inline-script escape rewrites, with TypeSc…
waleedkadous Nov 24, 2026
35334ef
[Spec 1963] harness: reveal opens README with quickOpenFile, which wa…
waleedkadous Nov 24, 2026
7cdc247
[Spec 1963] Panels state VS Code's webview defaults that the 1.138 ho…
waleedkadous Nov 24, 2026
d31df3a
[Spec 1963] harness: work's Tower-down check waits for Decisions' car…
waleedkadous Nov 24, 2026
a5295bc
[Spec 1963] Final verification: index, review, thread, governance notes
waleedkadous Nov 25, 2026
014a166
chore(porch): 1963 pr gate-approved
waleedkadous Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ jobs:
working-directory: packages/artifact-canvas
run: pnpm test

# Spec 1963: the shared Work and Decisions views. Source-exported (no build step); its
# tests include the import-boundary guard, and check-types covers the tests as well.
- name: Type-check and test workspace-views package
working-directory: packages/workspace-views
run: pnpm check-types && pnpm test

- name: Copy skeleton for unit tests
working-directory: packages/codev
run: pnpm copy-skeleton
Expand Down Expand Up @@ -106,6 +112,14 @@ jobs:
working-directory: apps/vscode
run: pnpm test:unit

# Spec 1963: the Cockpit's rendered-verification harness runs by hand only (it needs a
# browser, VS Code and its own Tower); CI at least keeps every script of it parsing.
- name: Syntax-check the cockpit harness
working-directory: apps/vscode/scripts/cockpit-harness
run: |
for f in *.mjs *.cjs stubs/*.mjs; do node --check "$f" || exit 1; done
for f in stubs/afx stubs/codev stubs/porch; do sh -n "$f" || exit 1; done

# Streamdeck check-types resolves the sdk's dist .d.ts — the "Build sdk
# package" step above must stay ahead of these.
- name: Type-check streamdeck plugin
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ jobs:
working-directory: packages/core
run: pnpm test

# Spec 1963: the VS Code webview path containment (realpath + path.relative) on real Windows
# paths: drive-letter case, separators and a directory junction leading outside the workspace.
- name: Run vscode webview path-containment tests
working-directory: apps/vscode
run: pnpm exec vitest run src/__tests__/workspace-views-security.test.ts

- name: Copy skeleton for unit tests
working-directory: packages/codev
run: pnpm copy-skeleton
Expand Down
3 changes: 3 additions & 0 deletions apps/vscode/.vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ src/**
.gitignore
.yarnrc
esbuild.js
esbuild.webview.cjs
vsc-extension-quickstart.md
**/tsconfig.json
**/tsconfig.*.json
**/eslint.config.mjs
**/*.map
**/*.ts
**/.vscode-test.*
scripts/cockpit-harness/**
14 changes: 14 additions & 0 deletions apps/vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Change Log

## [Unreleased]

### What's new

- **Codev Cockpit: the whole fleet in one tree.** A new button below Codev opens Tower → workspaces → architects → builders → changed files. This window's workspace keeps every action of the Workspace and Agents views, and another workspace's rows open that workspace's window (#1963).
- **Work and Decisions in VS Code.** `Codev: Open Work` and `Codev: Open Decisions` (or the Cockpit's Decisions entry) open the dashboard's Work and Decisions views in the editor area, in your color theme. Rule on decisions, open a builder's terminal, start a shell, and follow issue, PR and spec links without leaving the editor (#1963).
- **Arrange Cockpit: architect | Work over Decisions.** `Codev: Arrange Cockpit`, or the layout button on the Cockpit's title bar, puts the `main` architect on the left with Work above Decisions on the right. It also runs by itself the first time the Cockpit is shown in a window, and once a notice offers to turn that off (`codev.cockpit.autoArrange`). It never closes an editor, unsaved or untitled ones included (#1963).

### Fixes

- **Work and Decisions render in the Codev IDE 1.138.** That IDE's webview host cannot deliver a webview's files, so a panel that loads its code by URL stays blank there (cluesmith/codev-ide#67). The Work and Decisions panels now carry their code inside the page, on every VS Code version, and load nothing from the extension; only that page's own script runs. The contextual panel and the Markdown preview stay blank in that IDE until it is fixed.
- **The Codev button's badge clears while Tower is disconnected.** It kept the last count of builders needing attention through a Tower outage; it now repaints whenever the connection changes, and shows nothing until Tower is back.
- **Spawn Builder runs in this window's workspace.** It ran `afx spawn` in the extension host's own directory (Tower's, in the Codev IDE), so it could spawn into another project, or fail where that directory is no project. It now runs in this window's workspace, the parent workspace in a builder-worktree window, and without a workspace it says so instead of prompting.

## [3.3.8] - 2026-11-24

### What's new
Expand Down
63 changes: 62 additions & 1 deletion apps/vscode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,65 @@ The Codev sidebar contains seven collapsible views:
- **Team** — per-member counts (`Assigned: N`, `Open PRs: N`, `Last 7d: X merged, Y closed`). Manual refresh from the title bar.
- **Status** — connection state; click to reconnect if Tower drops.

## Codev Cockpit

The **Codev Cockpit** button sits directly below Codev in the Activity Bar. It opens one tree holding the machine's whole fleet:

```
Tower
├─ my-project (current) ← this window's workspace
│ ├─ MAIN
│ │ └─ #42 builder … ← changed files below each builder
│ └─ WEB
└─ other-project
└─ MAIN
└─ #7 builder …
Dormant (2)
```

- **Workspaces** are the Tower view's rows, in the same urgency order and with the same labels, *current* marker and attention summary. Every active workspace expands to its architects; dormant workspaces fold into *Dormant (N)*.
- **This window's workspace acts here.** Its builder rows carry the Agents view's full right-click menu and the inline Approve Gate. A sibling architect carries *Remove Architect*; `main` never does. The workspace row carries inline *Spawn Builder*, *New Shell* and *Add Architect*. Its right-click menu adds *Open Web Interface*, *Start Dev* or *Stop Dev*, and *Open Dev URL…* when `worktree.devUrls` is set.
- **Other workspaces navigate.** Clicking another workspace's architect or builder opens that workspace's window. Their rows carry no actions that would act from this window. Their workspace rows keep the Tower view's inline *Open* and *Deactivate*.
- **In a builder-worktree window**, the parent workspace's row carries only *Open Web Interface*, the worktree's *Start Dev* / *Stop Dev* and *Open Dev URL…*. It has no spawn, shell or architect actions.
- **Title bar:** *Arrange Cockpit* (below), Refresh, plus the same accordion and tree-vs-list toggles as Agents.
- **Following the active file:** a builder diff in the editor reveals its file row in the Cockpit, expanding the workspace, architect and builder rows above it.
- **Agent cycling** (`ctrl+alt+n` / `ctrl+alt+p`) follows the Cockpit's order while the Cockpit is visible, Agents is not, and the Cockpit shows this window's agents. Otherwise it keeps the Agents order, as before (for example in a builder-worktree window).
- **Before the first load** the Tower row holds a state row: *Connecting to Tower…*, then *Not connected to Tower* (click to reconnect) if the attempt fails. Once loaded, the tree keeps its last content through a Tower drop and refreshes when Tower returns.

The Cockpit reads what the Codev and Tower views already fetch. It adds no poll or stream of its own.

## Work and Decisions

The dashboard's **Work** and **Decisions** views open in the editor area, for this window's workspace:

- **Codev: Open Work** shows builders, Needs Attention, Backlog and Recently Closed. A builder's *Open* shows its terminal, *+ Shell* opens a new Tower shell, and *Refresh* re-reads the overview from Tower. Issue and PR links open in your browser; *spec*, *plan* and *review* links open the file in an editor.
- **Codev: Open Decisions**, or the *Decisions* entry under this window's workspace in the Cockpit, lets you rule on pending decisions as in the dashboard. Item images load inside the panel; click one to see it full size. A workspace without a decisions file shows how to start one (`afx decisions init`).
- Each panel is one per window: opening it again brings it forward. It comes back after a window reload, and follows your color theme, including high contrast. A Decisions draft survives the panel being hidden or moved, but not a window reload.
- While Tower is not connected, each panel keeps what it last showed, under a notice, and recovers when Tower returns.
- Neither is offered in a builder-worktree window or a window with no Codev workspace. There, the commands say why.
- Left out from the dashboard: *Open Files & Shells* (VS Code's editor tabs and terminal list do this), the *Files* panel (the Explorer does) and the tip of the day.

## Arrange Cockpit

**Codev: Arrange Cockpit** (the Command Palette, or the layout button on the Cockpit's title bar) arranges the editor area around the workspace's `main` architect:

```
+------------------+------------------+
| main architect | Work |
| (terminal) | |
| +------------------+
| | Decisions |
| | |
+------------------+------------------+
```

- Each of the three is the active tab in its group, and the architect has focus.
- **Nothing you have open is closed.** Your editors stay open, unsaved and untitled ones included, though some may move to another group: editors from groups beyond the three end up behind Decisions. An architect terminal, Work or Decisions panel that is already open is the same one, moved, never reopened, so a Decisions draft survives.
- **The architect is always `main`.** If `main` is not running you get the usual warning, no other architect is opened, and Work and Decisions are still arranged. The architect goes to the left editor group even when `codev.terminalPosition` is `panel`. Every other way of opening a terminal keeps honouring that setting. If another terminal has the architect's name (one you renamed, say), arranging stops before moving any editor and asks you to rename or close it: VS Code tells terminal tabs apart only by name. When it arranges by itself with Tower not connected, the architect is skipped without an error message.
- **It arranges by itself once per window.** The first time the Cockpit is shown in a window, including a window reopened with the Cockpit already showing, the editor area is arranged. Showing the Cockpit again leaves your layout alone, and a window reload starts over. The first time this happens for you, a notice says so and offers *Don't arrange automatically*, which turns `codev.cockpit.autoArrange` off. The command arranges at any time and is safe to repeat: an arranged window does not change.
- **Not in a builder-worktree window or a window with no Codev workspace.** There it never arranges by itself and the title-bar button is hidden. The command says why it does nothing.
- **Builder terminals and issue previews** that open in the second editor group land in the Work group while the split is in place. Where they should go instead is #1671's to settle.

## Builder actions (right-click)

Right-click any builder in the Agents view for three grouped action menus:
Expand Down Expand Up @@ -178,6 +237,7 @@ All actions are also reachable via the Command Palette (`Cmd/Ctrl+Shift+P`):
| Codev: Connect / Disconnect Tunnel | Cloud tunnel for remote access |
| Codev: Cron Tasks | List, run, enable, or disable cron tasks |
| Codev: Add Review Comment | Insert a `REVIEW(@architect):` comment at cursor |
| Codev: Arrange Cockpit | The `main` architect on the left, Work over Decisions on the right (see **Arrange Cockpit**) |

Right-click actions on builders and workspace rows are listed in the **Builder actions (right-click)** section above.

Expand Down Expand Up @@ -207,7 +267,8 @@ When a builder reaches a human-approval gate, a toast surfaces it with the issue
| `codev.towerHost` | `localhost` | Tower server host |
| `codev.towerPort` | `4100` | Tower server port |
| `codev.workspacePath` | auto-detect | Override workspace path for Tower matching |
| `codev.terminalPosition` | `editor` | Terminal placement (`editor` or `panel`) |
| `codev.terminalPosition` | `editor` | Terminal placement (`editor` or `panel`). *Arrange Cockpit* puts the `main` architect in the left editor group either way |
| `codev.cockpit.autoArrange` | `true` | Arrange the editor area the first time the Codev Cockpit is shown in a window. When off, only *Codev: Arrange Cockpit* arranges it |
| `codev.autoConnect` | `true` | Connect to Tower on activation |
| `codev.autoStartTower` | `true` | Auto-start Tower if not running |
| `codev.autoOpenBuilderTerminal` | `notify` | Behavior on builder-spawn events (`off` / `notify` / `auto`) |
Expand Down
15 changes: 14 additions & 1 deletion apps/vscode/esbuild.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const esbuild = require("esbuild");
const { decisionsWebviewConfig, workWebviewConfig } = require('./esbuild.webview.cjs');

const production = process.argv.includes('--production');
const watch = process.argv.includes('--watch');
Expand Down Expand Up @@ -83,8 +84,20 @@ const contextualPanelWebviewConfig = {
plugins: [esbuildProblemMatcherPlugin],
};

/** The Decisions panel's webview bundle (Spec 1963): `dist/webview/decisions.{js,css}`. */
const decisionsPanelWebviewConfig = {
...decisionsWebviewConfig({ production }),
plugins: [esbuildProblemMatcherPlugin],
};

/** The Work panel's webview bundle (Spec 1963): `dist/webview/work.{js,css}`. */
const workPanelWebviewConfig = {
...workWebviewConfig({ production }),
plugins: [esbuildProblemMatcherPlugin],
};

async function main() {
const configs = [extensionConfig, webviewConfig, contextualPanelWebviewConfig];
const configs = [extensionConfig, webviewConfig, contextualPanelWebviewConfig, decisionsPanelWebviewConfig, workPanelWebviewConfig];
if (watch) {
const contexts = await Promise.all(configs.map((c) => esbuild.context(c)));
await Promise.all(contexts.map((c) => c.watch()));
Expand Down
47 changes: 47 additions & 0 deletions apps/vscode/esbuild.webview.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/**
* The Work and Decisions panels' webview bundles (Spec 1963), as esbuild options. A module of its
* own so `esbuild.js` builds from it and the bundle tests (`decisions-webview-bundle.test.ts`,
* `work-webview-bundle.test.ts`) build the very same bundles, with no `dist` from an earlier build:
* CI runs the unit tests without one.
*
* - `jsx: 'automatic'` is explicit: these are the first TSX sources under `apps/vscode`, and
* esbuild would otherwise read the nearest `tsconfig.json`, which sets no `jsx`;
* - the imported stylesheets (the shared views', `vscode-theme.css` and, for Decisions, the
* markdown theme) are emitted next to the script as one `.css`;
* - `process.env.NODE_ENV` is defined so React's dev/prod branch resolves in the browser.
*/

const path = require('node:path');

/**
* One panel's bundle: `src/workspace-views/webview/<name>-main.tsx` → `dist/webview/<name>.{js,css}`.
* @param {string} name @param {{ production: boolean }} options @returns {import('esbuild').BuildOptions}
*/
function workspaceViewWebviewConfig(name, { production }) {
return {
absWorkingDir: __dirname,
entryPoints: [`src/workspace-views/webview/${name}-main.tsx`],
bundle: true,
format: 'iife',
minify: production,
// Inline, as the panel inlines the bundle itself (panel-template.ts): a map file beside it
// could not be fetched by the webview.
sourcemap: production ? false : 'inline',
sourcesContent: false,
platform: 'browser',
outfile: `dist/webview/${name}.js`,
loader: { '.css': 'css' },
jsx: 'automatic',
tsconfig: path.join(__dirname, 'tsconfig.webview.json'),
define: { 'process.env.NODE_ENV': production ? '"production"' : '"development"' },
logLevel: 'silent',
};
}

/** The Decisions panel's bundle. @param {{ production: boolean }} options */
const decisionsWebviewConfig = (options) => workspaceViewWebviewConfig('decisions', options);

/** The Work panel's bundle. @param {{ production: boolean }} options */
const workWebviewConfig = (options) => workspaceViewWebviewConfig('work', options);

module.exports = { decisionsWebviewConfig, workWebviewConfig };
25 changes: 23 additions & 2 deletions apps/vscode/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import typescriptEslint from "typescript-eslint";

export default [{
files: ["**/*.ts"],
files: ["**/*.ts", "**/*.tsx"],
}, {
plugins: {
"@typescript-eslint": typescriptEslint.plugin,
Expand Down Expand Up @@ -36,4 +36,25 @@ export default [{
message: "Use reg(...) or regCli(...) from extension.ts instead of bare vscode.commands.registerCommand — regCli adds the CLI-preflight guard (#791). If a registration legitimately can't use the helpers, add an eslint-disable-next-line with a one-line reason.",
}],
},
}];
}, {
// Spec 1963: the Work and Decisions webviews never contact Tower, or anywhere else. Every read
// and action is a message to the extension host, which holds the Tower connection. The CSP has
// no connect-src; this keeps the source honest too (CI runs the same check as
// workspace-views-webview-source.test.ts).
files: ["src/workspace-views/webview/**/*.ts", "src/workspace-views/webview/**/*.tsx"],
ignores: ["src/workspace-views/webview/__tests__/**"],
rules: {
"no-restricted-globals": ["error",
{ name: "fetch", message: "Webviews do no I/O: post a message to the extension host (Spec 1963)." },
{ name: "XMLHttpRequest", message: "Webviews do no I/O: post a message to the extension host (Spec 1963)." },
{ name: "WebSocket", message: "Webviews do no I/O: post a message to the extension host (Spec 1963)." },
{ name: "EventSource", message: "Webviews do no I/O: post a message to the extension host (Spec 1963)." },
],
"no-restricted-properties": ["error",
{ object: "window", property: "fetch", message: "Webviews do no I/O (Spec 1963)." },
{ object: "globalThis", property: "fetch", message: "Webviews do no I/O (Spec 1963)." },
{ object: "navigator", property: "sendBeacon", message: "Webviews do no I/O (Spec 1963)." },
{ object: "window", property: "open", message: "A webview cannot open browser tabs: ask the host (Spec 1963)." },
],
},
}];
Loading
Loading