Fix/warnings UI#75
Conversation
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR implements a warning dismissal system with user tracking across the backend and frontend. It adds section-level warning identification to time assignment results, implements dismissal persistence with authenticated user attribution, separates dismissed vs. active warnings in UI, and broadcasts warning changes via WebSocket. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Frontend
participant API as Backend API
participant DB as Database
participant WS as WebSocket Manager
Client->>API: PATCH /schedules/{id}/warnings/{warning_id}/dismiss<br/>(with user context)
API->>API: Verify require_admin authorization
API->>DB: Update warning row<br/>SET dismissed=true, dismissed_by=user_name
DB-->>API: Row updated
API->>WS: broadcast("section_warnings",<br/>{section_id, warnings: []})
WS->>Client: WebSocket message received
Client->>Client: Update scheduleDataStore<br/>with new warning state
Client->>Client: Re-render SectionMutationDrawer<br/>(move to dismissed set)
API-->>Client: 200 OK (WarningResponse with dismissed_by)
Note over Client,WS: Restore flow is similar,<br/>setting dismissed=false, dismissed_by=null
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 3❌ Failed checks (1 warning, 2 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Description
Update warning UI to include dismissal, and removal of warnings on section update
Type of Change
What Changed?
Testing & Validation
How this was tested
Screenshots/Recordings
Unfinished Work & Known Issues
Notes & Nuances
Reviewer Notes
Summary by CodeRabbit
New Features
Improvements