Skip to content

UX Rescue Phase 0: product-wide audit, target IA, and rescue roadmap - #148

Merged
henter36 merged 2 commits into
mainfrom
ux-rescue-phase0-product-audit
Jul 28, 2026
Merged

UX Rescue Phase 0: product-wide audit, target IA, and rescue roadmap#148
henter36 merged 2 commits into
mainfrom
ux-rescue-phase0-product-audit

Conversation

@henter36

@henter36 henter36 commented Jul 27, 2026

Copy link
Copy Markdown
Owner

ملخص

مرحلة صفر من UX Rescue: دراسة تنفيذية معمارية كاملة لتجربة المستخدم عبر التطبيق بأكمله — لا تنفيذ جزئي للتصميم الجديد، ولا تغييرات وظيفية أو في Domain/قاعدة البيانات/عقود API.

  • جرد كامل لكل الـ62 Route الفعلية في App.tsx مع قرار واضح لكل واحد (Keep/Polish/Restructure/Merge/Replace/Advanced fallback/Remove)، بما في ذلك اكتشاف Routes ميتة، مكوّن يتيم (NotesListPage.tsx)، وخلل وظيفي حقيقي (تعديل حملة نشر يتجاهل معرّفها تمامًا).
  • جرد أنماط المكونات والتفاعل، 19 دورًا تشغيليًا حقيقيًا، رحلات المستخدم الحالية، نموذج السياق التنظيمي المستهدف، 30 نقطة احتكاك موثَّقة بالسبب الجذري.
  • تحليلات فجوة لكل من الملاحظات ومنشئ النماذج وتشغيل النماذج، تنتهي كل منها بـTarget Flow تنفيذي محدَّد.
  • تدقيق بقية الشاشات، بنية معلومات مستهدفة، أنماط تفاعل ملزمة، Baseline قياس، خطة انتقال Routes، وخطة إنقاذ تنفيذية مرحلية.
  • أداة تدقيق آلية (scripts/ux-route-inventory-check.mjs) تتحقق من تطابق الجرد مع الكود الفعلي.
  • تحديث Issues [UX Rescue] Rebuild the Observation Workspace as a true single-place operational workflow #143-[UX Rescue] Review and restructure remaining operational screens beyond notes and forms #146 بالتفاصيل التنفيذية المطلوبة لكل منها.

Test plan

  • dotnet build src/backend/Baseera.slnx -c Release — نجح
  • dotnet test .../Baseera.UnitTests — 932/932 نجح
  • npm run typecheck / npm run lint — نظيف
  • npm run test — 283/283 نجح
  • npm run build — نجح
  • npm audit --audit-level=high — 0 ثغرات
  • bash scripts/check-nuget-vulnerabilities.sh — 0 ثغرات
  • gitleaks detect — لا تسريبات
  • node src/frontend/scripts/ux-route-inventory-check.mjs — نجح (62 route متطابق تمامًا)
  • git diff --check — نظيف

Closes #142
Prepares #143, #144, #145 and #146
Related to #11, #12, #13 and #21

🤖 Generated with Claude Code

Summary by Sourcery

Document and formalize a product-wide UX audit and rescue roadmap, including route inventory tooling and personas, without changing runtime behavior.

Enhancements:

  • Add a Node.js script to automatically verify that documented screen and route inventory stays in sync with App.tsx routes, sidebar NavLinks, and Facility workspace panel types.
  • Expose the new UX route inventory check as an npm script for the frontend workspace.

Documentation:

  • Add comprehensive UX Rescue Phase 0 documentation covering personas, current user journeys, interaction patterns, target information architecture, workspace scope model, gap analyses for notes, form designer, and form operations, remaining screens audit, friction register, task metrics baseline, and an execution roadmap.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive Arabic UX Rescue documentation covering user journeys, personas, interaction patterns, screen and route inventories, friction points, workspace design, and target information architecture.
    • Documented gap analyses for observation workflows, form design, and form operations.
    • Added a phased migration roadmap, route transition plan, remaining-screen audit, and measurable UX baseline.
  • Chores
    • Added an automated check to validate route documentation and navigation consistency.

Phase 0 of the UX Rescue initiative — a full audit of every actual route,
component, and interaction pattern in the frontend (grounded in App.tsx's
62 declared routes, backend contracts affecting UX, and 5 parallel deep-dive
investigations), producing:

- Full screen/route inventory with a Keep/Polish/Restructure/Merge/Replace/
  Advanced-fallback/Remove decision for every route, including confirmed dead
  routes, an orphaned page, and a real functional bug (campaign edit ignores
  its own route param).
- Component/interaction pattern inventory identifying the near-total absence
  of a shared component library and the underused WorkspaceShell primitive.
- 19 role-based personas grounded in actual permission codes and scopes.
- Current journey maps for Notes, Form Designer, Form Operations, Facility
  Workspace, and other domains with measured (not guessed) screen/navigation
  counts.
- Facility/Region/Headquarters scope and context model, documenting that the
  backend workspace framework already supports Region/Headquarters levels.
- 30 root-caused friction points.
- Gap analyses for Observation Workspace, Form Designer, and Form Operations,
  each ending in a concrete target flow feeding issues #143-#145.
- Remaining-screens disposition matrix feeding #146.
- Target information architecture, binding interaction patterns, a
  measurable metrics baseline, and a route migration/transition plan.
- An executable rescue roadmap, re-ordering Region/Headquarters Workspace
  earlier than originally proposed since their architectural foundation
  already exists and those two personas are currently unserved by any
  working UI.
- scripts/ux-route-inventory-check.mjs: a lightweight, non-fragile check
  (plain regex over App.tsx's static route declarations, not a dynamic
  router parser) verifying every route has a documented decision and every
  sidebar nav link resolves to a real route.

No functional, domain, database, or API contract changes in this phase.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@sourcery-ai sourcery-ai 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.

Sorry @henter36, your pull request is larger than the review limit of 150000 diff characters

@henter36

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 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.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@henter36, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 24 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8c7a37b0-85fb-4821-8f5d-1438024a2e54

📥 Commits

Reviewing files that changed from the base of the PR and between 129d1cc and 24a610f.

📒 Files selected for processing (13)
  • docs/ux-rescue/component-and-interaction-inventory.md
  • docs/ux-rescue/current-user-journeys.md
  • docs/ux-rescue/form-designer-gap-analysis.md
  • docs/ux-rescue/friction-register.md
  • docs/ux-rescue/migration-and-route-transition-plan.md
  • docs/ux-rescue/personas-and-jobs-to-be-done.md
  • docs/ux-rescue/remaining-screens-audit.md
  • docs/ux-rescue/rescue-roadmap.md
  • docs/ux-rescue/screen-and-route-inventory.md
  • docs/ux-rescue/target-information-architecture.md
  • docs/ux-rescue/task-metrics-baseline.md
  • docs/ux-rescue/workspace-scope-and-context-model.md
  • src/frontend/scripts/ux-route-inventory-check.mjs
📝 Walkthrough

Walkthrough

Adds a comprehensive Arabic UX Rescue Phase 0 documentation set covering current journeys, UI patterns, personas, friction, target architecture, domain gaps, route migration, and phased execution. It also adds automated route and context-panel inventory validation.

Changes

UX Rescue audit

Layer / File(s) Summary
Current experience evidence
docs/ux-rescue/component-and-interaction-inventory.md, docs/ux-rescue/current-user-journeys.md, docs/ux-rescue/personas-and-jobs-to-be-done.md, docs/ux-rescue/friction-register.md, docs/ux-rescue/task-metrics-baseline.md
Documents duplicated UI patterns, user journeys, role responsibilities, 30 friction points, and baseline metrics for key workflows.
Target information architecture and interaction model
docs/ux-rescue/target-information-architecture.md, docs/ux-rescue/interaction-patterns.md, docs/ux-rescue/workspace-scope-and-context-model.md
Defines target workspace navigation, interaction patterns, scope inheritance, URL state, and context-preservation rules.
Domain gap analyses and screen disposition
docs/ux-rescue/observation-workspace-gap-analysis.md, docs/ux-rescue/form-designer-gap-analysis.md, docs/ux-rescue/form-operations-gap-analysis.md, docs/ux-rescue/remaining-screens-audit.md
Analyzes Observation, Form Designer, and Form Operations gaps and assigns handling decisions to remaining screens.
Route transition and rescue roadmap
docs/ux-rescue/migration-and-route-transition-plan.md, docs/ux-rescue/rescue-roadmap.md
Defines route transition, rollout, compatibility, rollback, and execution phases 0–8.
Route inventory and automated consistency checks
docs/ux-rescue/screen-and-route-inventory.md, src/frontend/package.json, src/frontend/scripts/ux-route-inventory-check.mjs
Inventories routes and context panels and adds check:ux-routes validation for route declarations, navigation targets, documentation, and panel types.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

Possibly related PRs

  • henter36/Baseera#123 — Changes to FacilityWorkspacePage.tsx are directly covered by the new context-panel inventory validation.
  • henter36/Baseera#122 — The route inventory and validator cover routes and workspace wiring introduced by this facility-operations work.
  • henter36/Baseera#132 — The added resources route is part of the App.tsx route set checked against the inventory.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the Phase 0 UX rescue audit, target IA, and roadmap added in this PR.
Linked Issues check ✅ Passed The PR covers the requested audit, journey mapping, route inventory, friction register, target IA, and roadmap for #142.
Out of Scope Changes check ✅ Passed The changes stay within documentation and a supporting validation script for the UX rescue audit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ux-rescue-phase0-product-audit

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.

@sourcery-ai

sourcery-ai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Reviewer's Guide

Documents and codifies a comprehensive UX audit ("UX Rescue" Phase 0) of the frontend, including personas, route/screen inventory, gap analyses, target IA and roadmap, and adds a small automation script and npm task to keep the documented route inventory in sync with App.tsx and FacilityWorkspacePage.tsx.

File-Level Changes

Change Details Files
Add an automated UX route inventory consistency check and wire it into frontend tooling.
  • Create scripts/ux-route-inventory-check.mjs to parse App.tsx and FacilityWorkspacePage.tsx, compare all paths and sidebar NavLinks against the documented inventory in docs/ux-rescue/screen-and-route-inventory.md, and enforce an allowlist of FacilityWorkspace context panel types.
  • Validate there are no duplicate Route paths in App.tsx, that every code route is documented in the main inventory table and vice versa, that the "confirmed dead routes" section exists, that all NavLink targets resolve to declared routes, and that any new panel.type values are explicitly added to both the script allowlist and the doc table.
  • Exit with non‑zero status on any mismatch so CI can catch drift, while printing a short summary of route/nav/panel counts and using warnings for non-fatal issues like missing panel.type matches.
src/frontend/scripts/ux-route-inventory-check.mjs
Expose the UX route inventory check as an npm script for easy local/CI execution.
  • Add a new npm script "check:ux-routes" that runs node scripts/ux-route-inventory-check.mjs alongside the existing check:prod-auth script.
src/frontend/package.json
Introduce a full UX Rescue documentation set capturing personas, route inventory, gap analyses, IA, and an execution roadmap for future phases. docs/ux-rescue/personas-and-jobs-to-be-done.md
docs/ux-rescue/screen-and-route-inventory.md
docs/ux-rescue/component-and-interaction-inventory.md
docs/ux-rescue/remaining-screens-audit.md
docs/ux-rescue/current-user-journeys.md
docs/ux-rescue/form-designer-gap-analysis.md
docs/ux-rescue/observation-workspace-gap-analysis.md
docs/ux-rescue/form-operations-gap-analysis.md
docs/ux-rescue/task-metrics-baseline.md
docs/ux-rescue/friction-register.md
docs/ux-rescue/target-information-architecture.md
docs/ux-rescue/migration-and-route-transition-plan.md
docs/ux-rescue/workspace-scope-and-context-model.md
docs/ux-rescue/interaction-patterns.md
docs/ux-rescue/rescue-roadmap.md

Assessment against linked issues

Issue Objective Addressed Explanation
#142 Conduct and document a product-wide UX audit and inventories (routes/screens, components, interactions, user journeys, friction points) under docs/ux-rescue, as required by the issue.
#142 Define a target information architecture, workspace/context model, and unified interaction patterns, and capture them in executable documentation (IA, patterns, workspace scope) and an implementation-ready rescue roadmap with phased execution linked to the main problem domains.
#142 Establish an actionable transition/migration plan and supporting tooling, including a route/screen transition strategy, measurable before/after metrics, and automation to keep the UX route inventory in sync with the actual code, while preparing or updating implementation issues (#143#146 and related).

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai coderabbitai 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.

Actionable comments posted: 17

🧹 Nitpick comments (2)
docs/ux-rescue/migration-and-route-transition-plan.md (1)

64-64: 🔒 Security & Privacy | 🔵 Trivial

Use dedicated route telemetry instead of AuditLog by default.

Page-route usage is not necessarily an auditable business action. Prefer access metrics or dedicated telemetry with explicit retention, sampling, and user-identifier handling; use AuditLog only if its schema and compliance policy explicitly support this workload.

🤖 Prompt for 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.

In `@docs/ux-rescue/migration-and-route-transition-plan.md` at line 64, Update the
migration requirement to prioritize dedicated route-access telemetry or metrics,
including explicit retention, sampling, and user-identifier handling. Treat
AuditLog as a fallback only when its schema and compliance policy explicitly
support route-usage tracking.
docs/ux-rescue/observation-workspace-gap-analysis.md (1)

57-63: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Make the baseline metrics reproducible.

Add the measured persona/journey, counting rules (for example, whether panels count as screens and redirects count as route changes), and the source or sample behind 4-5, 6-8, and ≤ 2. Without that metadata, the targets cannot be validated consistently in task-metrics-baseline.md.

🤖 Prompt for 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.

In `@docs/ux-rescue/observation-workspace-gap-analysis.md` around lines 57 - 63,
Expand the measurement section around the metrics table with the measured
persona and journey, explicit counting rules for screens, panels, and route
changes or redirects, and the source or sample supporting the current values 4-5
and 6-8 and the target ≤ 2. Keep the existing metrics and targets unchanged
while making their measurement reproducible for task-metrics-baseline.md.
🤖 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 `@docs/ux-rescue/component-and-interaction-inventory.md`:
- Line 5: Update the shared-library description to state that listPageUtils.ts
contains four functions, matching the four listed symbols formatListDate,
listSortIndicator, nextListSortState, and listQueryErrorMessage. Apply this
correction in docs/ux-rescue/component-and-interaction-inventory.md line 5 and
docs/ux-rescue/friction-register.md line 18; no other content changes are
needed.

In `@docs/ux-rescue/current-user-journeys.md`:
- Line 12: Update the “إنشاء ونشر حملة نموذج” row in current-user-journeys.md so
its action count and detailed flow consistently include both creation and
publishing, or rename the row and scope description to creation only; keep the
journey metrics and stated scope aligned.

In `@docs/ux-rescue/form-designer-gap-analysis.md`:
- Around line 8-10: Reconcile the route and screen-count summaries across the
three specified documents, explicitly defining whether each total counts route
visits, unique routes, screens, or route families. In
docs/ux-rescue/form-designer-gap-analysis.md lines 8-10, change the summary to
count all seven listed stages as distinct routes; in
docs/ux-rescue/target-information-architecture.md lines 75-78, align “around 12”
with the listed note/corrective-action and nine form-operation routes; and in
docs/ux-rescue/remaining-screens-audit.md lines 73-82, include
NotificationsPage, FormCompliancePage, the four escalation settings pages, and
EscalationOccurrencesPage while labeling the counting unit.

In `@docs/ux-rescue/migration-and-route-transition-plan.md`:
- Line 28: Update the redirect guidance in the migration plan to describe
<Navigate> as an in-app client-side redirect rather than an HTTP 301/302
response. Separately document that server/CDN configuration is required when
actual HTTP redirect status semantics are needed, while preserving the
requirement that legacy links remain usable.
- Around line 29-30: Update the route resolution and redirect targets for merged
routes such as `/notes/:id` and `/corrective-actions/:id` so rollback resolves
deep links to the legacy page rather than merely hiding Workspace navigation.
Keep the legacy route components registered and available until rollback support
is removed, while preserving the Workspace Panel/Split View target when rollback
is inactive.

In `@docs/ux-rescue/personas-and-jobs-to-be-done.md`:
- Line 267: Correct the malformed WorkspaceShell reference in the documentation
by replacing the stray E-prefixed backtick text with the properly formatted
`WorkspaceShell` reference, leaving the surrounding content unchanged.

In `@docs/ux-rescue/remaining-screens-audit.md`:
- Line 56: Remove the proposed Region-row link to `/facilities?regionId=` from
the RegionsPage audit entry until region filtering is implemented; retain the
note that the current facilities flow in FacilitiesPage calls
`api.facilities(undefined, search)` and cannot preserve a selected region.

In `@docs/ux-rescue/rescue-roadmap.md`:
- Line 5: Update docs/ux-rescue/rescue-roadmap.md lines 5-5 to describe existing
Region/Headquarters infrastructure as reusable foundations, not as evidence that
implementation is limited to a WorkspaceDefinitionProvider and page. Update
lines 104-104 to include Region aggregation, widget-provider implementation,
dependency-injection registration, drill-down behavior, and associated tests;
apply the same scope correction to Headquarters on lines 118-118.
- Around line 81-86: حدّث قسم «حدود الـPR» ومعايير القبول وخطة
المخاطر/الاختبارات في خارطة الطريق لتوضيح أن اعتماد MasterDetailWorkspaceLayout
قد يغيّر سلوك التنقل على الهاتف، بما في ذلك إجراء الرجوع، أو احذف هذا الاعتماد
للحفاظ على نطاق إعادة الهيكلة فقط. اجعل معايير القبول وخطة الانحدار تغطي سلوك
التنقل الجديد صراحةً إذا أبقيت التغيير.

In `@docs/ux-rescue/screen-and-route-inventory.md`:
- Line 124: Update the documented checker command in the route inventory
documentation to invoke the JavaScript script with Node instead of Bash, using
node src/frontend/scripts/ux-route-inventory-check.mjs or the existing npm run
check:ux-routes command.

In `@docs/ux-rescue/target-information-architecture.md`:
- Around line 53-66: The target architecture document must define compatibility
behavior for merged routes: specify legacy-to-canonical redirects and
deprecation handling for /notes and the merged form/campaign routes, including
the destination for /form-campaigns/:campaignId/edit. Clarify whether
/form-compliance/* remains independently routable or is only embedded in Form
Operations Workspace, and document these outcomes alongside the route mappings.
- Around line 15-25: عدّل عنوان قسم "الفرق بين الأنواع الخمسة" ليتوافق مع فئات
الجدول السبع الحالية، أو أعد هيكلة الجدول إلى خمس فئات واضحة؛ احرص على أن يعكس
العنوان والتصنيف النهائيان نفس عدد الأنواع وأن تبقى جميع الفئات المذكورة قابلة
للاستخدام في قرارات التنفيذ.

In `@docs/ux-rescue/task-metrics-baseline.md`:
- Line 13: Correct the “عدد مرات فقدان الفلاتر عبر الرحلة” metric so it matches
the evidence that filters are restored correctly: set the confirmed count to
zero. Keep the existing list-position loss observation separate rather than
counting it as filter loss.
- Line 31: Update the “عدد مرات فقد البيانات المحتملة (نافذة تعرّض)” metric to
avoid presenting 800ms as the complete exposure window: either rename it to
explicitly describe autosave/retry latency, or redefine it to include pending or
failed writes and navigation while dirty or in error/conflict states. Ensure the
baseline and target values use the same clarified metric.

In `@docs/ux-rescue/workspace-scope-and-context-model.md`:
- Around line 60-65: Update the documented creation-form contract so the server
derives or validates facilityId from the authorized WorkspaceContext or route
context, never trusting a client-controlled hidden field as the scope source.
Treat any client field only as presentation state, and preserve the same
requirement for future embedded creation forms.

In `@src/frontend/scripts/ux-route-inventory-check.mjs`:
- Around line 101-130: Update the ux-route inventory check to derive known panel
types by parsing the authoritative PANEL_TYPES declaration in
FacilityWorkspacePage.tsx instead of maintaining the divergent KNOWN_PANEL_TYPES
set. Reconcile the extracted declaration with documented panel types, while
preserving the existing use-site scanning and ensuring newly declared types and
inventory entries are validated.
- Around line 74-77: Update the dead-route validation around deadRoutesSection
to parse the section’s route rows instead of only checking for the heading.
Require at least one listed dead route, then verify every entry matches a
declared route and has a “Remove/redirect” disposition, failing validation for
missing, undeclared, or incorrectly classified entries.

---

Nitpick comments:
In `@docs/ux-rescue/migration-and-route-transition-plan.md`:
- Line 64: Update the migration requirement to prioritize dedicated route-access
telemetry or metrics, including explicit retention, sampling, and
user-identifier handling. Treat AuditLog as a fallback only when its schema and
compliance policy explicitly support route-usage tracking.

In `@docs/ux-rescue/observation-workspace-gap-analysis.md`:
- Around line 57-63: Expand the measurement section around the metrics table
with the measured persona and journey, explicit counting rules for screens,
panels, and route changes or redirects, and the source or sample supporting the
current values 4-5 and 6-8 and the target ≤ 2. Keep the existing metrics and
targets unchanged while making their measurement reproducible for
task-metrics-baseline.md.
🪄 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: e41f1040-ee74-4a49-9284-b398ee23f105

📥 Commits

Reviewing files that changed from the base of the PR and between 3edbcc2 and 129d1cc.

📒 Files selected for processing (17)
  • docs/ux-rescue/component-and-interaction-inventory.md
  • docs/ux-rescue/current-user-journeys.md
  • docs/ux-rescue/form-designer-gap-analysis.md
  • docs/ux-rescue/form-operations-gap-analysis.md
  • docs/ux-rescue/friction-register.md
  • docs/ux-rescue/interaction-patterns.md
  • docs/ux-rescue/migration-and-route-transition-plan.md
  • docs/ux-rescue/observation-workspace-gap-analysis.md
  • docs/ux-rescue/personas-and-jobs-to-be-done.md
  • docs/ux-rescue/remaining-screens-audit.md
  • docs/ux-rescue/rescue-roadmap.md
  • docs/ux-rescue/screen-and-route-inventory.md
  • docs/ux-rescue/target-information-architecture.md
  • docs/ux-rescue/task-metrics-baseline.md
  • docs/ux-rescue/workspace-scope-and-context-model.md
  • src/frontend/package.json
  • src/frontend/scripts/ux-route-inventory-check.mjs

Comment thread docs/ux-rescue/component-and-interaction-inventory.md Outdated
Comment thread docs/ux-rescue/current-user-journeys.md Outdated
Comment thread docs/ux-rescue/form-designer-gap-analysis.md Outdated
Comment thread docs/ux-rescue/migration-and-route-transition-plan.md Outdated
Comment thread docs/ux-rescue/migration-and-route-transition-plan.md Outdated
Comment thread docs/ux-rescue/task-metrics-baseline.md Outdated
Comment thread docs/ux-rescue/task-metrics-baseline.md Outdated
Comment thread docs/ux-rescue/workspace-scope-and-context-model.md
Comment thread src/frontend/scripts/ux-route-inventory-check.mjs Outdated
Comment thread src/frontend/scripts/ux-route-inventory-check.mjs Outdated
Fixes 17 findings from the first review pass on PR #148, all verified against
actual code before changing anything:

- ux-route-inventory-check.mjs: derive known Context Panel types from
  FacilityWorkspacePage.tsx's own PANEL_TYPES declaration (33 types) instead
  of a hand-maintained allowlist that had already drifted (missing 13 real
  types, including 8 sensitive-custody sub-entities); make the dead-routes
  check actually parse and validate route rows instead of only checking that
  the section heading exists.
- screen-and-route-inventory.md: correct the Context Panel table to reflect
  the full 33-type PANEL_TYPES union grouped by domain (previously only 15
  types found via narrower call-site patterns); fix "bash ...mjs" to "node
  ...mjs" in the verification command; add a missing route row
  (/form-campaigns/:campaignId) the checker caught during this same pass.
- Arithmetic/wording corrections: listPageUtils.ts has 4 functions not 3
  (component-and-interaction-inventory.md, friction-register.md); form
  designer's 7 journey stages are 7 distinct routes not 6
  (form-designer-gap-analysis.md, current-user-journeys.md,
  task-metrics-baseline.md); campaign journey row now counts both create and
  publish; reconciled route-merge totals and disambiguated "screen" vs
  "route" as counting units (target-information-architecture.md,
  remaining-screens-audit.md); split "filter loss" from "list-position loss"
  since the parenthetical already said filters restore correctly
  (task-metrics-baseline.md); reframed the 800ms autosave figure as retry
  latency, not the only data-loss exposure window.
- Correctness fixes: <Navigate> is a client-side redirect, not an HTTP
  301/302 response; rollback must operate at the route resolver level, not
  just by hiding a nav link, since deep links/notifications would otherwise
  keep resolving to the new experience (migration-and-route-transition-plan.md,
  target-information-architecture.md); qualified Region/Headquarters backend
  scope to include widget providers, DI registration, and aggregation logic,
  not just a WorkspaceDefinitionProvider (rescue-roadmap.md); separated the
  Facility Workspace closeout phase's header-only refactor from the
  behavior-changing MasterDetailWorkspaceLayout adoption (mobile back button)
  it had been bundled with under a "refactor-only" claim; removed an
  unworkable /facilities?regionId= link suggestion since FacilitiesPage
  ignores region filters today; corrected a hidden-field description to
  state plainly that client-supplied values are never authoritative for
  scope, regardless of their initial source (workspace-scope-and-context-model.md);
  fixed a malformed `WorkspaceShell` reference typo (personas-and-jobs-to-be-done.md).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@henter36

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 27, 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.

@sonarqubecloud

Copy link
Copy Markdown

@henter36
henter36 merged commit a4110cb into main Jul 28, 2026
11 checks passed
@henter36
henter36 deleted the ux-rescue-phase0-product-audit branch July 28, 2026 01:43
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.

[UX Rescue] Product-wide UX audit, information architecture and rescue roadmap

1 participant