feat(quota): visually separate reset countdown and show window interval - #243
Merged
Conversation
Box the reset countdown into its own table column and prefix it with the quota window duration (5h / 1d / 1w), computed from the interval start and end times. Implements the layout proposed in #240.
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
Implements the
mmx quotalayout proposed by @airvzxf in #240: the reset countdown now lives in its own boxed column, prefixed with the quota window duration (5h/1d/1w) so it is clear which window the countdown applies to.Closes #240
Before
After
(Bars are rendered as colored blocks in a real terminal; they are stripped in the text mockups above.)
Changes
formatWindow()derives the window tag fromend_time - start_time— no API changes needed.boxLine()takes an optional divider offset and draws┬/┼/┴junctions (+in--no-colorASCII mode).5h Resetlabel is dimmed so the countdown stays the visual focus;not in planrows renderReset —without a window tag.Left/Wk leftlabels are kept (rather than relying on color alone, as floated later in the issue) so the table stays readable in--no-colormode and for color-blind users.Testing
bun test— quota-table suite 8/8; full suite has 2 pre-existing failures (test/sdk/file.test.ts,test/commands/auth/refresh.test.ts) that also fail onmain.tsc --noEmitandeslintclean.unlimited+not in planedge rows, and--no-colorASCII mode.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.