fix(FR-3022): use toLocalId instead of convertToUUID on new VFolder result.id#7681
Merged
graphite-app[bot] merged 1 commit intoJun 2, 2026
Conversation
Contributor
Author
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
Coverage Report for react-coverage (./react)
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the admin “inline create VFolder via + button” flow in AdminModelCardSettingModal by correctly decoding Relay GlobalIDs before re-encoding them for the BAIVFolderSelect form field, avoiding a doubly-encoded folder ID that the backend rejects.
Changes:
- Replace
convertToUUID(result.id)withtoLocalId(result.id)when handlingFolderCreateModalV2.onRequestClose. - Remove the now-unused
convertToUUIDimport.
Merge activity
|
…esult.id (#7681) Resolves #7680 (FR-3022) ## Summary When an admin creates a new VFolder inline via the `+` button in `AdminModelCardSettingModal` (which opens `FolderCreateModalV2`), the `onRequestClose` callback receives a `result` whose `result.id` is a Relay **Globally Unique ID** (base64-encoded `VFolder:uuid`). The previous code passed it through `convertToUUID`, which only normalizes a 32-char hex sequence into dash-separated UUID format — it does **not** decode base64. On a base64 GlobalID it fails the regex and returns the GlobalID untouched, which then gets re-wrapped by `toGlobalId`, producing a doubly-encoded value the backend rejects. This swaps `convertToUUID` for `toLocalId` (`atob(globalId).split(':')?.[1]`), which correctly decodes the GlobalID — matching the convention already used elsewhere in the same file (`toLocalId(modelCard.id)`, `toLocalId(values.vfolderId)`). ## Changes - `react/src/components/AdminModelCardSettingModal.tsx`: `convertToUUID(result.id)` → `toLocalId(result.id)`; dropped the now-unused `convertToUUID` import. ## Impact Only affects the admin inline-create-VFolder path (open Model Card Setting modal → create new VFolder via `+` → submit). The dropdown-select path was unaffected. Discovered while healing `e2e/admin-model-card/` tests for FR-2995; once this lands, the `createNewFolderViaPlus` POM workaround in #7679 can be removed. ## Verification `scripts/verify.sh` — Relay, Lint, Format, TypeScript all PASS. (The "Vite warmup paths" check fails identically on a clean `main` checkout — a pre-existing environmental issue unrelated to this change.)
5fe54a0 to
83cec79
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.

Resolves #7680 (FR-3022)
Summary
When an admin creates a new VFolder inline via the
+button inAdminModelCardSettingModal(which opensFolderCreateModalV2), theonRequestClosecallback receives aresultwhoseresult.idis a Relay Globally Unique ID (base64-encodedVFolder:uuid).The previous code passed it through
convertToUUID, which only normalizes a 32-char hex sequence into dash-separated UUID format — it does not decode base64. On a base64 GlobalID it fails the regex and returns the GlobalID untouched, which then gets re-wrapped bytoGlobalId, producing a doubly-encoded value the backend rejects.This swaps
convertToUUIDfortoLocalId(atob(globalId).split(':')?.[1]), which correctly decodes the GlobalID — matching the convention already used elsewhere in the same file (toLocalId(modelCard.id),toLocalId(values.vfolderId)).Changes
react/src/components/AdminModelCardSettingModal.tsx:convertToUUID(result.id)→toLocalId(result.id); dropped the now-unusedconvertToUUIDimport.Impact
Only affects the admin inline-create-VFolder path (open Model Card Setting modal → create new VFolder via
+→ submit). The dropdown-select path was unaffected. Discovered while healinge2e/admin-model-card/tests for FR-2995; once this lands, thecreateNewFolderViaPlusPOM workaround in #7679 can be removed.Verification
scripts/verify.sh— Relay, Lint, Format, TypeScript all PASS. (The "Vite warmup paths" check fails identically on a cleanmaincheckout — a pre-existing environmental issue unrelated to this change.)