feat(workspaces): title recent-activity rows from a bounded preview
The activity column's disk-only rows had no title: the recent feed carried file metadata only, so every session outside a live instance rendered "(unnamed)". recentSessions() now projects a display title for the rows it returns — the latest `session_info` name and the first user message — from a 128 KiB head + 32 KiB tail of each session file, cached by (mtime, size). Entries are never parsed into session state: the read is bounded, opt-in, and only paid for the ≤limit rows the caller renders, so the daemon stays a router. The web client keeps the disk title as a fallback under the live state, and the B4 e2e scenario asserts session-first rows with their links and titles.
This commit is contained in:
1 parent
086cac8c8e
commit
17fcf931c0
11 files changed
+431
-30
No files matched your search
@@ -43,8 +43,10 @@ Adding bulk to this file is a mistake, not a contribution.
|
||||
|
||||
1. **`docs/protocol.md` is the contract.** Any wire change lands with the daemon, the web client
|
||||
and the pi2.nvim bridge in view; `fixtures/` are regenerated via `scripts/gen-expected.ts`.
|
||||
2. **The daemon is not an agent runtime.** No `pi` spawning, no JSONL session parsing, no session
|
||||
state. Snapshots and mutations are relayed to the plugin, which stays the single authority.
|
||||
2. **The daemon is not an agent runtime.** No `pi` spawning, no session state, no entry parsing.
|
||||
The one JSONL read is the recent feed's bounded display-title preview (`name` + first user
|
||||
message, 128 KiB head + 32 KiB tail, cached); snapshots and mutations are relayed to the plugin,
|
||||
which stays the single authority.
|
||||
3. **`dist/` and `web/dist/` are build output** — gitignored, never committed. They ship inside
|
||||
the npm tarball through `prepack` + the `files` allowlist.
|
||||
4. **Two lockfiles.** Root `pnpm-lock.yaml` and `web/pnpm-lock.yaml` are independent: use
|
||||
|
||||
Reference in new issue
Block a user