Conversation
…and no invented reset
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
UI proof (browser-use)Result: PASS on build
At the maintainer's direction, this proof drove the app's WebView2 over CDP with the browser-use CLI instead of CUA. It used no keyboard, mouse or focus. Provider selection and refreshes were DOM Setup
Fixture scenariosThe payload shapes come from upstream v0.63.0's
Results
About T9:
Validation at
|
| Command | Result |
|---|---|
cargo +1.98.0 fmt --all --check |
pass |
cargo +1.98.0 clippy --workspace --all-targets -- -D warnings |
pass |
cargo +1.98.0 test -p codexbar stepfun |
11 passed |
cargo +1.98.0 test -p codexbar |
2168 + 1 passed, 0 failed, 1 ignored |
cargo +1.98.0 test -p codexbar-desktop-tauri -- --skip bootstrap_payload_exposes_every_provider_variant |
461 passed, 0 failed. The skipped test is the non-hermetic #684 test that #711 fixes. |
Screenshots
All paths are under %LOCALAPPDATA%\Win-CodexBar\port-audit\proof\710\shots\.
| File | What it shows |
|---|---|
710-tray-s1-coding-plan-overview.png |
S1 in the compact overview: 5-hour and Weekly lanes. |
710-tray-s1-coding-plan-selected.png |
S1 with StepFun selected: both lanes with their reset lines. |
710-tray-s2-credit-monthly.png |
S2: one "Credit" lane, 4% used, "Resets in 30d 18h". |
710-tray-s3-credit-zero-reset.png |
S3: "Credit 50% used" with no reset line. |
710-tray-s4-topup-only-plan-status-500.png |
S4: "Credit 40% used" with the "Oasis-Token" badge after plan status HTTP 500. |
710-tray-s5-credit-no-balance.png |
S5: "Credit" with "No credit balance reported". |
710-tray-s6-live-window-wins.png |
S6: 5-hour and Weekly lanes, no Credit lane. |
710-settings-providers-stepfun-s3.png |
Settings > Providers: the StepFun detail pane. |
The fixture request log for T9 is proof\710\storm-requests-s2.log.
Not blocking (already on main)
None of these come from this PR; its diff touches only rust/src/providers/stepfun/mod.rs.
- Settings > Providers ignores the snapshot's lane labels. The usage bar reads "Session" where the tray says "Credit", and the "Menu and floating bar metric" select offers "Automatic" and "Session". The same was seen for OpenRouter on Port upstream 0.61.0: OpenRouter diagnostics and Activity summary #703 and for Kimi on Port upstream 0.69.0: mark Kimi windows blocked by an exhausted monthly limit (stacked on #691) #697.
- The compact tray overview hides reset lines. This is by design (
compactOverviewinTrayPanel.tsx); selecting the provider shows them, as the screenshots do. - An empty
global_shortcutlogsWARN codexbar_desktop_tauri::shortcut_bridge: Could not parse global shortcut:at every launch. This was already reported on Fix reset refresh timer for resets over 24.8 days away #720.
Summary
StepFun Token Plan (credit) payloads now produce a usable snapshot instead of failing with "Missing StepFun five-hour usage". Credit plans show a single primary lane labelled Credit, never get an invented reset date, and Coding Plan snapshots keep their 5-hour / Weekly labels and lanes.
Found by the 0.60.4-0.69.0 port gap audit (0.63.0 item #13).
Upstream reference
7a1704fff).Sources/CodexBarCore/Providers/StepFun/StepFunUsageFetcher.swift(StepFunRateLimitResponse.isCreditPlan,StepFunPlanCreditRateLimit.totalCreditLeftRate,StepFunUsageSnapshot.toUsageSnapshotcredit branch),StepFunProviderDescriptor.swift(rateWindowLabels).Ported / Deferred
Ported (
rust/src/providers/stepfun/mod.rsonly):plan_family,plan_credit_rate_limit(subscription_credit_left_rate,subscription_credit_reset_time,topup_credit_left_rate,credit_buckets[].credit_total/credit_residual), all names taken from the upstream decoder.plan_family == 2only as tie-breaker.used = clamp((1 - left) * 100), left rate weighted from sound buckets (residual/total), else subscription rate, else top-up rate (never summed).subscription_credit_reset_timestays unknown: noresets_at, no reset description, no window minutes. A real reset sets monthly window minutes via the existingRateWindow::monthly_window_minutes.primary_label = "Credit"via the existingUsageSnapshot::primary_label; the Tauri bridge, tray and CLI already consume it. Coding Plan still requires the five-hour and weekly fields.Left out:
UsageSnapshot.primaryis non-optional, so this shows an informational "No credit balance reported" primary (the same pattern used by Amp/Antigravity), not an error and not a quota percentage.ProviderPaceCapability.monthlyWindowSentinelMinutesis replaced by the local calendar-month helper, matching how other monthly providers (Abacus) are handled.expire_at/next_reset_atbucket fields are unused by upstream's snapshot and are not modelled.5h Window): unrelated to this item.Validation
cargo +1.98.0 fmt --all: cleancargo +1.98.0 clippy --workspace --all-targets -- -D warnings: pass (both manifests)cargo +1.98.0 test -p codexbar stepfun: 11 passed, 0 failed (8 new: coding-plan regression and missing-field error, credit with reset, no/zero reset, bucket weighting, unsound-bucket fallback, no-balance credit family, live window beats credit family)cargo test -p codexbarand frontend tests were not run.Affected areas
Provider: StepFun. Tray/dashboard/CLI primary-lane label (Credit) and reset line.
UI proof
Pending: coordinator will capture CUA proof on a fresh build.