Skip to content

Assignment SSE invalidates the wrong React Query key; My Patients never live-refreshes #59

Description

@manjula25

Summary

The SSE subscription for live task-assignment events invalidates ['assigned-panel'], but the coordinator's actual grid uses ['assigned-panel-grid'] — so "My Patients" never live-refreshes on new assignments.

Evidence

  • apps/web/src/components/AppShell.tsx:29 invalidates ['assigned-panel'].
  • apps/web/src/pages/coordinator/MyPatients.tsx:117 uses ['assigned-panel-grid'].
  • ['assigned-panel'] belongs only to the orphaned, director-only PatientPanel.tsx.

Impact

When a task is assigned to the logged-in coordinator, they get the toast but their landing page (/coordinator, per roleHome) doesn't refetch — exactly the cross-surface live sync this subscription exists to provide.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions