Repository navigation
refactor: one module for the transcript window - #4
Merged
Merged
Conversation
transcript.ts holds the loaded messages, their keys and whether older ones remain, with pure functions for a live message, an update, a page, a gap and starting again. The store keeps the value; its loaders fetch and then apply one. This replaces the messages array and the module-level loaded set the store kept in step by hand in five places. The UI's first tests run with bun test (@types/bun for tsc), as `bun run test` locally and in CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
quoteOf builds a reply's quote the way Db::show does: a deleted or vanished message shows no text or file, and a vanished one says it vanished. The live update used to leave out vanished, so the reply said "Deleted message" until the history was loaded again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A reply's quote now carries the quoted message's place in display order (Quote.hlc, None when it isn't on this computer), so clicking it goes through reveal like a search hit: it loads the history back to the message, then scrolls there. It used to do nothing unless the message was already loaded. jumpTo in the transcript is gone; the scroll finds the message through the transcript module. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sary Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The transcript (the messages shown, as far back as they're loaded) now lives in one module. Before, the store kept a
messagesarray and a module-levelloadedset in step by hand, in five places.Two fixes come with it:
quoteOfbuilds the quote the wayDb::showdoes. The live update used to leave outvanished, so the quote said "Deleted message".Quotegainshlc(Nonewhen the message isn't on this computer), so a quote goes throughreveallike a search hit.jumpTois gone.The UI tests run with
bun test, through@types/bun, the one new dev dependency. They run asbun run testlocally and in CI's UI job.GLOSSARY.mdadds Transcript.Evidence
After: 15 tests in
transcript.test.tscover:{ text: null, deleted: true, vanished: true, file: null }on the quote. The old patch had novanished.db.rstest checksQuote.hlc:Some(1)for a stored message, andNoneonce it's cleared ("nowhere to jump to").bun run check,bun run test,cargo fmt --check,clippy -D warningsandcargo teston its own.Merge Danger
Door: two-way
There's no wire or schema change.
Quote.hlcis part of the UI's view, which always ships with its own backend.Blast Radius: transcript
The change touches everything that adds messages to the transcript or scrolls it: live messages, paging, search jumps, reply jumps and clearing. Rows still re-render only when their own message changes.
🤖 Generated with Claude Code