Skip to content

feat(layout): scheduling SignalR client, topbar notification panel, batch queued copy#136

Open
noamarg wants to merge 7 commits into
mainfrom
feature/noamarg/100/notification-menu
Open

feat(layout): scheduling SignalR client, topbar notification panel, batch queued copy#136
noamarg wants to merge 7 commits into
mainfrom
feature/noamarg/100/notification-menu

Conversation

@noamarg
Copy link
Copy Markdown
Contributor

@noamarg noamarg commented May 12, 2026

Summary

Connects the dashboard to /hubs/scheduling, maintains a session-scoped scheduling alert list in the top bar, surfaces toasts on completion, and updates batch-submit copy for async processing.

Implementation overview

Piece Role
scheduling-hub.ts Build URL, bearer accessTokenFactory, start(), SchedulingCompleted.
scheduling-alerts.store.ts Zustand list + add / remove / clear.
topbar-notification-panel.tsx Bell + menu UI.
dashboard-layout.tsx useEffect lifecycle: subscribe + cleanup conn.stop().
Resources JSON Batch “queued” messaging.

Payload handling

  • TypeScript interface should mirror API payload: requestId, success, assignmentsCreated, assignmentsModified, unscheduledActivityIds, failureReason.
  • Build a short human-readable summary string for toast + list.

Testing (manual)

  1. Run API + Engine + RabbitMQ + portal; log in.
  2. Trigger batch scheduling; wait for engine; confirm toast + topbar entry.
  3. Trigger constraint change that runs online matching; confirm same path if initiator is set server-side.
  4. Confirm no console CORS errors (API CORS must allow portal origin with credentials).

Risk

Medium. New long-lived connection per dashboard session; token refresh edge cases: if token rotates without reconnect, hub may need restart (future improvement). useEffect dependency array deliberately minimal—document if token refresh should trigger reconnect.

Files in this PR (only)

  • Chronos.WebApplication/src/infra/theme/layouts/dashboard-layout/scheduling-hub.ts
  • Chronos.WebApplication/src/infra/theme/layouts/dashboard-layout/scheduling-alerts.store.ts
  • Chronos.WebApplication/src/infra/theme/layouts/dashboard-layout/topbar-notification-panel.tsx
  • Chronos.WebApplication/src/infra/theme/layouts/dashboard-layout/dashboard-layout.tsx
  • Chronos.WebApplication/src/modules/schedule/src/pages/scheduling-periods-page/scheduling-periods-page.resources.json

@noamarg noamarg self-assigned this May 12, 2026
@noamarg noamarg added the enhancement New feature or request label May 12, 2026
Copy link
Copy Markdown
Member

@aaron-iz aaron-iz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@noamarg noamarg requested a review from aaron-iz May 12, 2026 11:42
return <Outlet />;
return (
<>
<SchedulingHubConnector />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should not be here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this?

@noamarg noamarg requested a review from aaron-iz May 18, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants