Repository navigation
feat: add Muse Code allowance to Rust dashboard and widgets (#273) - #274
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4084236c67
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a169450430
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Adds opt-in Muse Code subscription allowance across the Rust provider registry, settings, refresh, dashboard, account history, alerts and widget feed. Reads schema-1
muse usage --jsonthrough the contained runner with child-only environment/cwd/output limits. Preserves source observation and fetch times, independent valid siblings and last-good history. Null stays unavailable; token activity never becomes quota. Muse has no SUS or price.The contract follows the shipped Pi implementation at 588be884. MUSE_CODE.md records the field map, acquisition/freshness policy, consumer inventory and limits. Free-form reasons cannot safely distinguish expired auth, entitlement denial, PAYG or rate limiting; those diagnoses remain unsupported.
The cached-alert review finding is addressed by a validated per-metric evaluation context. Alert condition, severity, outlook and ordering use the same source assessment after actual-now freshness/reset checks. Relative exhaustion countdowns advance from that anchor to wall time once and clamp at zero. At-reset percentages, Early-before-reset gaps and observed quota stay unchanged. Reset countdowns use actual wall time.
Metrics collection also retains bounded failure evidence before cleanup while preserving the original exception and strict merge. The 098eba8 hosted failure rejected a raw profile after successful suites and produced no comparison. Its cause remains unknown. Profiles are never repaired, filtered, discarded or retried by the collector.
Closes #273.
Acceptance Criteria
Definition of Done
72a1ee631f7a1e8be4cdee79f77ed8adab68374d.72a1ee631f7a1e8be4cdee79f77ed8adab68374d.Validation
Head
72a1ee631f7a1e8be4cdee79f77ed8adab68374d; base7bb492fd3622727eee81b1e31f7256a15e71c3dd. Bound brancht3/muse-code-provider-ui; worktree clean at capture.cargo fmt --all --check: passed.cargo clippy --workspace --all-targets --locked -- -D warnings: passed.cargo test --workspace --locked: passed, 1,032 tests plus the standalone contained-command fixture; 5 existing ignored tests unchanged.cargo clippy -p codexbar-app --all-targets --features capture --locked -- -D warnings: passed.npm run lint:mdandgit diff --check: passed. The existing dependency future-compatibility notice forblock v0.1.6remains unchanged.a169450, a fresh five-minute cached source triggers the alert while its detail incorrectly reports Normal. At6a2415f, actual GPUI shows the related relative countdown mismatch. Current tests verify severity/observed/is_projected/outlook/summary, warning-only ranking, notification deduplication, old-key recovery, stale/expired guards, valid Weekly siblings, zero-crossing clamp and legacy delta 0. The production adapter cache preserves original observation and fetch times. Real table, card/takeaway, bar accessibility/hover and actual widget-reader paths agree.e86a5c87c1386a15880e215649d832a5bb4c59ec47de2d4eebc24f17f25f80f8.a169450; no script rerun was needed for unchanged tooling.Repeatable exact-head capture, starting with a fresh directory:
All new after images are actual macOS GPUI renders from
72a1ee631f7a1e8be4cdee79f77ed8adab68374d, light theme, 2880 × 1922, synthetic data and no live provider polling. The two before images identify their own source commits. Earlier captures without explicit settings isolation are not used or uploaded.Before, exact base: no Muse provider in the sanitized demo table.
Before the relative-countdown follow-up, exact
6a2415f: the alert severity is already corrected, but the table/takeaway say 1h 58m to exhaustion while reset is in 1h 55m and the gap is 2m early.After, exact current head: source 60.5% is displayed rounded to 60%; the original at-reset 101% projection and 2m Early gap remain. Every relative exhaustion countdown is now 1h 53m, while reset stays 1h 55m. Valid Weekly keeps its independent alert.
Current-head allowance and freshness states
Measured 15% short / 5% weekly, source observation retained; no Muse SUS or price.
Invalid short sibling stays n/a; valid Weekly stays 5%.
Exhausted quota caps bars at 100% while preserving raw forecast usage; uncovered eligible widget quotas are red.
Null allowance is unavailable/n/a, with no zero, unlimited or spare-capacity claim.
Failed refresh retains original sample clocks and explicit stale/last-known status.
Source older than 420 seconds keeps its timestamps and suppresses current forecasts; widgets are neutral.
Current-head reset rollover and settings
Before reset, short quota remains current.
After reset, still inside source freshness, short quota is n/a and cannot forecast or alert; valid Weekly remains current.
Opt-in settings explain the existing CLI-only session contract.
Prior 098eba8 render evidence retained, 18 image links
These prior images and their verified byte hashes remain preserved. They are earlier evidence, not exact current-product renders.