Files
lvmh/web/.pi-merge-task.md
T

2.9 KiB

Integration task: merge 5 web slices (already-recovered blobs in ../../.pi/scratch/rec4/)

Base: this worktree at current master + the ChatView.tsx from slice 1 (model/rename — already placed). The other slices each edited overlapping files. Merge ALL slices.

Blob map (.pi/scratch/rec4/.txt)

  • Slice 1 (model switch + rename): ChatView=e2c7b1c1 (PLACED), derive=6c499294? NO — check: derive blobs: 6c499294 (has notice? grep error_notice), 73f1de97, abf953bf. ChatView.test=0617e495, protocol=29b7795f is slice-5's, slice-1 protocol is 9aec478e? — IDENTIFY by features:
    • s1: catalogCache, SessionModel routes, error_notice/notice-line, rename
    • s2: Clear history menu, Delete session, Route.Session, trash button (SessionsView=8ab1292a? grep)
    • s3: SessionStats/Route.Stats, formatTokens in store.ts, SessionsView global line
    • s4 (web-only QoL): renderMarkdown in ChatStream=01f25bac(also has FAB/search), ChatView=17c34004 (timestamps/placeholder/ArrowUp), derive=?? (ts field), css=5ba557b7 or 4b643f25 or 19c9becd (largest superset)
    • s5: SpawnView badges/prepare (SpawnView=ec5f2892? grep prepare), protocol RepoPrepare/Repos/imageUsed, SpawnView.test=996b2e63

Procedure

  1. protocol.ts: start from master's, add ALL routes/types from s1+s2+s3+s5 blobs (SessionModel, ModelCatalog, Session(id) DELETE, ClearHistoryResponse, Stats, SessionStats, StatsTotals, Repos/RepoImage/RepoPrepare, imageUsed on SpawnResponse).
  2. ChatView.tsx: base = e2c7b1c1 (placed). Graft: s2 overflow menu (Clear/Delete, from a8c6b3b0), s3 stats chip fetch (from 5ef417c8), s4 QoL pieces that live in ChatView (search toggle+hotkey, ⋯ timestamps toggle, placeholder switch, ArrowUp recall — from 17c34004).
  3. ChatStream.tsx: base = 01f25bac (s4: markdown+FAB+search+ts). Verify it compiles against s1's notice-line message shape; adapt.
  4. derive.ts: master + s1 notice message + s4 ts field (whichever blob has both, else merge).
  5. store.ts: master + s3 formatTokens (+ any stats helpers).
  6. SessionsView.tsx: master + s2 trash + s3 global stats line.
  7. SpawnView.tsx: master + s5 badges/prepare/imageUsed.
  8. index.css: take the LARGEST blob (superset ordering: 19c9becd 22628 > 5ba557b7 21318

    4b643f25 21285) and verify it contains all classes used by merged components; add missing rules from the others.

  9. Tests: merge test blobs the same way (ChatView.test from 0617e495 + grafts from s2/s3/s4 test files; SpawnView.test=996b2e63; ChatStream tests inside 1c6e7edd? identify; derive tests). Aim: keep every test that matches merged features; drop tests for unmerged ones.
  10. Gates: bunx tsc@5.9 --noEmit && bun run build && bun run coverage — ALL four metrics ≥95. Iterate until green. You may simplify/drop marginal features' tests if a graft is cursed, but NEVER ship a failing suite.

Work tree = this worktree; blobs are read-only. Report per-file what you took from which slice + final verbatim coverage/build tails.