FEAT: add conditional Thresholds view under Quota - #63
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Explicit standard speed steps are displayed as default in both new Thresholds views.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (2)
What changed in this PR
Adds a conditional Thresholds overview for configured quota step-down policies across terminal and web dashboards, using shared Go status logic while keeping approvals in Sessions.
Changes:
- Adds shared threshold classification and web projection.
- Adds terminal/web navigation, responsive rendering, scrolling, preferences, and localization.
- Updates documentation, tests, and embedded web assets.
| File | Description |
|---|---|
internal/codex/quota_profiles.go |
Shared threshold status classification. |
internal/codex/quota_profiles_test.go |
Classification tests. |
internal/ui/thresholds.go |
Terminal Thresholds rendering and scrolling. |
internal/ui/thresholds_test.go |
Terminal view tests. |
internal/ui/tabs.go |
Conditional terminal tab navigation. |
internal/ui/tabs_test.go |
Tab layout tests. |
internal/ui/model.go |
Keyboard, mouse, and layout integration. |
internal/ui/view.go |
Threshold view rendering integration. |
internal/ui/theme.go |
Adds Thresholds view identifier. |
internal/ui/preferences.go |
Preference persistence and fallback. |
internal/ui/preferences_test.go |
Preference tests. |
internal/ui/view_test.go |
View coverage updates. |
internal/ui/english_snapshot_test.go |
Excludes opt-in view from legacy snapshot. |
internal/web/state.go |
Threshold state projection. |
internal/web/server.go |
Supplies policy configuration to web state. |
internal/web/thresholds_test.go |
Web projection tests. |
web/src/Thresholds.svelte |
Web Thresholds page. |
web/src/App.svelte |
Conditional web navigation and fallback. |
web/src/state.svelte.ts |
Threshold data types. |
web/src/preferences.svelte.ts |
Web tab preference support. |
web/src/style.css |
Threshold layout styling. |
web/tests/browser.spec.ts |
Browser navigation coverage. |
README.md |
Documents the Thresholds tab. |
intro-post.md |
Updates introductory feature documentation. |
internal/web/dist/index.html |
References rebuilt assets. |
internal/web/dist/assets/index-S94ToOzX.js |
Removes superseded bundle. |
internal/web/dist/assets/index-CCAs5nbB.js |
Adds rebuilt web bundle. |
internal/web/dist/assets/index-BF0PrFr9.css |
Adds rebuilt styles. |
internal/i18n/locales/en-GB.json |
Adds English labels. |
internal/i18n/locales/zh-Hans.json |
Adds Chinese translations. |
internal/i18n/locales/tr.json |
Adds Turkish translations. |
internal/i18n/locales/sv.json |
Adds Swedish translations. |
internal/i18n/locales/ru.json |
Adds Russian translations. |
internal/i18n/locales/pt-PT.json |
Adds European Portuguese translations. |
internal/i18n/locales/pt-BR.json |
Adds Brazilian Portuguese translations. |
internal/i18n/locales/nl.json |
Adds Dutch translations. |
internal/i18n/locales/nb.json |
Adds Norwegian translations. |
internal/i18n/locales/ja.json |
Adds Japanese translations. |
internal/i18n/locales/it.json |
Adds Italian translations. |
internal/i18n/locales/fr.json |
Adds French translations. |
internal/i18n/locales/fi.json |
Adds Finnish translations. |
internal/i18n/locales/et.json |
Adds Estonian translations. |
internal/i18n/locales/es.json |
Adds Spanish translations. |
internal/i18n/locales/de.json |
Adds German translations. |
internal/i18n/locales/da.json |
Adds Danish translations. |
💡 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.

Configured quota step-down profiles previously had no dedicated overview. This adds Quota → Thresholds, immediately after Resets, whenever
--quota-step-downis supplied, in both the terminal and web interfaces.The view lists thresholds in order with the requested model, reasoning level, speed and ASK/AUTO mode. Shared Go policy logic identifies the active and next steps and the percentage points remaining. ACTIVE means the selected policy, not proof that every session has applied it; approvals continue through Sessions.
Validation: full Go suite and all 40 Playwright tests passed for the feature. After moving it under Quota, the full terminal suite and five relevant browser regression tests passed; Svelte/type/format checks and web build passed. Existing English snapshots remain unchanged for ordinary launches.
Based directly on main; the separate Usage-history work in #62 is unaffected.