fix(workflows): sync sidebar after external mutations - #7354
fix(workflows): sync sidebar after external mutations#7354BillLeoutsakosvl346 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryAdds workspace-scoped realtime invalidation so workflow and workflow-folder lists refresh after external mutations and reconnects.
Confidence Score: 5/5The PR appears safe to merge; the new workflow-list invalidation path is consistently scoped, authorized, and connected across mutation, relay, room, and client-cache boundaries. No concrete changed-code-triggered failure remains after checking notification timing, room contract alignment, authorization and revocation behavior, reconnect recovery, and the separation between per-workflow editor events and workspace-list invalidation.
|
| Filename | Overview |
|---|---|
| packages/realtime-protocol/src/rooms.ts | Adds the shared workspace-workflows room token while preserving typed room naming and parsing. |
| packages/platform-authz/src/rooms.ts | Resolves the new room directly to its workspace so existing room authorization and revalidation apply. |
| apps/realtime/src/routes/http.ts | Adds the authenticated internal workflow-tree invalidation relay and emits the expected workspace-scoped event. |
| apps/sim/app/workspace/[workspaceId]/hooks/use-workspace-invalidation-room.ts | Adds catch-up invalidation after each successful room join or rejoin across shared invalidation rooms. |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/hooks/use-workspace-workflows-room.ts | Binds workflow-room events to active, archived, and all workflow lists plus workflow-folder caches. |
| apps/sim/lib/realtime/notify.ts | Adds best-effort workspace workflow notification routing and integrates workflow folders with it. |
| apps/sim/lib/workflows/application/workflow-vfs.ts | Consolidates workspace-list notification at successful VFS mutation boundaries while retaining per-workflow editor notifications where needed. |
| apps/sim/lib/workflows/deployment-outbox.ts | Adds checkpointed workspace-list notification to deployment post-activation side effects. |
Sequence Diagram
sequenceDiagram
participant M as Workflow mutation path
participant A as Sim application
participant R as Realtime service
participant C as Workspace sidebar
participant Q as Durable query API
M->>A: Commit workflow-tree mutation
A->>R: POST workspace-workflows-changed
R-->>C: Broadcast workspace-workflows-changed
C->>C: Invalidate workflow, selector, and folder caches
C->>Q: Refetch workspace lists
Q-->>C: Return current durable state
Note over C,R: Successful join or rejoin triggers the same catch-up invalidation
Reviews (1): Last reviewed commit: "fix(workflows): sync sidebar after exter..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed across 53 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Fix all with cubic | Re-trigger cubic
There was a problem hiding this comment.
No issues found across 54 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Re-trigger cubic
4624fc3 to
00be125
Compare
|
superseded by #7356 |



Summary
Adds workspace-scoped realtime invalidation for workflow and workflow-folder lists so sidebar state updates after CLI/API mutations without a reload.
workspace-workflows:{workspaceId}room, read-permission authorization, and internal relay endpoint.workspace-workflows-changed.Report: Slack
Type of Change
Testing
bun run type-check— 26/26 tasks passed.bun run lint:check— 26/26 tasks passed.bun run test— 19/19 Turbo tasks passed; app 38,682 tests passed (67 skipped), realtime 288 passed, CLI 784 passed (1 skipped).Browser acceptance on
http://localhost:3001/workspace/1499db5d-b148-4f74-93bf-3d0a7975dae5/w/6e3d9d1d-d9b5-42a3-9715-2c8ee7a5249c:Reviewer focus: notification placement is intentionally at top-level post-commit boundaries so batch/cascade operations signal once and failures/no-ops do not signal.
Checklist
Screenshots/Videos
N/A — socket-driven sidebar behavior was verified in the browser acceptance steps above.