perf(chat): add immutable transcript geometry checkpoint
Adds an immutable prefix index for transcript heights and a read-only geometry API (count, totalHeight, topAt, heightAt, upperBoundTop). Point changes copy one bounded leaf and its tree path, preserving the previous layout for anchor comparisons. Fold snapshots can retain this immutable geometry instead of copying row tops.
This is the dependency checkpoint for production height integration, rebased onto #26799 at 688a69279d8b3ee7b2e8be03a27f3f81493ea7c3. It contains the primitive from #26745 plus the geometry/fold API seam. It does not switch VirtualTranscript to indexed placement by itself. Part of manaflow-ai/cmuxterm-hq#4740; production integration follows as a separate stack piece.
Validation: fleet 40669312105 passed 72 focused tests, the full web check, web-lint, and the pre-push gate on the combined production tree 7f96783a93929fbf3bf60b4e930732c90b029097. The dependency head is 5361e9f73e7ab60cbddda7fe195a51f7ad74d542. The production integration is #26833. Its final exact tree d7c565ba729875005a688f4cdc4c211a2b94f8e2 also passed the full checks and paired two-engine 3,000-turn oracle in fleet 40671810304. Independent review of this updated stack is pending.
Performance
| Workload | Before | After | Evidence |
|---|---|---|---|
| Model-only 9,000 rows, 300 height updates | 20.241 ms | 0.883 ms | Original primitive deciding run; totals matched. This does not measure the browser or full app. |
Changelog
none
No capture: internal geometry and fold snapshot representation only; no visual design change.
Root coordinator and final review/landing owner: agent session.
Agent session: agent session