feat(js): render faithful terminal SVG and GIF artifacts - #181
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #180
konard
marked this pull request as ready for review
July 25, 2026 13:17
Member
Author
Working session summaryImplemented issue #180 and marked the PR ready for review: PR #181 — Faithful terminal SVG and GIF artifacts Highlights:
This summary was automatically extracted from the AI working session output. |
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (304.7K + 12.0M cached) input tokens, 36.1K output tokens, $16.648879 cost 🤖 Models used:
📎 Log file uploaded as Gist (4946KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Member
Author
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
This was referenced Jul 26, 2026
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.
Fixes #180.
Reproduction
In 0.15.0,
terminalFrame()flattened xterm buffer lines to strings before artifact rendering. A capture containing truecolor/256-color SGR, bold/dim/italic/underline/strikethrough, interior spaces, CJK cells, Braille, and box drawing therefore produced monochrome SVG text with collapsed spacing. Recording SVG also used synthetic 350 ms SMIL frames and no raster fallback.The new focused fixture reproduces all of those losses. Before this change it fails because
frame.cellsandrecording.gifdo not exist.Changes
screenandlinesfieldstextLength/lengthAdjust, including double-width cellssteps(1, end); cap only idle gaps viaidleTimeLimitVerification
bun test tests/terminal-capture.test.mjs --timeout 10000: 8 pass, 0 fail; two cold runs completed in 2.48 s and 2.70 sbun run lint: pass (one pre-existing warning insrc/commands/$.cd.mjs)bun run format:check: passbun run check:duplication: passnpm pack --dry-run: bundled font and license confirmedbun run test: 749 pass, 10 skip, 28 fail because the local environment does not provide the externaljqexecutable; CI's isolated matrix is the authoritative full-suite checkVisual proof
The committed sample is generated through
captureTerminal()and can be regenerated withbun examples/terminal-artifacts-demo.mjs.GIF fallback: recording.gif