-
-
Notifications
You must be signed in to change notification settings - Fork 160
home api revamp #1527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
home api revamp #1527
Conversation
WalkthroughHomeResponse was reshaped: removed Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/prism/home/mod.rs`:
- Around line 193-205: The data_ingested flag is incorrectly computed from
all_streams (which can include unauthorized/internal streams); update the
computation to use the already-filtered datasets instead so it reflects only
authorized, non-internal data the user can see. Replace the data_ingested
assignment (used to build Checklist) to check the filtered datasets collection
(e.g., use datasets.is_empty() or datasets.iter().any(|d| !d.internal) depending
on existing dataset filtering) so Checklist.data_ingested correctly reports
visible data; keep the rest of the Checklist construction unchanged and
reference variables Checklist, data_ingested, all_streams, and datasets to
locate the change.
074b507 to
b920693
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/prism/home/mod.rs`:
- Around line 156-173: The current block uses ALERTS.read().await and calls
alerts.get_all_alerts(), which leaks counts for alerts the user may not be
authorized to see; replace the call to get_all_alerts() with the user-scoped
retrieval (e.g., alerts.get_user_alerts(user_id) or
alerts.get_alerts_for_user(...)) using the current request/user context, then
compute alert_created = !user_alerts.is_empty() and triggered_alerts_count by
filtering user_alerts.values() for AlertState::Triggered; keep references to
ALERTS, get_all_alerts() (to locate the spot), AlertState::Triggered, and the
variables alert_created and triggered_alerts_count when making the change.
Summary by CodeRabbit
New Features
Removed
✏️ Tip: You can customize this high-level summary in your review settings.