You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bf73afe
Browse filesBrowse the repository at this point in the historyBrowse files
feat(gui): hide the Codex Spark quota by default behind a Codex Auth switch (#2649)
* feat(gui): hide the Codex Spark quota by default behind a Codex Auth switch
Every Codex account card carried a second bar labelled "GPT-5.3-Codex-Spark
Weekly", emitted unconditionally whenever the WHAM payload contains the
codex_bengalfox feature. It applies to one model, reads 0% for most operators,
and on a four-account pool it doubles the row count for information almost
nobody acts on.
It is now hidden unless the operator asks for it, and the switch that asks sits
in the Codex Auth header beside Pause exhausted and Refresh quotas - the row
that already holds the page-wide controls. A per-account toggle was rejected:
the setting is about a window KIND, not an account, and four toggles that must
agree is a state-sync bug waiting to happen.
The filter lands in the API projection rather than in CSS, and at
providerQuotaFromCodexQuota rather than only in the Codex Auth DTO. Spark
reaches the GUI through three paths, not one: /api/codex-auth/accounts via
quotaForPlan, /api/provider-quotas pooled via listCodexAuthAccountsSnapshot,
and /api/provider-quotas direct via fetchMainAccountInfoSnapshot - which never
touches the Codex Auth DTO at all. That third path was found by an existing
test still passing after the first attempt, which is the useful kind of test
failure.
Matching on the exact label is load-bearing. customWindows is the generic
carrier for Cursor's First-party models and API usage, Anthropic's
Fable/Opus/Sonnet, Antigravity's Gem/Cla, Kimi's subscription credits and a
dozen dynamic provider meters; a filter written as "drop custom windows" would
blank all of them. A regression pins that.
Nothing is filtered at parse or cache time. Custom windows participate in
quota-presence checks, snapshot reconciliation and capacity aggregation, so
removing Spark upstream of the projection would change routing state rather
than display.
Server: showCodexSparkQuota through GET/PUT /api/settings with the same
validate-mutate-persist-rollback shape the neighbouring preferences use, and
the same degrade-not-reject schema treatment - a malformed hand edit hides
Spark rather than discarding the config.
Tests: six visibility cases including the non-Spark preservation case and the
absent-vs-empty wire distinction; the existing provider-quota Codex test now
asserts the projection DROPS a window the fixture still carries. Falsified by
disabling the filter: 4 tests fail. i18n across all nine locales.
bun run typecheck exit 0. bun run test 0 fail. cd gui && bun test 994 pass.
* fix(gui): tear the Spark settings read down with AbortController
react-doctor's no-set-state-after-await-in-effect flagged the settings load:
the effect awaited a fetch and then called setSparkVisible, guarded only by a
`cancelled` closure flag the linter cannot see through.
The guard was real but the teardown was not - a `cancelled` flag stops the
state update while leaving the request itself in flight. An AbortController
actually tears the request down on unmount, and the state update now lands in
a .then() whose guard is visible to the rule.
CI runs react-doctor with --scope changed, so this was a finding on this
branch's own file rather than a pre-existing one.
"codexAuth.openaiPresetUnavailable": "Le préréglage du fournisseur OpenAI est indisponible.",
1469
1469
"codexAuth.openProviders": "Ouvrir Fournisseurs",
1470
1470
"codexAuth.add": "Ajouter",
1471
+
"codexAuth.sparkQuota": "Quota Codex Spark",
1472
+
"codexAuth.sparkQuotaHint": "Affiche la fenêtre hebdomadaire GPT-5.3-Codex-Spark sur les cartes de compte. Masquée par défaut car elle ne concerne qu'un seul modèle.",
"codexAuth.sparkQuotaHint": "Показывать недельное окно GPT-5.3-Codex-Spark на карточках аккаунтов. По умолчанию скрыто: оно относится лишь к одной модели.",
"codexAuth.sparkQuotaHint": "Hesap kartlarında GPT-5.3-Codex-Spark haftalık penceresini gösterir. Yalnızca tek bir modeli kapsadığı için varsayılan olarak gizlidir.",
0 commit comments