Skip to content

fix(web): show usage as percent left everywhere - #792

Merged
nixuuu merged 2 commits into
devfrom
fix/usage-percent-left
Nov 15, 2026
Merged

nixuuu merged 2 commits into
devfrom
fix/usage-percent-left

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 15, 2026

Copy link
Copy Markdown
Member

Summary

The provider usage popover counts down from 100% left, but the sidebar indicator, the provider/proxy settings meters and the composer limit warnings showed the share used. Everything now shows the share left (100% → 0%), on web and mobile.

  • UsageGlance.percent → percentLeft (domain), used by the sidebar indicator on web and mobile.
  • UsageMeters (web + mobile): label, bar width and meter value use the share left.
  • usageWarnings: "Weekly limit 92% used" → "Weekly limit 8% left".
  • Tone thresholds unchanged (warning ≤ 30% left, danger ≤ 10% left).

Copy audit (docs/copy.md §8)

Before After Reason
Weekly · 63% used Weekly · 37% left One direction for usage across the app, matching the popover
Weekly limit 92% used Weekly limit 8% left Same
Claude: 69% used (button label) Claude: 31% left Same
Weekly limit used (meter label) Weekly limit left Meter value is now the share left

Sentence case, no new terms, no colour-only cues (the percentage is always in text).

Verification

  • Local: bun test for sidebar-usage and proxy-capacity, typecheck of packages/domain and apps/mobile.
  • Not checked visually in a browser yet; the rest is left to CI.

🤖 Generated with Claude Code

The provider usage popover already counted down from 100% left, while the
sidebar indicator, the settings meters and the composer warnings showed
the share used. All of them now show the share left, on web and mobile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@nixuuu
nixuuu enabled auto-merge (squash) November 15, 2026 07:45
@nixuuu
nixuuu merged commit 3d9f1e4 into dev Nov 15, 2026
11 checks passed
@nixuuu
nixuuu deleted the fix/usage-percent-left branch November 15, 2026 08:09
nixuuu added a commit that referenced this pull request Nov 15, 2026
Stage 2 of 2 (stack #805, top, on #803). Timeline UI for the CI check
notes and watch tool calls, on web and mobile.

## What it does
- A `pr_checks` turn, or a CI note steered into a running turn, renders
as one compact system line per note. The line says what happened, links
to the pull request, and names the commit when a new one was followed.
Failed and passed lines get a rose or emerald icon; the text never
relies on colour alone.
- The pending-steer list leaves out these platform notes.
- `watch_pr_checks`, `list_pr_watches` and `cancel_pr_watch` get bus
card titles and icons. A watch card shows the pull request, when the
agent hears back, and until when. When every check had already passed,
the title is "Checked CI checks".
- Shared wording lives in `@canopy/domain/pr-check-display`. The dev
gallery (`/dev/tool-calls`) gains watch call fixtures.

## Copy audit (docs/copy.md §8)
| Before | After | Reason |
|---|---|---|
| (new) | `Watching CI checks` / `Starting to watch CI checks` / `Tried
to watch CI checks` | Matches the bus card pattern (doing, done, tried)
|
| (new) | `Checked CI checks` | Every check had already passed; no watch
started, so the title doesn't claim one |
| (new) | `Listed CI check watches`, `Stopped a CI check watch` | Verb
first, sentence case |
| (new) | `#792 · Tells this agent when a check fails or
all checks finish · Until 11:12 AM` | Facts line; time formatted with
`toLocaleTimeString` |
| (new) | `All checks already passed` | One idea, no period (fact
fragment) |
| (new) | `test (3/4) failed`, `2 of 14 checks failed`, `All 14 checks
passed`, `lint finished` | Short statuses with correct plurals |
| (new) | `Pull request merged`, `Pull request closed`, `No checks
reported in 10 min`, `Stopped watching checks at the time limit`,
`Stopped watching checks without access`, `Stopped watching checks of an
unlinked pull request` | What happened, in plain words; "turn" glossary
respected (no "run") |
| (new) | `New commit 1a2b3c4` | Names the followed commit |

Checked with short, typical and long repository names. A long name wraps
cleanly at phone width.

## Verification
- **Looked at in Chromium:** light and dark themes, at 1280 px and 390
px wide.
  - Tool cards came from the `/dev/tool-calls` gallery.
- Note rows came from `TurnInput` with fixture turns, added to the
gallery only for the screenshots and not committed.
  - The app shell was bypassed locally because no gateway was running.
- **Ran locally:** web `svelte-check`, mobile and domain typecheck, and
lint and format on the changed files.

Everything else is left to CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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