Repository navigation
feat(admin): views are recorded once an hour and hidden from event lists unless asked for - #350
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 9 minutes. View limit details
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. |
PiquelChips
force-pushed
the
feat/hourly-account-views
branch
4 times, most recently
from
November 4, 2026 21:52
46d88e9 to
eaf05fd
Compare
…listed only when asked for Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PiquelChips
force-pushed
the
feat/hourly-account-views
branch
from
November 4, 2026 22:06
eaf05fd to
87e85b9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every reload of an account's pages recorded another "Account details viewed", so a single investigation buried the account's real changes under a dozen identical rows in the admin dashboard's event lists. The views are worth keeping, since they're the only record of who read whose data, but one per sitting is enough.
Operator::record_viewreplaces the three places that recorded views. It skips the write when the same administrator, in the same dashboard session, already viewed the account within the hour; for the CLI, "same" means the same operator user and host. This also removes theOnceCellthatViewerused to record one view per page.audit listgained--views, and filtering by the kindaccount_viewedstill lists them.Follows #346, which took views out of the owner's own history.
Proved after rebasing onto main with the auth-service and repository database tests on a scratch cluster (342/342 pass), an up-to-date SQLx cache and clean clippy. Two new tests cover it: a reload records no second view while another administrator records their own, and the events list includes views only when asked. A new browser test in
admin.spec.tsshows and hides an account's views from the events page; it passes against a preview of this branch, as do the other dashboard tests the preview can run.Reviewed with review-loop: 2 rounds with 2× gpt-6.1-sol and claude-opus-5-5. Verdict: approved
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)
🤖 Generated with Claude Code