[bug]: Sidebar ignores formatStyle: "allWindows", only shows most restricted window
Pre-flight checks
- [x] I searched existing issues and did not find a duplicate.
- [x] I verified this on the current production released OpenCode version, or I explain why not below.
OpenCode version tested
1.14.29
opencode-quota version tested
3.4.0
Bug summary
Sidebar ignores formatStyle: "allWindows" — only shows most restricted window instead of all three
Steps to reproduce
- Configure opencode-go provider with env vars (OPENCODE_GO_WORKSPACE_ID, OPENCODE_GO_AUTH_COOKIE)
- Set
experimental.quotaToast.formatStyleto"allWindows"in opencode.json - Set
experimental.quotaToast.opencodeGoWindowsto["rolling", "weekly", "monthly"] - Restart OpenCode
- Run
/quota→ shows all 3 windows ✓ - Check TUI sidebar → only 1 window shown ✗
Expected behavior
Sidebar shows all 3 OpenCode Go windows (5h, Weekly, Monthly) when formatStyle is "allWindows"
Actual behavior
Sidebar only shows the most restricted window (Weekly, 62%) regardless of formatStyle setting
Relevant logs/output
# Quota Status (opencode-quota v3.4.0) (/quota_status) 12:06 29/04/2026
toast:
- configSource: files
- configPaths: /Users/juanperetto/.config/opencode/opencode.json (experimental.quotaToast)
- precedence: global defaults -> workspace overrides
- global_config_paths: /Users/juanperetto/.config/opencode/opencode.json (experimental.quotaToast)
- workspace_config_paths: (none)
- setting_sources: enableToast<=/Users/juanperetto/.config/opencode/opencode.json (experimental.quotaToast) | formatStyle<=/Users/juanperetto/.config/opencode/opencode.json (experimental.quotaToast) | percentDisplayMode<=/Users/juanperetto/.config/opencode/opencode.json (experimental.quotaToast) | enabledProviders<=/Users/juanperetto/.config/opencode/opencode.json (experimental.quotaToast) | showSessionTokens<=/Users/juanperetto/.config/opencode/opencode.json (experimental.quotaToast)
- enabledProviders: (auto)
- onlyCurrentModel: false
- currentModel: (error: session.get returned no modelID)
tui:
- workspace_root: /Users/juanperetto/Projects
- config_root: /Users/juanperetto/Projects
- config_configured: true
- inferred_selected_config_path: /Users/juanperetto/.config/opencode/tui.json
- present_config_paths: /Users/juanperetto/.config/opencode/tui.json
- candidate_config_paths: /Users/juanperetto/.config/opencode/tui.json | /Users/juanperetto/.config/opencode/tui.jsonc | /Users/juanperetto/Library/Application Support/opencode/tui.json | /Users/juanperetto/Library/Application Support/opencode/tui.jsonc | /Users/juanperetto/Projects/tui.json | /Users/juanperetto/Projects/tui.jsonc | /Users/juanperetto/Projects/.opencode/tui.json | /Users/juanperetto/Projects/.opencode/tui.jsonc
- quota_plugin_configured: true
- quota_plugin_paths: /Users/juanperetto/.config/opencode/tui.json
- providers:
- anthropic: disabled unavailable
- copilot: disabled unavailable
- openai: disabled unavailable
- cursor: disabled unavailable
- qwen-code: disabled unavailable
- alibaba-coding-plan: disabled unavailable
- synthetic: disabled unavailable
- chutes: disabled unavailable
- google-antigravity: disabled unavailable
- google-gemini-cli: disabled unavailable
- zai: disabled unavailable
- nanogpt: disabled unavailable
- minimax-coding-plan: disabled unavailable
- kimi-for-coding: disabled unavailable
- opencode-go: enabled available
paths:
- opencode_dirs: data=/Users/juanperetto/.local/share/opencode config=/Users/juanperetto/.config/opencode cache=/Users/juanperetto/.cache/opencode state=/Users/juanperetto/.local/state/opencode
- auth.json: preferred=/Users/juanperetto/.local/share/opencode/auth.json present=/Users/juanperetto/.local/share/opencode/auth.json candidates=/Users/juanperetto/.local/share/opencode/auth.json | /Users/juanperetto/Library/Application Support/opencode/auth.json
- qwen oauth auth configured: false
- qwen_oauth_source: (none)
- qwen_local_plan: (none)
- alibaba auth configured: false
- alibaba_api_key_source: (none)
- alibaba_api_key_checked_paths: /Users/juanperetto/.config/opencode/opencode.json
- alibaba_api_key_auth_paths: /Users/juanperetto/.local/share/opencode/auth.json | /Users/juanperetto/Library/Application Support/opencode/auth.json
- alibaba coding plan fallback tier: lite
- alibaba_coding_plan: (none)
openai:
- auth_configured: false
- auth_source: (none)
- token_status: (none)
- token_expires_at: (none)
- account_email: (none)
- account_id: (none)
anthropic:
- cli_installed: true
- cli_version: 2.1.123
- auth_status: authenticated
- quota_supported: true
- quota_source: claude-credentials-oauth-api
- checked_commands: claude --version | claude auth status --json
- five_hour_remaining: 90% reset_at=2026-04-29T11:39:59.639Z
- seven_day_remaining: 37% reset_at=2026-04-29T22:00:00.639Z
cursor:
- plan: none
- included_api_usd: (none)
- billing_cycle_start_day: (calendar month)
- auth_state: missing
- auth_selected_path: (none)
- auth_present_paths: /Users/juanperetto/.local/share/opencode/auth.json
- auth_candidate_paths: /Users/juanperetto/.local/share/opencode/auth.json | /Users/juanperetto/Library/Application Support/opencode/auth.json | /Users/juanperetto/.cursor/cli-config.json | /Users/juanperetto/.cursor/auth.json | /Users/juanperetto/.config/cursor/cli-config.json | /Users/juanperetto/.config/cursor/auth.json
- plugin_enabled: false
- canonical_plugin_package: @playwo/opencode-cursor-oauth
- provider_configured: false
- config_matches: (none)
- config_checked_paths: /Users/juanperetto/.config/opencode/opencode.json | /Users/juanperetto/.config/opencode/opencode.jsonc | /Users/juanperetto/Library/Application Support/opencode/opencode.json | /Users/juanperetto/Library/Application Support/opencode/opencode.jsonc | /Users/juanperetto/Projects/opencode.json | /Users/juanperetto/Projects/opencode.jsonc
- cycle_source: calendar_month
- cycle_reset_at: 2026-04-30T22:00:00.000Z
- api_usage: $0.00 across 0 messages
- auto_composer_usage: $0.00 across 0 messages
- total_cursor_usage: $0.00 across 0 messages
- unknown_cursor_models: 0
- qwen free local quota: path=/Users/juanperetto/.local/state/opencode/opencode-quota/qwen-local-quota.json exists=false
- qwen free local usage: daily=0/1000 rpm=0/60 (default state)
- alibaba coding plan local quota: path=/Users/juanperetto/.local/state/opencode/opencode-quota/alibaba-coding-plan-local-quota.json exists=false
minimax:
- auth_state: none
- api_key_configured: false
- api_key_source: (none)
- api_key_checked_paths: /Users/juanperetto/.config/opencode/opencode.json
- api_key_auth_paths: /Users/juanperetto/.local/share/opencode/auth.json | /Users/juanperetto/Library/Application Support/opencode/auth.json
kimi:
- auth_state: none
- api_key_configured: false
- api_key_source: (none)
- api_key_checked_paths: /Users/juanperetto/.config/opencode/opencode.json
- api_key_auth_paths: /Users/juanperetto/.local/share/opencode/auth.json | /Users/juanperetto/Library/Application Support/opencode/auth.json
opencode_go:
- config_state: configured
- config_source: env
- config_checked_paths: /Users/juanperetto/.config/opencode/opencode-quota/opencode-go.json | /Users/juanperetto/Library/Application Support/opencode/opencode-quota/opencode-go.json
- selected_windows: rolling,weekly,monthly
- rolling_usage: percent_used=21 percent_remaining=79 reset_in_sec=3687 reset_at=2026-04-29T11:07:50.346Z
- weekly_usage: percent_used=38 percent_remaining=62 reset_in_sec=395617 reset_at=2026-05-04T00:00:00.346Z
- monthly_usage: percent_used=19 percent_remaining=81 reset_in_sec=2428977 reset_at=2026-05-27T12:49:20.346Z
- live_probe: success
- live_entry_1: 5h: percent_remaining=79 reset_at=2026-04-29T11:07:50.598Z
- live_entry_2: Weekly: percent_remaining=62 reset_at=2026-05-04T00:00:00.598Z
- live_more: +1 additional rows suppressed
zai:
- auth_state: none
- api_key_configured: false
- api_key_source: (none)
- api_key_checked_paths: /Users/juanperetto/.config/opencode/opencode.json
- api_key_auth_paths: /Users/juanperetto/.local/share/opencode/auth.json | /Users/juanperetto/Library/Application Support/opencode/auth.json
synthetic:
- synthetic api key: configured=false checked=/Users/juanperetto/.config/opencode/opencode.json
chutes:
- chutes api key: configured=false checked=/Users/juanperetto/.config/opencode/opencode.json
nanogpt:
- api_key_configured: false
- api_key_source: (none)
- api_key_checked_paths: /Users/juanperetto/.config/opencode/opencode.json
- api_key_auth_paths: /Users/juanperetto/.local/share/opencode/auth.json | /Users/juanperetto/Library/Application Support/opencode/auth.json
copilot_quota_auth:
- pat_state: absent
- billing_mode: none
- billing_scope: none
- quota_api: none
- billing_api_access_likely: false
- remaining_totals_state: unavailable
- pat_checked_paths: /Users/juanperetto/.config/opencode/copilot-quota-token.json | /Users/juanperetto/Library/Application Support/opencode/copilot-quota-token.json
- oauth_configured: false key=(none) refresh=false access=false
- effective_source: none
- override: none
google_antigravity:
- auth_state: missing
- selected_accounts_path: (none)
- present_accounts_paths: (none)
- candidate_accounts_paths: /Users/juanperetto/.config/opencode/antigravity-accounts.json | /Users/juanperetto/Library/Application Support/opencode/antigravity-accounts.json | /Users/juanperetto/.local/share/opencode/antigravity-accounts.json
- account_count: 0
- valid_account_count: 0
- companion_package_state: missing
- companion_package_path: (none)
- companion_error: Install opencode-antigravity-auth separately to enable Google Antigravity quota
- token_cache_path: /Users/juanperetto/.cache/opencode/opencode-quota/google-access-tokens.json exists=false
- opencode db: preferred=/Users/juanperetto/.local/share/opencode/opencode.db present=/Users/juanperetto/.local/share/opencode/opencode.db candidates=/Users/juanperetto/.local/share/opencode/opencode.db | /Users/juanperetto/Library/Application Support/opencode/opencode.db
google_gemini_cli:
- auth_state: missing
- auth_source: (none)
- account_count: 0
- valid_account_count: 0
- companion_package_state: missing
- companion_package_path: (none)
- companion_error: Install opencode-gemini-auth separately to enable Gemini CLI quota
storage:
- sessions_in_db: 53
- messages_in_db: 1,846
- assistant_messages_in_db: 1,627
pricing_snapshot:
- pricing: source=https://models.dev/api.json active_source=runtime generated_at=2026-04-29T07:40:41.981Z units=USD per 1M tokens
- selection: configured=auto active=runtime
- runtime_paths: snapshot=/Users/juanperetto/.cache/opencode/opencode-quota/modelsdev-pricing.runtime.min.json refresh_state=/Users/juanperetto/.cache/opencode/opencode-quota/modelsdev-pricing.refresh-state.json
- staleness: age_ms=8,741,383 max_age_ms=604,800,000 stale=false
- refresh_policy: auto_refresh_days=7
- refresh: last_attempt_at=2026-04-29T07:40:41.981Z last_success_at=2026-04-29T07:40:41.981Z last_failure_at=(none) last_result=success
- providers: anthropic,google,moonshotai,openai,xai,zai
- coverage_seen: priced_keys=2 mapped_but_missing=0 unpriced_keys=0
- anthropic: models=23 priced_models_seen=0 mapped_but_missing_models_seen=0 unpriced_models_seen=0
- google: models=35 priced_models_seen=0 mapped_but_missing_models_seen=0 unpriced_models_seen=0
- moonshotai: models=7 priced_models_seen=1 mapped_but_missing_models_seen=0 unpriced_models_seen=0
- openai: models=48 priced_models_seen=0 mapped_but_missing_models_seen=0 unpriced_models_seen=0
- xai: models=25 priced_models_seen=0 mapped_but_missing_models_seen=0 unpriced_models_seen=0
- zai: models=13 priced_models_seen=1 mapped_but_missing_models_seen=0 unpriced_models_seen=0
supported_providers_pricing:
- anthropic: pricing=yes (models.dev snapshot provider)
- copilot: pricing=yes (connector (priced via models.dev openai))
- openai: pricing=yes (models.dev snapshot provider)
- cursor: pricing=partial (API-pool models map to official pricing; Auto/Composer use bundled static Cursor rates)
- qwen-code: pricing=no (local request-count estimate (free tier, no token pricing API))
- alibaba-coding-plan: pricing=no (local request-count estimate (tiered rolling windows, no token pricing API))
- synthetic: pricing=no (subscription request quota (not token-priced))
- chutes: pricing=no (no local usage observed)
- google-antigravity: pricing=yes (connector (priced via models.dev google/anthropic))
- google-gemini-cli: pricing=yes (connector (priced via models.dev google))
- zai: pricing=yes (models.dev snapshot provider)
- nanogpt: pricing=no (subscription request quota + account balance (not token-priced))
- minimax-coding-plan: pricing=no (no local usage observed)
- kimi-for-coding: pricing=no (request quota via Kimi Code API (not token-priced))
- opencode-go: pricing=no (subscription percentage quota via dashboard scraping (not token-priced))
unpriced_models:
- none
unknown_pricing:
- keys: 4 tokens_total=90,126,909
- opencode-go/deepseek-v4-pro: mapped=(none) tokens=73,079,065 msgs=395
- opencode-go/deepseek-v4-flash: mapped=(none) tokens=7,968,188 msgs=179
- opencode-go/mimo-v2.5-pro: mapped=(none) tokens=5,356,026 msgs=130
- opencode-go/qwen3.6-plus: mapped=(none) tokens=3,723,630 msgs=75
If not tested on current production OpenCode, explain why
No response
I reviewed https://github.com/slkiser/opencode-quota/issues/66 but I think it's not relevant in my problem.
@Pitusaa Thanks for the report, investigating
I debugged this and found the root cause is in collectQuotaRenderData →
projectProviderResultToStyle in quota-render-data.js.
When called from the sidebar, formatStyle doesn't carry through correctly
and falls back to singleWindow (the default). The /quota command and
toast work because they pass formatStyle explicitly.
Workaround we tested: making projectProviderResultToStyle always return all
entries confirms all 3 windows render correctly in the sidebar.
The fix should be ensuring the sidebar code path in loadSidebarPanel
(tui-runtime.js) passes runtime.config.formatStyle correctly, or making
resolveQuotaFormatStyle default to the user's configured style instead of
"singleWindow" for sidebar contexts.
Hope it helps!
@Pitusaa Fixed in v3.5.0