Skip to content

Distinguish quota warnings from workday markers#1906

Merged
steipete merged 3 commits into
steipete:mainfrom
Alekstodo:feature/quota-warning-markers-updated-ui
Jul 5, 2026
Merged

Distinguish quota warnings from workday markers#1906
steipete merged 3 commits into
steipete:mainfrom
Alekstodo:feature/quota-warning-markers-updated-ui

Conversation

@Alekstodo

@Alekstodo Alekstodo commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Make quota warning thresholds unmistakable with a full-height punch-out and adaptive neutral stripe.
  • Keep workday boundaries as a separate, subtle lower tick instead of flattening both concepts into one marker style.
  • Give quota warnings precedence when a threshold and workday boundary overlap.
  • Expose both marker classes in the progress bar accessibility value.

Why

The previous inset warning hairline could disappear into the fill. The original version of this PR improved visibility, but it treated warning thresholds and workday boundaries as the same dominant marker and used a hard-coded white stripe that could disappear in light mode.

The revised model carries warning and workday percentages independently from projection through rendering. Warning thresholds use the strong punch-out treatment; workday boundaries remain lightweight orientation marks. Colors use adaptive primary/selected-row styling.

Maintainer improvements

  • Merged current main before validation.
  • Removed the old merged marker-array path instead of keeping a compatibility shim.
  • Added deterministic normalization, deduplication, edge filtering, and overlap precedence.
  • Forwarded typed marker data through menu cards, provider details, redaction copies, MiniMax, Codex projections, and height fingerprints.
  • Added readable regression tests for geometry, semantics, overlap, invalid values, Codex lanes, and MiniMax weekly rows.

Validation

  • swift test --filter 'MenuCardQuotaWarningMarkerTests|MenuCardModelCodexProjectionTests|MiniMaxMenuCardModelPlanTests' — 33 tests passed.
  • make check — 0 format/lint violations.
  • make test — all 47 shards passed.
  • Autoreview — no actionable findings.
  • Fresh ad-hoc debug app launched and remained running on exact head.
  • Deterministic production-view render matrix passed for light/dark × normal/highlighted using identical data:
    • warning thresholds at 20% and 50%,
    • workday boundaries at 20%, 40%, 60%, and 80%,
    • the overlapping 20% marker rendered once as a warning,
    • adaptive contrast remained visible in every state.

Original before/after proof

Before: softened warning marker.

Before: softened quota warning marker

After baseline from the contributor branch; the maintainer revision further separates workday ticks and adapts light/dark color.

After: full-height quota warning marker

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed July 5, 2026, 12:23 AM ET / 04:23 UTC.

Summary
The branch separates quota-warning and workday marker percentages through menu-card models and renders quota warnings as full-height punch-out stripes while workday boundaries remain lower ticks.

Reproducibility: not applicable. this is a visual refinement PR rather than a bug report. The changed behavior is reviewable from the current-main source, PR diff, focused tests, and inspected screenshots.

Review metrics: 2 noteworthy metrics.

  • Patch surface: 10 files changed, +257/-90. The change is broader than one renderer tweak because it carries separate marker kinds through model plumbing and tests.
  • Visual proof: 2 PNG crops inspected. The changed behavior is visual, and the screenshots directly show the before/after marker rendering.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Record maintainer approval for the stronger full-height warning marker style before merge.

Risk before merge

  • [P1] The remaining merge question is product/design acceptance of making quota warnings a stronger full-height punch-out in the compact menu UI.

Maintainer options:

  1. Decide the mitigation before merge
    Merge the focused renderer, model, accessibility, and test changes if maintainers approve the stronger warning-marker visual treatment.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair is needed; the remaining action is maintainer approval of the visual language plus ordinary merge checks.

Security
Cleared: The diff changes SwiftUI rendering, menu-card model plumbing, and focused tests only; it does not touch dependencies, scripts, signing, secrets, or other supply-chain sensitive surfaces.

Review details

Best possible solution:

Merge the focused renderer, model, accessibility, and test changes if maintainers approve the stronger warning-marker visual treatment.

Do we have a high-confidence way to reproduce the issue?

Not applicable: this is a visual refinement PR rather than a bug report. The changed behavior is reviewable from the current-main source, PR diff, focused tests, and inspected screenshots.

Is this the best way to solve the issue?

Yes, subject to maintainer design approval: the patch reuses the existing Canvas punch-out approach and separates warning and workday marker semantics instead of adding a parallel rendering path.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 68f5f9156a05.

Label changes

Label justifications:

  • P3: This is low-risk UI and accessibility polish for existing quota marker rendering with limited blast radius.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body includes before/after screenshot crops that directly show the updated menu-card quota warning marker rendering.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes before/after screenshot crops that directly show the updated menu-card quota warning marker rendering.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes before/after screenshot crops that directly show the updated menu-card quota warning marker rendering.
Evidence reviewed

What I checked:

  • Repository policy read: Read the full target AGENTS.md and applied its guidance to use focused Swift/model inspection and avoid live provider or keychain validation during review. (AGENTS.md:1, 68f5f9156a05)
  • Current main behavior: Current main renders warning markers from a single warning-marker array as subtle rounded inset marks and exposes only the base percentage in the progress-bar accessibility value. (Sources/CodexBar/UsageProgressBar.swift:81, 68f5f9156a05)
  • PR renderer change: PR head resolves warning and workday marker kinds separately, punches out quota warning markers, draws their slim stripe, and leaves workday boundaries as lower ticks. (Sources/CodexBar/UsageProgressBar.swift:104, ef986970c3a2)
  • PR model plumbing: Weekly and Codex rate metrics now pass quota warning percents and workday marker percents as separate fields instead of merging them into one marker list. (Sources/CodexBar/MenuCardView.swift:1521, ef986970c3a2)
  • Focused tests: The PR adds geometry, overlap precedence, deduplication, invalid-value, Codex weekly, and MiniMax weekly marker coverage for the separated marker model. (Tests/CodexBarTests/MenuCardQuotaWarningMarkerTests.swift:16, ef986970c3a2)
  • Visual proof inspected: Downloaded and viewed the PR's before/after PNG crops; they directly show the quota warning marker changing from a subtle inset mark to a full-height punched stripe. (ef986970c3a2)

Likely related people:

  • Alekstodo: Authored the merged quota warning controls and marker pipeline that this visual refinement builds on, and also authored the initial branch commit. (role: introduced related behavior; confidence: high; commits: 18eb73dde236, a0b038f16137; files: Sources/CodexBar/UsageProgressBar.swift, Sources/CodexBar/MenuCardQuotaWarningMarkers.swift, Tests/CodexBarTests/MenuCardQuotaWarningMarkerTests.swift)
  • steipete: Current main blame and the latest PR-head follow-up commit both touch the progress-bar and menu-card marker implementation. (role: recent area contributor; confidence: high; commits: e437044c32ba, ef986970c3a2; files: Sources/CodexBar/UsageProgressBar.swift, Sources/CodexBar/MenuCardView.swift)
  • Yuxin-Qiao: Authored the merged workday segmentation path that shares the weekly marker pipeline this PR separates from quota warnings. (role: adjacent area contributor; confidence: medium; commits: e9b7e25f851b; files: Sources/CodexBar/MenuCardQuotaWarningMarkers.swift, Sources/CodexBar/MenuCardView.swift, Tests/CodexBarTests/MenuCardModelCodexProjectionTests.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (4 earlier review cycles)
  • reviewed 2026-07-04T23:31:04.588Z sha a0b038f :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-04T23:50:42.225Z sha a0b038f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-05T00:01:08.053Z sha a0b038f :: needs maintainer review before merge. :: none
  • reviewed 2026-07-05T04:09:48.718Z sha ef98697 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

@openclaw-mantis visual task: capture CodexBar menu-card quota warning markers before and after the full-height punch-out rendering.

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 4, 2026

Copy link
Copy Markdown

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 4, 2026
@steipete steipete changed the title [codex] Refine quota warning markers for updated UI Distinguish quota warnings from workday markers Jul 5, 2026
@steipete steipete marked this pull request as ready for review July 5, 2026 04:19
@steipete

steipete commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Exact head ef986970c3a2a52a02c6a75c5f4baf8fa52e9ffe verified: focused marker suite (33 tests), make check, full 47-shard make test, structured autoreview clean, fresh packaged app, deterministic production-view rendering in light/dark and highlighted/unhighlighted states, and all required CI checks green. Warning markers remain dominant, workday boundaries stay subtle, exact overlaps prefer warnings, and accessibility exposes both marker types. Thank you, @Alekstodo!

@steipete steipete merged commit 71a768b into steipete:main Jul 5, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants