remove the projects feature

Being retired, so it is deleted rather than fixed — it had both defects dashboards just
had (edit dropping ?selected=, an abandoned edit following you onto the next item) and
repairing them was work for something on its way out.

Gone: the two screens and the panel apps, the three routes, the dock item and its entry
in the default dock paths (client and the three server-side copies), the page-title rule,
the app-registry entries, the barrel exports, the `projects` table with its queries and
row types, and the proj-meta/proj-layout/proj-terminals/proj-host-terminals branches in
the dashboards endpoint. The chat context and terminal state-key special cases for
`proj-layout-` went with them.

Deliberately kept: `getUserProjectsDir` in data-path.ts — the apps and dev-server routers
resolve user apps under the same on-disk Projects/ directory and are unrelated to this
feature. Nothing on disk is touched.

Needs `bun db:push` to drop the table; the schema change is the only thing standing
between the code and the database. One row was in it.

tsgo clean, 56/56 tests, no references left in src. Not yet exercised at runtime — the
restart is what will prove it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-30 08:16:27 +00:00
co-authored by Claude Opus 5
parent 4970e7e70f
commit 5a1e3d7e0b
27 changed files with 95 additions and 1411 deletions
+18 -28
View File
@@ -66,39 +66,29 @@ on refresh or a pasted URL — now runs on every ordinary click, and it calls `s
- [x] **J7** Both panels (Running/Queued **and** History) navigate correctly.
- [x] **J8** Different detail types still render (script terminal / pipeline steps / download).
## D — Dashboards (`/dashboards`) — H2 — 2/13 (highest risk: never runtime-tested)
## D — Dashboards (`/dashboards`) — H2 — 12/13 ✅ (D12-edit on mobile: not fixed, mobile web being retired)
- [x] **D1** Click a row → URL becomes `/dashboards?selected=<id>`.
- [x] **D2** The preview panel shows that dashboard.
- [ ] **D3** The clicked row is highlighted.
- [ ] **D4** Preview's "open" arrow overlay → `/dashboards/<id>` (full page).
- [ ] **D5** "New Dashboard" → create form appears; `?selected=` cleared from the URL.
- [ ] **D6** Create a dashboard → navigates to the full `/dashboards/<id>`.
- [ ] **D7** Edit (pencil) → edit form appears; does **not** navigate.
- [ ] **D8** Save an edit → preview shows the edited dashboard (`?selected=<newid>`).
- [ ] **D9** Delete → removed; if it was selected, the preview clears.
- [ ] **D10** Edit/delete buttons do **not** trigger navigation (siblings of the link, not nested).
- [ ] **D11** A dashboard row **outside** `/dashboards` opens `/dashboards/<id>` directly.
- [ ] **D12** Mobile: selecting shows the detail panel; back clears it.
- [ ] **D13** Deep-link `/dashboards?selected=<id>` in a fresh tab → preview shows it.
- [x] **D3** The clicked row is highlighted.
- [x] **D4** Preview's "open" arrow overlay → `/dashboards/<id>` (full page).
- [x] **D5** "New Dashboard" → create form appears; `?selected=` cleared from the URL.
- [x] **D6** Create a dashboard → navigates to the full `/dashboards/<id>`.
- [!] **D7** Edit (pencil) → edit form appears; does **not** navigate.
- [x] **D8** Save an edit → preview shows the edited dashboard (`?selected=<newid>`).
- [x] **D9** Delete → removed; if it was selected, the preview clears.
- [x] **D10** Edit/delete buttons do **not** trigger navigation (siblings of the link, not nested).
- [x] **D11** A dashboard row **outside** `/dashboards` opens `/dashboards/<id>` directly.
- [~] **D12** Mobile: selecting shows the detail panel; back clears it.
- [x] **D13** Deep-link `/dashboards?selected=<id>` in a fresh tab → preview shows it.
## P — Projects (`/projects`) — H3 — 0/15 (mirror of D, also never runtime-tested)
## P — Projects — DROPPED
- [ ] **P1** Click a row → URL becomes `/projects?selected=<id>`.
- [ ] **P2** The preview shows that project.
- [ ] **P3** The clicked row is highlighted.
- [ ] **P4** Preview "open" arrow → `/projects/<id>` (full page).
- [ ] **P5** "New Project" → create form; `?selected=` cleared.
- [ ] **P6** Create a project → navigates to `/projects/<id>`.
- [ ] **P7** Edit (pencil) → edit form; no navigation.
- [ ] **P8** Save an edit → preview shows the edited project (`?selected=<newid>`).
- [ ] **P9** Delete → removed; clears preview if selected.
- [ ] **P10** Publish (rocket) → opens the publish dialog; does **not** navigate.
- [ ] **P11** Publish/edit/delete buttons don't trigger navigation.
- [ ] **P12** A project row **outside** `/projects` opens `/projects/<id>` directly.
- [ ] **P13** `/projects/new` → lands on `/projects` in create mode.
- [ ] **P14** Mobile: select shows detail; back clears it.
- [ ] **P15** Deep-link `/projects?selected=<id>` → preview shows it.
The Projects feature was removed rather than fixed (see the deletion commit). All 15 P checks are void.
It had the same two defects Dashboards had — edit clearing `?selected=`, and an abandoned edit following
you to the next item — plus the same structure that caused them: the form reachable only through the
empty state. None of it was worth repairing for a feature being retired.
## X — Chat lazy-load × sidecars — 0/3
+67
View File
@@ -0,0 +1,67 @@
# Remaining tests — run these yourself
**6 checks left: X1X3 and R1R3.** Everything else is done or dropped (see the tally at the bottom).
Each line is a single yes/no. Report as "X1 ok, R2 needs fix".
**Pre-req:** running `master` at `18e732f` or later, `pm2 restart officer` done, browser hard-refreshed
(Ctrl/Cmd-Shift-R). A stale bundle looks exactly like a failure.
---
## X — Chat lazy-load × sidecars (3)
This block is why the two branches had to be merged before testing: it exercises the **lazy-loaded
transcript window** (navigation work) against the **sidecar-written durable event log** (sidecar work).
They meet at the `prevSeq` continuity check in `useChat.ts` — the client compares each durable message's
`prevSeq` against the cursor it holds, and shows a warning banner if they disagree.
The risk is a **false alarm**: loading only the tail of a transcript means the client starts mid-chain,
and if that's mishandled it reports missing output that isn't actually missing.
- [ ] **X1** — Open a long chat (this session, or `0aebeea6`). Expect **no** banner reading
"⚠️ Some output could not be recovered — part of this conversation is missing above."
*A banner here is a false positive: the events are on disk, the window just started mid-chain.*
- [ ] **X2** — In that same chat, send a new message. The reply streams in and appends **below** the
loaded tail, in the right order. Nothing duplicated, nothing inserted mid-transcript.
- [ ] **X3** — The nasty one. In a long chat: scroll up until older messages load, then send a new turn.
The older messages you just loaded must **still be there** — not wiped back to the tail window.
Variant worth trying: scroll up to load history, then `pm2 restart officer` to force a socket
reconnect and replay. Same expectation.
## R — Quick regressions (3)
- [ ] **R1** — Search/filter boxes still filter the list, on `/jobs` and `/dashboards`.
*(Projects is being removed — skip it there.)*
- [ ] **R2** — No new console errors on `/jobs`, `/dashboards`, `/chat`. Open devtools, visit each,
click a couple of rows. Red errors are a fail; warnings are fine.
- [ ] **R3** — Browser **back/forward** moves between selections sensibly now that selection is in the
URL. E.g. on `/dashboards`: click A, click B, press back → you should be on A with its preview.
Worth also checking back out of `/chat/<id>` and `/jobs/<id>`.
---
## Tally
| block | result |
|---|---|
| **C** — chat list & routing | **6/6** ✅ (C4 was broken → fixed, `d8cf79b`) |
| **L** — long-transcript lazy-load | **8/8** ✅ |
| **J** — jobs | **8/8** ✅ |
| **D** — dashboards | **12/13** ✅ (D7/D8 broken → fixed, `18e732f`; D12-edit on mobile not fixed, see below) |
| **P** — projects | **dropped** — feature being removed |
| **X** — lazy-load × sidecars | 0/3 — **yours to run** |
| **R** — regressions | 0/3 — **yours to run** |
**34 verified, 6 remaining, 15 dropped with Projects.**
### Known and deliberately not fixed
- **D12 (mobile, edit)** — on a phone, tapping edit on a dashboard opens the form in a panel you can't
see. Select and New both work. Not fixed: mobile web is being discontinued in favour of the app.
If that ever changes, the cause is the same shape as the desktop bug fixed in `18e732f`
`ProjectListScreen`/`DashboardsScreen` decide the mobile panel from `selected` (and `creating`),
but not from `editing`.