UX Rescue Phase 1A.1: replace observation popup with in-page workspace - #150
Conversation
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughPhase 1A.1 redirects facility note details into ChangesObservation Workspace rescue
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Facility Workspace
participant Browser URL
participant Observation Workspace
participant Master Detail Layout
Facility Workspace->>Browser URL: Navigate with facilityId, noteId, and source
Browser URL->>Observation Workspace: Load query-driven selection
Observation Workspace->>Master Detail Layout: Render list and detail panes
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 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 |
Reviewer's GuideRe-routes facility workspace note interactions to the Observation Workspace in-page master-detail layout, adds dedicated layout/header components with responsive and accessibility refinements, and documents the Phase 1A.1 corrective behavior and test coverage. Sequence diagram for Facility note redirect to Observation Workspace in-page layoutsequenceDiagram
actor User
participant FacilityWorkspacePage
participant Router
participant ObservationWorkspacePage
participant ObservationMasterDetailLayout
User->>FacilityWorkspacePage: click priority note
FacilityWorkspacePage->>FacilityWorkspacePage: openPanel(next)
FacilityWorkspacePage->>Router: navigate(observationWorkspaceUrl(facilityId, noteId))
Router-->>ObservationWorkspacePage: render /notes/workspace
ObservationWorkspacePage->>ObservationWorkspacePage: selectNote(noteId)
ObservationWorkspacePage->>ObservationMasterDetailLayout: render(listCollapsed, hasSelection, list, detail)
ObservationMasterDetailLayout-->>User: list and detail shown in-page (no dialog)
User->>ObservationWorkspacePage: click "رجوع إلى القائمة"
ObservationWorkspacePage->>ObservationWorkspacePage: closeSelection()
ObservationWorkspacePage->>Router: update URL (remove noteId, keep facilityId/source)
Router-->>User: list-only view preserved with filters
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/frontend/src/pages/notes/ObservationWorkspacePage.tsx`:
- Around line 239-242: Update closeSelection to capture the current
selectedCardRef.current before calling setSelectedId(''), then use that saved
card reference inside the deferred focus callback so the selected element
remains focusable after selection is cleared.
In `@src/frontend/src/pages/notes/workspace/ObservationWorkspaceHeader.tsx`:
- Around line 29-32: Update the canCreate control in ObservationWorkspaceHeader
so the Link to "/notes/new" is styled and behaves as the primary control
directly, removing the nested button while preserving the “ملاحظة جديدة” label
and navigation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: e9952d81-2f37-426a-bbf3-265df60eea5f
📒 Files selected for processing (18)
README.mddocs/ux-rescue/phase1a-observation-architecture.mddocs/ux-rescue/phase1a1-observation-accessibility.mddocs/ux-rescue/phase1a1-observation-completion-report.mddocs/ux-rescue/phase1a1-observation-compliance-ledger.mddocs/ux-rescue/phase1a1-observation-layout.mddocs/ux-rescue/phase1a1-observation-popup-root-cause.mddocs/ux-rescue/phase1a1-observation-responsive-behavior.mddocs/ux-rescue/phase1a1-observation-test-matrix.mddocs/ux-rescue/rescue-roadmap.mddocs/ux-rescue/task-metrics-baseline.mdsrc/frontend/src/index.csssrc/frontend/src/pages/notes/ObservationWorkspacePage.test.tsxsrc/frontend/src/pages/notes/ObservationWorkspacePage.tsxsrc/frontend/src/pages/notes/workspace/ObservationMasterDetailLayout.tsxsrc/frontend/src/pages/notes/workspace/ObservationWorkspaceHeader.tsxsrc/frontend/src/pages/workspaces/FacilityWorkspacePage.test.tsxsrc/frontend/src/pages/workspaces/FacilityWorkspacePage.tsx
|
CodeRabbit follow-up fixed in 1fd0d9a.\n\n- Captured the selected card before clearing note selection, then restore focus through the saved element reference.\n- Replaced the nested button inside the create-note Link with a styled Link control. |
|



Summary
Continues #143
Corrective follow-up to #149
Continues #11
This PR replaces the remaining Observation detail popup path with a true in-page master-detail workspace. The root cause was the Facility Workspace still opening note details through
CommandContextPanel, which renders a nativedialogwith fixed context-panel styling. Observation details now open in/notes/workspacewithfacilityId,noteId, andsource=facility:*preserved in the URL.What changed
/notes/workspace?facilityId=...¬eId=...&source=facility:....panel=note&entityId=...links by redirecting them to the Observation Workspace.Validation
npm ci --ignore-scriptsnpm run typechecknpm run lintnpm run test -- ObservationWorkspacePage.test.tsx FacilityWorkspacePage.test.tsxnpm run testnpm run check:ux-routesVITE_AUTH_MODE=entra ... npm run buildnpm audit --audit-level=highdotnet restore src/backend/Baseera.slnxdotnet build src/backend/Baseera.slnx -c Release --no-restoredotnet test src/backend/tests/Baseera.UnitTests/Baseera.UnitTests.csproj -c Release --no-build --no-restore --logger "console;verbosity=minimal"dotnet test src/backend/tests/Baseera.IntegrationTests/Baseera.IntegrationTests.csproj -c Release --no-build --no-restore --logger "console;verbosity=minimal" --blame-hang --blame-hang-timeout 10mgit diff --checkbash scripts/check-nuget-vulnerabilities.sh src/backend/Baseera.slnxgitleaks detect --source . --config .gitleaks.toml --no-bannerNotes
This PR does not start Phase 1B. It does not remove the Observation Workspace feature flag, delete legacy fallback routes, or merge automatically.
Summary by Sourcery
Route facility workspace note interactions to the in-page Observation Workspace instead of a context dialog, and document and test the updated master-detail layout and behavior.
Bug Fixes:
Enhancements:
Documentation:
Tests:
Summary by CodeRabbit
New Features
Bug Fixes
Documentation