Skip to content

Hide session resets in the Overview's Events by default - #28

Merged
GordonBeeming merged 1 commit into
mainfrom
gb/feature/hide-session-resets
Oct 20, 2026
Merged

GordonBeeming merged 1 commit into
mainfrom
gb/feature/hide-session-resets

Conversation

@GordonBeeming

@GordonBeeming GordonBeeming commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

A 5-hour session resets several times a day, so the Overview's Events list was mostly "Session (5h) reset" rows. They buried the weekly resets and everything else.

  • OverviewEvent carries the reset Limit's Window length. hidingShortWindowResets drops resets of a Window under a day.
  • A reset whose Window length isn't known stays visible, so nothing is hidden on a guess. Other events, such as a session Limit running low, Perks and Tracking, are never hidden.
  • The Events heading has a Show session resets switch, off by default and kept in @AppStorage. When everything in range is hidden, the empty state says that session resets are hidden.

Test plan

  • swift test: 345 tests pass
  • New tests failed first:
    • a 5h reset is hidden and a weekly one kept
    • a reset with an unknown Window is kept
    • running low and Tracking events on a session Limit are kept
  • After release: session resets are gone from the Events list by default (screenshots below)
  • The switch brings them back and survives a relaunch (not checked yet)

Screenshots

Before: the Events list is mostly session resets.

Events before

After, on the v0.9 release: only the weekly resets, with the switch off.

Events after

A 5-hour session resets several times a day, so its rows buried the
weekly resets and everything else in the Events list. Resets of a
Window under a day are now hidden unless "Show session resets" is on,
a switch next to the Events heading that's off by default and
remembered. A reset whose Window length isn't known stays visible.
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3cfeaf48-1e29-4298-b1fc-3a5a16de965a
📥 Commits

Reviewing files that changed from the base of the PR and between 39a4274 and 175b39b.

📒 Files selected for processing: 3
  • Sources/BarUI/EventsSection.swift
  • Sources/BarUICore/OverviewEvent.swift
  • Tests/BarUICoreTests/OverviewEventsTests.swift

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

Limit-reset events now include their window duration. The Events section hides resets from known windows shorter than 24 hours by default and provides a persisted toggle to show them.

Changes: Session reset filtering

Layer / File(s) Summary
Record and filter reset windows
Sources/BarUICore/OverviewEvent.swift, Tests/BarUICoreTests/OverviewEventsTests.swift
Limit-reset events carry their window duration. Filtering removes resets from known windows shorter than 24 hours and preserves other events. Tests cover short and unknown durations and non-reset events.
Wire filtering into the Events section
Sources/BarUI/EventsSection.swift
A persisted toggle controls whether short-window resets appear. The empty-state description indicates when those resets are hidden.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to 175b3

The reset-filtering change is mergeable after normal checks; no unresolved defect is established.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.57% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: hiding session reset events in the Overview Events list by default.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@GordonBeeming
GordonBeeming requested a balanced review from Copilot October 20, 2026 01:57
@GordonBeeming

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused changes match the intended behavior, with relevant test coverage and no unresolved blocking findings.

No open issues 🎉

What changed in this PR

Reduces noise in the Overview’s Events list by hiding short-window resets by default.

Changes:

  • Filters resets under one day while preserving unknown-window resets and other events.
  • Adds a persistent “Show session resets” switch and updates the empty-state message.
  • Adds tests covering filtering and preserved events.
File Description
Tests/​BarUICoreTests/​OverviewEventsTests.swift Tests short-window filtering and event preservation.
Sources/​BarUICore/​OverviewEvent.swift Adds reset window metadata and filtering.
Sources/​BarUI/​EventsSection.swift Adds the persistent switch and filtered display.

Review effort: Balanced

@GordonBeeming
GordonBeeming marked this pull request as ready for review October 20, 2026 02:02
@GordonBeeming

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T02:04:49.683569Z 175b39b Manual request
🔒 Security Review ✅ Completed 2026-10-20T02:04:08.460975Z 175b39b Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 175b39b410

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 175b39b410

ℹ️ 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".

Comment thread Sources/BarUICore/OverviewEvent.swift Resolved
@GordonBeeming
GordonBeeming merged commit 127cd16 into main Oct 20, 2026
4 checks passed
@GordonBeeming
GordonBeeming deleted the gb/feature/hide-session-resets branch October 20, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants