2code icon indicating copy to clipboard operation
2code copied to clipboard

terminal AGENTS.md KEY PATTERNS still describe sqlite history restore (Task 9 gap)

Open AkaraChen opened this issue 2 months ago • 1 comments

Summary

Parent: #452 / #436. Found while reviewing Local PTY deletion (#452) on task-9-delete-local-pty.

Task 9 updated src/features/terminal/AGENTS.md WHERE TO LOOK so scrollback restore is restoration.ts reattaches live Herdr pane_id; no sqlite history. The KEY PATTERNS Session restoration flow in the same file still describes the deleted Local path:

  1. Fetch closed session history from DB
  2. Pass old session.id as restoreFrom prop
  3. Terminal writes scrollback chunks, then deletes old record

src/features/terminal/CLAUDE.md is a copy of that KEY PATTERNS text.

This does not block Task 10. Restoration already reattaches live Herdr pane_id; restoreFrom / sqlite sessionHistory are gone. docs/herdr-integration.md already records Task 9 done.

Current text

  • KEY PATTERNS Session restoration flow: fetch closed session history from DB; restoreFrom prop; write scrollback then delete old record

Needed

  • Describe restore as reattach of a live Herdr pane_id (same as WHERE TO LOOK)
  • Drop restoreFrom / sqlite history / delete-old-record steps
  • Keep the AGENTS.md / CLAUDE.md copies in that directory in sync
  • Do not treat remaining Task 9 Local PTY deletion as open

Do not treat #452 as still waiting on KEY PATTERNS copy for acceptance.

AkaraChen avatar Sep 16 '26 11:09 AkaraChen

Still real on task-10-launch-adopt; fixed on task-1-verify-gaps (8b449ea, bedd5d5).

KEY PATTERNS in src/features/terminal/AGENTS.md:30-33 now describe live Herdr pane_id reattach. CLAUDE.md is a symlink to AGENTS.md (kept in sync). Production restore is src/features/terminal/restoration.ts:21-38 (hydrateRestorableSessions reattaches the same pane_id).

Source-string test: src/features/terminal/restoration.test.ts describes restore as reattach of a live Herdr pane_id (rejects restoreFrom history restore; requires reattaches each live pane_id).

AkaraChen avatar Sep 16 '26 19:09 AkaraChen