Repository navigation
FEAT: add Zone and Pace quota graphs across terminal and web - #79
Merged
Merged
Conversation
merefield
force-pushed
the
feat/consumption-zone-trends
branch
from
October 9, 2026 08:08
20c73ae to
22132ef
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Several graph statuses are inaccurate for absent history, unavailable projections, and the exact 100% safety boundary.
3 open findings
What changed in this PR
Adds shared Zone and Pace quota graphs across terminal and web, including observation history, trend projections, controls, responsive layouts, localization, and documentation.
Changes:
- Introduces shared bounded quota history and projection geometry.
- Replaces the Pace gauge with reusable terminal and web graphs.
- Adds comprehensive tests, translations, documentation, and rebuilt web assets.
| File | Description |
|---|---|
web/tests/browser.spec.ts |
Expands browser graph coverage. |
web/src/style.css |
Updates responsive quota styling. |
web/src/Quota.svelte |
Integrates Pace and Zone graphs. |
web/src/ConsumptionZone.svelte |
Implements shared SVG graph and controls. |
README.md |
Documents graph behavior and shortcuts. |
intro-post.md |
Updates feature overview. |
internal/web/state.go |
Uses shared observation history. |
internal/web/dist/index.html |
References rebuilt assets. |
internal/web/dist/assets/index-f6yvkeCn.css |
Removes previous generated CSS. |
internal/web/dist/assets/index-4j3sNB-h.css |
Adds rebuilt generated CSS. |
internal/ui/view.go |
Renders terminal graph controls. |
internal/ui/view_test.go |
Updates view layout tests. |
internal/ui/theme.go |
Adds Pace and Zone view IDs. |
internal/ui/tabs.go |
Adds renamed graph tabs. |
internal/ui/tabs_test.go |
Updates tab behavior tests. |
internal/ui/quota_graph.go |
Implements terminal graphs and controls. |
internal/ui/quota_graph_test.go |
Tests terminal graph behavior. |
internal/ui/preferences.go |
Preserves legacy Pace preferences. |
internal/ui/model.go |
Collects history and handles controls. |
internal/ui/model_test.go |
Updates view-selection expectations. |
internal/ui/meters.go |
Integrates graphs into meter rendering. |
internal/ui/meters_test.go |
Updates meter tests. |
internal/ui/english_snapshot_test.go |
Refreshes presentation snapshot. |
internal/quotagraph/graph.go |
Adds shared history and trend calculations. |
internal/quotagraph/graph_test.go |
Tests shared graph calculations. |
internal/i18n/locales/zh-Hans.json |
Adds graph translations. |
internal/i18n/locales/tr.json |
Adds graph translations. |
internal/i18n/locales/sv.json |
Adds graph translations. |
internal/i18n/locales/ru.json |
Adds graph translations. |
internal/i18n/locales/pt-PT.json |
Adds graph translations. |
internal/i18n/locales/pt-BR.json |
Adds graph translations. |
internal/i18n/locales/nl.json |
Adds graph translations. |
internal/i18n/locales/nb.json |
Adds graph translations. |
internal/i18n/locales/ja.json |
Adds graph translations. |
internal/i18n/locales/it.json |
Adds graph translations. |
internal/i18n/locales/fr.json |
Adds graph translations. |
internal/i18n/locales/fi.json |
Adds graph translations. |
internal/i18n/locales/et.json |
Adds graph translations. |
internal/i18n/locales/es.json |
Adds graph translations. |
internal/i18n/locales/en-GB.json |
Adds canonical graph labels. |
internal/i18n/locales/de.json |
Adds graph translations. |
internal/i18n/locales/da.json |
Adds graph translations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.


Why
Terminal and browser now have separate Zone and Pace quota views, with observed history and a projected trend. Zone shows accumulated consumption; Pace replaces the old horizontal gauge with distance from safe pace. For example, 80% of quota used after 57% of the window appears 23 percentage points above safety in Pace; a recent slowdown can slope back towards zero, but stays dark red if projected usage still exceeds 100% at reset.
Changes
g) and Trace (h) controls are scoped to Pace/Zone. Recent trend intervals are skipped until available for at least one window; other windows report unavailable rather than substitute an interval. Preserve the previous saved Consumption Pace view after renaming.go.mod, so they also build with the security patch. Update source-build requirements without weakening the vulnerability scanner or adding exclusions.The trend remains an explicitly documented extrapolation of coarse whole-percentage observations, not an OpenAI forecast. Trails remain in-memory only and gaps are never interpolated.
Validation
go test ./...govulncheck@v1.8.0and the complete regression suite with Go 1.27.2