Skip to content

fix(watch): Keep other orgs' projects out of the org projects list - #1640

Merged
mattdjenkinson merged 1 commit into
mainfrom
fix/watch-project-org-guard
Oct 6, 2026
Merged

mattdjenkinson merged 1 commit into
mainfrom
fix/watch-project-org-guard

Conversation

@mattdjenkinson

Copy link
Copy Markdown
Contributor

Problem
The org projects list sometimes showed projects from other organizations. They flashed in, then disappeared on their own or after a refresh. Milo's org-scoped project watch wasn't filtered by organization, so it streamed every org's projects. Before #1633 the portal never applied ADDED events to the projects list, so this went unnoticed. Now that watch events write into the list, the replay sent on each subscribe added other orgs' projects until the next REST refetch removed them.

Solution
The root cause is fixed in Milo in milo-os/milo#828. This PR is a backstop so the portal never trusts the stream's scoping by itself. Watch caches can now take an accepts check, and the project list watch drops any project whose organizationId isn't the org being viewed. I deliberately didn't make the watch apply the REST list's Ready filter, because that would stop newly created projects showing while they provision. A unit test covers another org's ADDED being ignored and the org's own projects still being added; it fails without the guard.

Milo's org-scoped project watch was not filtered by organization, so it
streamed every org's projects. Since the watch now writes ADDED events
into the org projects list, those projects flashed into the list until
the next refetch removed them.

Milo is fixed in milo-os/milo#828. As a backstop, watch caches can now
take an `accepts` check, and the project list watch drops any project
whose organizationId is not the org being viewed.
@mattdjenkinson
mattdjenkinson merged commit abb51d2 into main Oct 6, 2026
11 checks passed
@mattdjenkinson
mattdjenkinson deleted the fix/watch-project-org-guard branch October 6, 2026 13:51
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown

🧪 Test Summary

Job Status
Bun Unit Tests ✅ success
E2E Regression (0) ✅ success
E2E Regression (1) ✅ success
E2E Regression (2) ❌ failure
E2E Regression (3) ✅ success
E2E Smoke ✅ success
Unit Tests ✅ success

View workflow run

Need another run? Use Re-run failed jobs: one shard costs a few minutes, the whole workflow about 26.

📎 Failure artifacts

Videos and screenshots from failed E2E tests:

  • e2e-regression-artifacts-37473246737-shard-2 – Download

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.

2 participants