Repository navigation
fix(watch): Keep other orgs' projects out of the org projects list - #1640
Merged
Merged
Conversation
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.
yahyafakhroji
approved these changes
Oct 6, 2026
🧪 Test Summary
Need another run? Use Re-run failed jobs: one shard costs a few minutes, the whole workflow about 26. 📎 Failure artifactsVideos and screenshots from failed E2E tests:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
acceptscheck, and the project list watch drops any project whoseorganizationIdisn'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.