tui: a frame-rate cap, print after the turn's Static items, quit's last frame under mount, a color depth for mount, and the truncating row — each used by test:tui - #410
Merged
Conversation
… every change inside it goes into the frame that ends it
…t, so the scrollback is in the order of the program
… quitting turn reaches the scrollback and the frame
…inal of it, and screen.colors reads it
…he README writes it, and no Line widget stands in for it
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.
Five things
bun run test:tuifoundpackages/tuimade harder than it should. Each lands with a pin that fails without it, and each commit removes the runner's workaround for it.pace:onrunandmountsets the least time between frames (default 8 ms); changes inside it draw as one frame; undermountthe frames followview.tick. The runner drops the model it repainted once per clock tick and runs atpace: 100, its state bound directly: about 10 frames a second.printwrites theStaticitems its turn added first (Screen.aboveruns the turn's queued effects before writing), so the screen reads in the program's order. The runner drops its one-tick delay before the ending.quitdraws its last frame, asrundoes; aclose()by hand still draws nothing. The runner's tests drop theirview.frame()before a quit.mount App, colors:0, 16, 256 or 16777216 sets the depth the painter downsamples to.test/live.ripholds the runner's strip, bars, card and scrollback to named colors at 16 and to no escape at 0.Textof styled runs withwrap: 'truncate'— is in the README's text section, pinned to render as the README says; the runner's rows are that pattern. No helper: it would beText wrap: 'truncate'under another name.bun run test:tuiunder a real pty through a full run: exit 0, "✓ All 29 lanes green · 12,699 tests · 76.0s", nothing left running. Suites: test 137, events 234, terminal 80, live 16, the rest unchanged.bun run test:all: 29 lanes, 12,699 tests.