Owner review round G: native task-index archive, project identity, 13 polish items #31

Merged
ClaudiuSchuster merged 1 commit from oss-oo/observatory-review-polish-view20260924 into main 2026-09-24 20:36:11 +00:00
Owner

What

All 13 items of the owner review, plus the two mechanism fixes verified against the installed desktop bundle (2026-09-24).

Archive rework — the native store

  • Membership and the archive/unarchive buttons now drive tasks.archived in ~/.zcode/v2/tasks-index.sqlite — exactly what the ZCode sidebar archive reads/writes. The manual archive patches only the flag (no updated_at bump) and the auto-archive runs the same single-column UPDATE we mirror; one parameterized statement keyed by (workspace_key, task_id); no-task-row refused honestly (409); running-turn guard and locked-DB 503 kept.
  • session.time_archived mechanism removed; one-shot startup migration clears leftovers (verified: only the v1.5.0 e2e entry existed).
  • Refresh honesty documented: a running ZCode reflects observatory archives after its sidebar re-queries; the observatory picks up desktop archives live (task index re-read every refresh).

Project identity

  • Color by PROJECT (repository identity) derived from the session directory: linked-worktree .git pointer → main repo name; other .git → basename; plain dirs → worktree-slot <repo>-<hex> (date-suffixed slugs excluded), else basename. Deterministic, cached, documented; legend shows project names; session.project_id never used.

The 13 items

  1. Prompt expand (⤢/⤡) toggling the steer textarea to ~8 lines and back
  2. Dock foreground above panels (z 70); modal + transcript keep a bottom margin; dock click while a panel is open switches directly
  3. Session title right-aligned on the spanning second line
  4. ID column slimmed to the Parent width (122 px)
  5. Models column dark bar removed — the cell is now strictly single-line (wrapped/ellipsized chips read as anonymous dark pills); muted +N overflow instead of stacked chips
  6. Reasoning level next to the model chip (· max/· low, from the newest model_usage row — same semantics as the steer line)
  7. Header "Last activity" → "Activity", column 116 → 88 px
  8. Primary button = Archive height, narrower, mint fill kept
  9. Project colors by derived repository identity (same repo = same color across all worktrees)
  10. Clickable legend chips filter to a project (persisted per page session)
  11. History collapsible, default open (Archived stays default closed)
  12. Archived section = native task-index membership (all 8 real archived sessions show, including non-dispatcher desktop chats)
  13. Archive confirm ask (Enter confirms, Esc cancels)

Evidence

  • CDP e2e over a fixture DB (session DB + task index + .git-pointer worktrees): 21/21 checks pass, screenshots in /tmp/pinky-polish2-evidence/ (before/after).
  • New backend against a copy of the real DBs: all 8 native-archived sessions in the Archived section, reasoning + project fields correct, /api/sessions latency unchanged (~1.1 s vs ~1.07 s before).
  • Startup migration cleared the v1.5.0-era time_archived leftover from the fixture; live DB untouched by dev (research read-only; the owner instance on 8767 never restarted).
  • Gates: pinned Super-Linter slim v8.7.0 (project lane scope) EXIT 0; py_compile clean.
## What All 13 items of the owner review, plus the two mechanism fixes verified against the installed desktop bundle (2026-09-24). ### Archive rework — the native store - Membership and the archive/unarchive buttons now drive `tasks.archived` in `~/.zcode/v2/tasks-index.sqlite` — exactly what the ZCode sidebar archive reads/writes. The manual archive patches only the flag (no `updated_at` bump) and the auto-archive runs the same single-column UPDATE we mirror; one parameterized statement keyed by `(workspace_key, task_id)`; no-task-row refused honestly (409); running-turn guard and locked-DB 503 kept. - `session.time_archived` mechanism removed; one-shot startup migration clears leftovers (verified: only the v1.5.0 e2e entry existed). - Refresh honesty documented: a running ZCode reflects observatory archives after its sidebar re-queries; the observatory picks up desktop archives live (task index re-read every refresh). ### Project identity - Color by PROJECT (repository identity) derived from the session directory: linked-worktree `.git` pointer → main repo name; other `.git` → basename; plain dirs → worktree-slot `<repo>-<hex>` (date-suffixed slugs excluded), else basename. Deterministic, cached, documented; legend shows project names; `session.project_id` never used. ### The 13 items 1. Prompt expand (⤢/⤡) toggling the steer textarea to ~8 lines and back 2. Dock foreground above panels (z 70); modal + transcript keep a bottom margin; dock click while a panel is open switches directly 3. Session title right-aligned on the spanning second line 4. ID column slimmed to the Parent width (122 px) 5. Models column dark bar removed — the cell is now strictly single-line (wrapped/ellipsized chips read as anonymous dark pills); muted `+N` overflow instead of stacked chips 6. Reasoning level next to the model chip (`· max`/`· low`, from the newest `model_usage` row — same semantics as the steer line) 7. Header "Last activity" → "Activity", column 116 → 88 px 8. Primary button = Archive height, narrower, mint fill kept 9. Project colors by derived repository identity (same repo = same color across all worktrees) 10. Clickable legend chips filter to a project (persisted per page session) 11. History collapsible, default open (Archived stays default closed) 12. Archived section = native task-index membership (all 8 real archived sessions show, including non-dispatcher desktop chats) 13. Archive confirm ask (Enter confirms, Esc cancels) ## Evidence - CDP e2e over a fixture DB (session DB + task index + `.git`-pointer worktrees): **21/21 checks pass**, screenshots in /tmp/pinky-polish2-evidence/ (before/after). - New backend against a copy of the real DBs: all 8 native-archived sessions in the Archived section, reasoning + project fields correct, `/api/sessions` latency unchanged (~1.1 s vs ~1.07 s before). - Startup migration cleared the v1.5.0-era `time_archived` leftover from the fixture; live DB untouched by dev (research read-only; the owner instance on 8767 never restarted). - Gates: pinned Super-Linter slim v8.7.0 (project lane scope) EXIT 0; py_compile clean.
Owner review round G: native task-index archive, project identity, 13 polish items
All checks were successful
Checks / Functional checks (pull_request) Successful in 14s
9d888e6ad1
Archive rework (the mechanism change):
- Archived section membership + archive/unarchive buttons now drive the
  desktop's OWN store: tasks.archived in ~/.zcode/v2/tasks-index.sqlite,
  the exact flag the ZCode sidebar's archive reads/writes (verified
  against the installed desktop bundle: manual archive patches the flag
  without bumping updated_at; the auto-archive writes the same single
  column UPDATE we mirror). One parameterized statement, row located via
  its (workspace_key, task_id) primary key; no task row yet is refused
  honestly; running-turn guard and locked-DB 503 stay.
- session.time_archived mechanism removed everywhere; a one-shot startup
  migration clears leftover values (the v1.5.0-era test entry was the
  only one on this station). Refresh honesty documented: a running ZCode
  reflects observatory archives only after its sidebar re-queries; the
  observatory picks up desktop archives live.

Project identity (color by repository, never by worktree slug):
- project_of(cwd): linked-worktree .git pointer -> main repo name; any
  other .git -> basename; plain dirs resolve <repo>-<hex> worktree slots
  (date-suffixed session slugs excluded), else basename. Cached; legend
  shows project names; native session.project_id never used.
- Legend chips are clickable: one click filters the tables to that
  project, click again clears (kept for the page session).

Row & console polish (owner review items):
- Prompt expand control (⤢/⤡) toggling the steer textarea to ~8 lines.
- Dock rides above every panel (z 70); modal and transcript keep a
  bottom margin; a dock click while a panel is open switches directly.
- Session title right-aligned on the spanning second line (always
  readable); ID column slimmed to the Parent width (122px).
- Models cell: strictly single line (wrapped chips read as dark bars) —
  one chip, muted +N overflow, and the reasoning level (· max/low/…)
  from the newest model_usage row, consistent with the steer line.
- 'Last activity' header renamed 'Activity' (slimmer column); primary
  button matches the Archive button height, slightly narrower, mint.
- History collapsible (same spoiler mechanics, default open; Archived
  stays default closed); Archive button opens a lightweight confirm
  (Enter confirms, Esc cancels).
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
OSS-Singularity/zcode-dispatch-observatory!31
No description provided.