Archived section (native time_archived), session pinning, hidden-machinery removal #26

Merged
ClaudiuSchuster merged 1 commit from oss-oo/observatory-archive-pin-hive20260924 into main 2026-09-24 17:38:35 +00:00
Owner

What

  • Archived section — a third, collapsed-by-default section listing sessions with session.time_archived set; full row affordances (response modal, transcript, pinning) plus Unarchive; History rows get Archive.
  • The narrow write exception — the observatory opens a read-write connection for exactly two parameterized statements (UPDATE session SET time_archived=? WHERE id=? / …=NULL WHERE id=?), ZCode store-native archive semantics (default list queries add time_archived is null unless includeArchived). Guards: 409 while a turn is running, friendly 503 when the DB is locked.
  • Pinning — per-row 📌 toggle in all sections, observatory-local state (observatory-state.json), pinned rows float to the top of their section, both blocks honor the selected sort, pagination keeps pinned rows on page 1 (POST /api/pin, POST /api/unpin, pinned flag in /api/sessions).
  • Legacy hidden machinery removed — Hidden section markup, /api/unhide, /api/restore, hidden in /api/sessions, load_hidden/save_hidden; a leftover hidden state key is dropped on first write.
  • README (native-semantics forensics paragraph, pin/archive docs, precise safety wording) + refreshed fixture screenshot.

Evidence

  • Fixture API smoke: sections routing, pin/unpin persistence + restart, hidden-key migration, 409/404/400/503 error paths, archive/unarchive with read-only DB proof.
  • CDP GUI harness: 22/22 checks, 0 console errors (pinned-first under two sorts, pagination page-1 pinning, spoiler expand/collapse, archive/unarchive round-trip, response modal from Archived). Screenshots in /tmp/pinky-archive-evidence/.
  • Native validation on the real DB with an OWN scratch session (sess_eeafc633…, Flash, scratch cwd): archive sets a sane now-ms time_archived, the store-default list filter (time_archived IS NULL) stops returning it, observatory routes it to Archived; unarchive clears to NULL. No owner session was archived/unarchived; the scratch session is left archived as a live specimen.

Notes

  • Forensics: the desktop app additionally maintains its own task-index flag (tasks.archived) which the observatory never writes — desktop-side visual effect to be validated by the owner (documented in README).
  • Gates: py_compile + --help, make check-social-preview, Super-Linter slim v8.7.0 (workflow env, git-initialized copy) — EXIT 0.
## What - **Archived section** — a third, collapsed-by-default section listing sessions with `session.time_archived` set; full row affordances (response modal, transcript, pinning) plus **Unarchive**; History rows get **Archive**. - **The narrow write exception** — the observatory opens a read-write connection for exactly two parameterized statements (`UPDATE session SET time_archived=? WHERE id=?` / `…=NULL WHERE id=?`), ZCode store-native archive semantics (default list queries add `time_archived is null` unless `includeArchived`). Guards: 409 while a turn is running, friendly 503 when the DB is locked. - **Pinning** — per-row 📌 toggle in all sections, observatory-local state (`observatory-state.json`), pinned rows float to the top of their section, both blocks honor the selected sort, pagination keeps pinned rows on page 1 (`POST /api/pin`, `POST /api/unpin`, `pinned` flag in `/api/sessions`). - **Legacy hidden machinery removed** — Hidden section markup, `/api/unhide`, `/api/restore`, `hidden` in `/api/sessions`, `load_hidden`/`save_hidden`; a leftover `hidden` state key is dropped on first write. - README (native-semantics forensics paragraph, pin/archive docs, precise safety wording) + refreshed fixture screenshot. ## Evidence - Fixture API smoke: sections routing, pin/unpin persistence + restart, hidden-key migration, 409/404/400/503 error paths, archive/unarchive with read-only DB proof. - CDP GUI harness: 22/22 checks, 0 console errors (pinned-first under two sorts, pagination page-1 pinning, spoiler expand/collapse, archive/unarchive round-trip, response modal from Archived). Screenshots in `/tmp/pinky-archive-evidence/`. - Native validation on the real DB with an OWN scratch session (`sess_eeafc633…`, Flash, scratch cwd): archive sets a sane now-ms `time_archived`, the store-default list filter (`time_archived IS NULL`) stops returning it, observatory routes it to Archived; unarchive clears to NULL. No owner session was archived/unarchived; the scratch session is left archived as a live specimen. ## Notes - Forensics: the desktop app additionally maintains its own task-index flag (`tasks.archived`) which the observatory never writes — desktop-side visual effect to be validated by the owner (documented in README). - Gates: py_compile + --help, make check-social-preview, Super-Linter slim v8.7.0 (workflow env, git-initialized copy) — EXIT 0.
Archived section (native time_archived), session pinning, hidden-machinery removal
All checks were successful
Checks / Functional checks (pull_request) Successful in 14s
5a8f21badf
- Third dashboard section Archived (collapsed spoiler): sessions with
  session.time_archived set; full row affordances plus Unarchive;
  Archive button on History rows.
- Narrow DB-write exception: POST /api/archive + /api/unarchive open a
  read-write connection for exactly two parameterized UPDATEs on
  session.time_archived (now-ms / NULL) — ZCode's own store semantics
  (default list queries hide archived sessions unless includeArchived).
  409 while a turn is running, friendly 503 on a locked database.
- Pinning: per-row toggle (Running/History/Archived), observatory-local
  state in observatory-state.json, pinned rows float to the top of
  their section, both blocks honor the selected sort, pagination keeps
  pinned rows on page 1. POST /api/pin + /api/unpin, pinned flag in
  /api/sessions.
- Removed the dead hide/unhide machinery: Hidden section markup,
  /api/unhide + /api/restore, hidden key in /api/sessions,
  load_hidden/save_hidden; a legacy hidden key in the state file is
  dropped on first write.
- README: archive + pin sections, native-semantics findings, precise
  write-exception wording; refreshed fixture screenshot.
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!26
No description provided.