Skip to content

FEAT: add conditional Thresholds view under Quota - #63

Merged
merefield merged 3 commits into
mainfrom
feat/thresholds-tab
Sep 19, 2026
Merged

merefield merged 3 commits into
mainfrom
feat/thresholds-tab

Conversation

@merefield

@merefield merefield commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Configured quota step-down profiles previously had no dedicated overview. This adds Quota → Thresholds, immediately after Resets, whenever --quota-step-down is 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.

  • The four primary tabs stay unchanged. Terminal V cycles through the conditional Quota view; returning to Quota remembers it.
  • Responsive presentation, keyboard/mouse-wheel scrolling and matching view hitboxes.
  • Saved Thresholds preferences fall back to Bars when launched without a policy.
  • Translations across all supported terminal languages; README and introduction updated.
  • Embedded web assets and local binary rebuilt.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity

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.

Comment thread internal/ui/thresholds.go
Comment thread internal/web/state.go
@merefield merefield changed the title FEAT: show configured model steps in a conditional Thresholds tab FEAT: add conditional Thresholds view under Quota Sep 19, 2026
@merefield
merefield merged commit 2e04ad4 into main Sep 19, 2026
6 checks passed
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.

2 participants