Skip to content

Extension: the quota meter stays inside the account card - #265

Merged
TheGlitching merged 1 commit into
mainfrom
fm/squiggle-ext-quota-affichage
Nov 23, 2026
Merged

TheGlitching merged 1 commit into
mainfrom
fm/squiggle-ext-quota-affichage

Conversation

@TheGlitching

Copy link
Copy Markdown
Owner

The problem

Signed in with an active subscription, the side panel's account card showed the counter "51 / 60" outside the card on the right, in monospace, on three lines (51 / / / 60), with a tall empty band between "Il vous reste 51 analyses ce mois-ci." and "Se déconnecter".

The card drew one 24px pip per analysis. That was fine for the three-analysis trial, but at the monthly 60 the row asked for about 1800px: the pips shrank to slivers (or to nothing on a narrow panel), and the counter, squeezed to its minimum width, wrapped and was pushed past the card's edge. The wrapped counter is what made the row tall.

Present in 0.1.11 (the store version) and unchanged on main, so 0.1.12 has it too.

The change

  • HostedAccountCard: the meter is one track filled to what remains (remaining / limit, clamped), with the counter beside it on one line (shrink-0, whitespace-nowrap, tabular figures in the card's own type instead of monospace). Same element for the trial and the subscription.
  • tests/HostedAccountCard.test.tsx: the meter is two elements whatever the limit, the fill is 85% at 51 / 60, the counter cannot wrap, and an overdrawn quota empties the track rather than going negative.

Verification

Reproduced end to end, not in isolation: the extension built at v0.1.11 and at main, loaded unpacked in a fresh Chrome for Testing profile, signed in through the real pont flow (/pont redirect to squiggle-auth.html, signed /v1/account call) against a local stand-in for the hosted origin answering an active plan at 51 / 60. Screenshots at 330px and 560px, dark and light (prefers-color-scheme; 0.1.11 predates the light theme).

330px 560px
Before, 0.1.11
Before, main
After, dark
After, light
  • npx vitest run: 634 passed (after build:chrome and build:firefox, which the packaging tests read)
  • npx tsc --noEmit: clean

No version bump: 0.1.12 is in store review.

The signed-in card drew one pip per analysis. At the monthly 60 the row asked
for about 1800px: the pips shrank to slivers, and the counter wrapped to three
lines in monospace and was pushed past the card's right edge, leaving a tall
empty band above the sign-out button.

The meter is now one track filled to what remains, with the counter beside it
on one line in the card's own type. Same element for the three-analysis trial.
@TheGlitching
TheGlitching merged commit d5274ea into main Nov 23, 2026
1 check passed
@TheGlitching
TheGlitching deleted the fm/squiggle-ext-quota-affichage branch November 23, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant