Repository navigation
Give unnamed perk events a perk.quantity - #22
Conversation
When the reset-credit count moves by more credits than the list names, the leftover goes into one id-less event. Bar Telemetry Spec v1 now has perk.quantity so that event can say how many credits it stands for; without it Bar UI would read it as one.
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (3)
✨ Finishing Touches
Thanks 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 |
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.
🟢 Approval recommended
The implementation is focused, consistent with the described telemetry contract, and adequately tested.
0 open findings
What changed in this PR
Adds quantities to unnamed reset-credit events so Bar UI counts batched credit changes correctly.
Changes:
- Emits
perk.quantityfor unnamed available/gone events. - Tests batched and named-event behavior.
- Documents the telemetry semantics.
| File | Description |
|---|---|
Sources/CodexBarCore/BarTelemetry.swift |
Adds quantities to unnamed perk events. |
Tests/CodexBarCoreTests/BarTelemetryTests.swift |
Verifies quantity inclusion and omission. |
docs/telemetry.md |
Documents quantity behavior. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
I'm adding
perk.quantityto unnamed reset-credit events so Bar UI doesn't undercount when several credits come or go at once. The Bar Telemetry Spec v1 clarifications in GordonBeeming/bar-ui#17 define the attribute, and Bar UI reads a missing value as 1.CodexBar writes one of these events, with no
perk.id, when the available count changes by more credits than it can name from the credit list. That event now carries the number of credits it covers. Events for a named credit are unchanged.Testing
All 85 tests pass. New checks cover the quantity on unnamed appear and gone events and its absence on named ones. I also installed the build locally with
make install.