Show seeded operator work under portal broker auth
Status: in progress
Tags: bug, portal, work-engine, frontend, backend, P0
Depends on: None
Blocks: V1 production cutover confidence (#71)
Scope
When Work Engine runs behind the docs portal broker, /api/me may identify the browser session as the synthetic portal-admin user. V1 seeded recurring tasks and notifications are assigned to real operator users. The Operations Home must not hide that production work just because the broker actor is synthetic.
This issue changes only the Work Engine portal-facing behavior:
- Dashboard user picker and assigned-to-me behavior in
work-engine/src/public/app.js.
- Notification route scoping in
work-engine/src/router.ts.
- Regression tests for the dashboard source behavior and portal-auth notification route.
Acceptance Criteria
Test Scenarios
Scenario: Portal broker user is synthetic
Given: /api/me returns portal-admin and /api/users does not include portal-admin.
When: The operator opens Operations Home.
Then: The dashboard falls back to All operators, disables assigned-to-me filtering, and shows operator-assigned and unassigned daily work.
Scenario: Portal broker notification read
Given: An undismissed notification exists for a real operator user.
When: A trusted portal broker request calls GET /api/notifications with x-user-id: portal-admin.
Then: The notification appears in the response.
Scenario: Real user notification read
Given: Notifications exist for multiple real users and global notifications.
When: A real authenticated user calls GET /api/notifications.
Then: Existing filtering behavior still returns global plus matching-user notifications only.
Required Verification
NODE_ENV=test SKIP_AUTH=true node --import tsx --test tests/home-dashboard.test.ts tests/portal-auth.test.ts
npm --prefix work-engine run typecheck
- After push, On-Call verifies the latest
main workflows are green and production /work/api/notifications returns the generated recurring notifications under portal auth.
Out of Scope
- Changing seeded users or recurring task ownership.
- Replacing portal broker auth with real per-operator login.
- Migrating notification storage or task assignment model.
Show seeded operator work under portal broker auth
Status: in progress
Tags:
bug,portal,work-engine,frontend,backend,P0Depends on: None
Blocks: V1 production cutover confidence (#71)
Scope
When Work Engine runs behind the docs portal broker,
/api/memay identify the browser session as the syntheticportal-adminuser. V1 seeded recurring tasks and notifications are assigned to real operator users. The Operations Home must not hide that production work just because the broker actor is synthetic.This issue changes only the Work Engine portal-facing behavior:
work-engine/src/public/app.js.work-engine/src/router.ts.Acceptance Criteria
All operatorsoption.GET /api/notificationswithx-user-id: portal-adminare treated as unscoped notification reads, so operator-assigned notifications remain visible.Test Scenarios
Scenario: Portal broker user is synthetic
Given:
/api/mereturnsportal-adminand/api/usersdoes not includeportal-admin.When: The operator opens Operations Home.
Then: The dashboard falls back to
All operators, disables assigned-to-me filtering, and shows operator-assigned and unassigned daily work.Scenario: Portal broker notification read
Given: An undismissed notification exists for a real operator user.
When: A trusted portal broker request calls
GET /api/notificationswithx-user-id: portal-admin.Then: The notification appears in the response.
Scenario: Real user notification read
Given: Notifications exist for multiple real users and global notifications.
When: A real authenticated user calls
GET /api/notifications.Then: Existing filtering behavior still returns global plus matching-user notifications only.
Required Verification
NODE_ENV=test SKIP_AUTH=true node --import tsx --test tests/home-dashboard.test.ts tests/portal-auth.test.tsnpm --prefix work-engine run typecheckmainworkflows are green and production/work/api/notificationsreturns the generated recurring notifications under portal auth.Out of Scope