Repository navigation
Conversation
Add an ephemeral Unicode-aware reference card with copy/dismiss actions, exact shortcut routing, paired pointer capture, and post-shader rendering support. Include input/layout/GPU regressions and a reproducible synthetic demo. Co-authored-by: Perplexity <noreply@perplexity.ai>
Owner
Author
|
Validation is complete for The first macOS attempt stalled in the unchanged Created with Perplexity |
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.
Why this feature
Terminal output often contains something you need for the next step: an error,
a request ID, an expected value, or a command recipe. Reference Pin keeps that
text visible while you continue working, instead of requiring another trip
through scrollback or a scratch file.
I considered two other directions: a return-to-reading bookmark and persistent
token highlighting in live logs. Reference Pin is the strongest first experiment:
it supports simultaneous reference and execution, works without shell integration,
and does not depend on preserving scrollback anchors across reflow or eviction.
What changes
receiving input and output. Copy copies the retained snapshot; Dismiss removes it.
nor a pin, the shortcut still reaches the application. Blank selections preserve
the previous pin, and Escape is never repurposed.
at 16 KiB on a grapheme boundary. The six-line preview wraps Unicode text and
clearly distinguishes preview clipping from a capped snapshot.
remains unshaded above post-processing effects, and yields to the close dialog.
persistent storage added. The pin shortcut does not touch the clipboard;
existing select-to-copy behavior is unchanged.
Visual proof
These are captures of the actual changed toastty binary running under Xvfb with
Vulkan llvmpipe, using synthetic data.
Before pinning, the three reference lines are part of ordinary terminal output:
After new output has scrolled the original lines away, the reference remains
visible and the shell is still usable:
The attached video demonstrates selection, pinning, streaming output, continued
typing, copying the snapshot, and dismissal.
reference-pin-demo.mp4
Narrow-window and Unicode check
The card shrinks to the available space, marks the clipped preview, and still
copies the full retained eight-line snapshot byte-for-byte, including CJK,
combining accents, and a ZWJ emoji.
Try it
Build and launch toastty, then run this inside it:
The demo only prints synthetic logs and waits for user input. It does not make
network calls or run deployment commands.
Validation
cargo test --workspace --locked --no-fail-fast: 2,564 passed, 3 ignored.The ignored tests are the existing live PubChem network tests.
cargo build --locked -p toastty: passed.pin replacement/dismissal, scrollback eviction and screen switches, mouse
capture across drags and modal dialogs, snapshot bounds, Unicode wrapping,
geometry/hit testing, idle rendering, post-only shader frames, and restoration
of underlying pixels after dismissal.
through the native X11 clipboard, Unicode/preview clipping, dismiss, resize,
font zoom, tiny-window hide/restore, and keyboard dismissal.
rustfmt --check;git diff --checkandbash -n demos/reference-pin.shpass.strict lint/format checks are not clean on the installed Rust 1.99 toolchain:
unrelated existing warnings/formatting differences were left outside this PR.
Runtime visual testing is Linux/X11 at 1× scale. The macOS shortcut is unit-tested,
but native macOS/Wayland/HiDPI GUI behavior was not manually exercised here.
Created with Perplexity