Repository navigation
Keep a running agent's cost and × off the topbar controls - #1937
Merged
Merged
Conversation
… 1140px From 641px, where the selection ribbon comes back to the bar, up to 1040 nothing held its cost back, and the controls leave the ribbon less than its 24vw cap. The cost does not shrink, so the name ellipsed to nothing and the cost and × ran on past the ribbon's edge: 67px into the controls at 641, and over the Session list button, taking its presses, from 720 to 750. The cost now leaves the ribbon below 1140 as it already did from 1040; it stays on the card, in the detail panel and in the ribbon's title. The ribbon also had no floor: with min-width: 0 the bar shrank it with the readout in proportion to their widths, so a short name or a +N chip still cut it under its own state and ×. Its parts now sit in columns where only the name's can go under its content, and the ribbon holds that min-content, so the × stays inside its edge at every width. With room to spare it draws the same pixels as before.
Closed
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.
What changes
min-width: 0so the name could ellipse at all, and that left it with no lower limit. The bar shrinks the ribbon and the readout in proportion to their widths. With a short name or a +N chip, the ribbon was cut down past its state pill and ×, and the × was drawn outside its edge: 30px past it at 641 for an agent called "x", and with a +2 chip 18px into the Session list button. The ribbon now lays its parts out in columns, and only the name's column can go narrower than its content. Itsmin-contentis then the state, the chips and the ×, with the name ellipsed to nothing, andmin-width: min-contentkeeps it at least that wide. Where there is room it draws the same pixels as before.Verification
npm run typecheck: clean.--maxWorkers=3 --minWorkers=1): 886 files, 11574 tests passed, exit 0. After rebasing ontodevelopmentthe touched and neighbouring tests passed again: 6 files, 79 tests.topbar-ribbon-cost.test.ts. It adds the bar up from the sheet's own numbers: padding, the waiting pill, the gaps, the ribbon at its smallest with whatever the cascade still draws in it, and the controls. Before the fix it failed three ways:inline-flexwith no lower width limit.monthly-topbar-737.test.ts: the cost's band test now matches the band without its old 1040px lower bound. Its end points are still checked against both caps.$3.96 · $x/min), at 600, 620, 640, 641, 660, 680, 700, 720, 750, 800, 850, 900, 950, 1000, 1039, 1040 and 1100px, in light and dark.elementFromPointwas taken at the centres of the × and of the Session list button.tarball-install-smoke.test.tspassed locally this time. It usually times out in worktrees and passes in CI.