fix: bound space file ID matching - #3262
Merged
JammingBen merged 3 commits intoAug 31, 2026
Merged
Conversation
JammingBen
requested changes
Aug 31, 2026
JammingBen
left a comment
Member
There was a problem hiding this comment.
This doesn't fix the issue. fileId in getSpaceForDriveAliasAndItem is undefined for trash routes, which is the real issue. You need to pass it manually to the route like e.g. useSpaceActionsNavigateToTrash does.
JammingBen
force-pushed
the
fix/3241-bound-file-id-matching
branch
from
August 31, 2026 09:03
39fccab to
658f0a4
Compare
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.
Description
Space selection from a file ID currently uses an unbounded string prefix. When one space ID is a prefix of another, a file from the longer ID can resolve to the wrong space.
Match the complete space ID or the
!separator used before an item ID, and cover the prefix collision with a regression test.Related Issue
How Has This Been Tested?
pnpm test:unit --run packages/web-pkg/tests/unit/helpers/spaces/driveAlias.spec.tspnpm check:typespnpm lintpnpm format:checkTypes of changes