Repository navigation
Browser splash: print a receipt of the download on a thermal printer - #19
Merged
Merged
Conversation
The loading splash is now a small receipt printer. Each downloaded file prints as a receipt line (name without the fingerprint, and size) and feeds the paper up in motor steps; a status LED blinks while printing. When the runtime is ready it prints the total and a barcode, then Avalonia's first frame fades the splash out. Lines come from the Resource Timing API (PerformanceObserver), so names and sizes are real and cache hits count. This replaces onDownloadResourceProgress, which isn't in dotnet.d.ts and whose file total grows during startup, so its progress could jump backwards. On failure the LED turns red, the receipt prints "*** PRINT FAILED ***" right away, and the status explains how to recover. With prefers-reduced-motion, lines appear without the feed animation and the LED doesn't blink. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
danielmeza
added a commit
that referenced
this pull request
Sep 22, 2026
Revert the printing-receipt splash (#19); restore the first splash
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.
Follow-up to #18, which merged the first splash (a blank strip that grew with the file count). This turns it into a real printing animation. While the browser version downloads (~45 MB, 235 files), a small thermal printer prints a receipt of the download.
What it does
.splash-closeto#avalonia-splash, andmain.jsadds it too afterrunMainas a fallback.*** PRINT FAILED ***at once, and the status says to reload, followed by the underlying error.role="status"), not each receipt line. Withprefers-reduced-motion, lines appear without the feed animation and the LED doesn't blink.PerformanceObserver), so names and sizes are real and cache hits count. The first commit usedonDownloadResourceProgress. That hook isn't indotnet.d.ts, and its file total grows during startup (25, then 54, then 140), so progress could jump backwards.Tested locally
I published with
-c Release -p:PublishTrimmed=false -p:CompressionEnabled=false, servedwwwroot, and drove Chromium via Playwright:dotnet.native*.wasmaborted): the error state shows the red LED, thePRINT FAILEDline and the error message.Merging redeploys the Pages demo. No new tag is needed.
🤖 Generated with Claude Code