feat(FR-2619): migrate single-folder detail reads to Strawberry V2 vfolderV2 query#6842
Merged
graphite-app[bot] merged 1 commit intomainfrom Apr 30, 2026
Conversation
Contributor
Author
|
|
Contributor
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.68% (-0.1% 🔻) |
1858/21417 |
| 🔴 | Branches | 7.86% (-0.12% 🔻) |
1187/15103 |
| 🔴 | Functions | 5.12% (-0.04% 🔻) |
296/5786 |
| 🔴 | Lines | 8.41% (-0.1% 🔻) |
1749/20787 |
Show new covered files 🐣
St.❔ |
File | Statements | Branches | Functions | Lines |
|---|---|---|---|---|---|
| 🔴 | ... / useVirtualFolderNodePathV2.ts |
0% | 0% | 0% | 0% |
| 🔴 | ... / EditableVFolderNameV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / FileBrowserButtonV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / FolderExplorerHeaderV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / FolderExplorerModalV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / SFTPServerButtonV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / VFolderNodeDescriptionV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / VFolderLazyViewV2.tsx |
0% | 0% | 0% | 0% |
| 🔴 | ... / VirtualFolderPathV2.tsx |
0% | 100% | 0% | 0% |
Test suite run success
865 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from d2ba569
84334e5 to
4f71e33
Compare
c829f05 to
83e3a29
Compare
4f71e33 to
ea5c773
Compare
bd08a00 to
4af5380
Compare
0886aed to
7d7a301
Compare
4af5380 to
5c25214
Compare
5 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates single-folder detail views from the legacy VirtualFolderNode GraphQL reads to the Strawberry V2 vfolderV2 / VFolder schema, updating dependent UI components accordingly.
Changes:
- Switched multiple Relay fragments/queries to
VFolder(vfolderV2) and updated field access (metadata,accessControl,ownership,unmanagedPath). - Updated folder explorer modal to convert the URL’s dash-stripped folder id into a canonical
UUID!for V2 queries. - Updated related components (identicon, description, buttons, editable name) to use the V2 data shape.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| react/src/hooks/useVirtualFolderNodePath.ts | Updates path derivation hook to read metadata.quotaScopeId from V2 VFolder. |
| react/src/components/VFolderNodeDescription.tsx | Migrates description fragment to V2 fields and updates mount-permission refresh query to vfolderV2. |
| react/src/components/VFolderLazyView.tsx | Migrates lazy folder name/identicon query from vfolder_node to vfolderV2. |
| react/src/components/SFTPServerButton.tsx | Updates fragment/prop naming and reads host/id from VFolder for SFTP session launch. |
| react/src/components/FolderExplorerModal.tsx | Switches folder lookup to vfolderV2(UUID!) and adapts permission heuristics and metadata usage. |
| react/src/components/FolderExplorerHeader.tsx | Migrates header fragment to VFolder and switches to V2 identicon + updated child props. |
| react/src/components/FileBrowserButton.tsx | Updates fragment/prop naming and reads host/id from VFolder for filebrowser session launch. |
| react/src/components/EditableVFolderName.tsx | Migrates rename UI fragment/refetch query to V2 (metadata.name, ownership.*). |
2 tasks
5c25214 to
dd9c9c0
Compare
7d7a301 to
674a935
Compare
dd9c9c0 to
dd0f151
Compare
674a935 to
492788e
Compare
7144e82 to
edce67f
Compare
b54fea7 to
f68a0b2
Compare
a854196 to
6fd1340
Compare
707aba2 to
bdae917
Compare
6fd1340 to
48c0e92
Compare
48c0e92 to
741f9e0
Compare
bdae917 to
7a7c311
Compare
7a7c311 to
2dcc90f
Compare
07bfd2e to
35a2bde
Compare
2dcc90f to
d05aa9e
Compare
35a2bde to
56b3d0c
Compare
d05aa9e to
94c01ea
Compare
4ce2fa9 to
d0eec65
Compare
94c01ea to
c3f2778
Compare
Merge activity
|
…olderV2 query (#6842) Resolves #6834 (FR-2619) > [!IMPORTANT] > ## Version branching > > This PR routes consumers **directly to the V2 path** with no V1 fallback. > > - **If shipped in a 26.4.x release** — version branching **NOT required**. > The 26.4.x line pairs with manager ≥ 26.4.2, so `vfolderV2` / `VFolder` is always available. The V1 files kept in tree are only there for the in-tree compatibility window and can be removed in a follow-up cleanup PR. > > - **If shipped in a 26.5.x or later release** — version branching **IS required**. > WebUI 26.5+ may pair with older managers that predate `vfolderV2`. Before merge, consumers (`FolderExplorerOpener`, the inline previews, etc.) must be updated to dynamically select V1 or V2 based on manager capability. ## Summary Per the FR-2572 epic guideline ("do not modify legacy V1 files; create V2 siblings alongside and switch consumers"), this PR migrates the single-folder detail read paths to the Strawberry V2 `vfolderV2(vfolderId)` query. **V1 files are left untouched** — new `*V2.tsx` siblings are added and only the entry-point consumers are switched to V2. ## New V2 siblings Built on the `VFolder` fragment / `vfolderV2(vfolderId)` query: - `react/src/components/FolderExplorerModalV2.tsx` - `react/src/components/FolderExplorerHeaderV2.tsx` - `react/src/components/EditableVFolderNameV2.tsx` - `react/src/components/FileBrowserButtonV2.tsx` - `react/src/components/SFTPServerButtonV2.tsx` - `react/src/components/VFolderNodeDescriptionV2.tsx` - `react/src/components/VirtualFolderNodeItems/VirtualFolderPathV2.tsx` - `react/src/components/VFolderLazyViewV2.tsx` - `react/src/hooks/useVirtualFolderNodePathV2.ts` ## Consumer switches Only three entry points are touched. Everything reachable from them automatically uses V2: - `react/src/components/FolderExplorerOpener.tsx` — the root-mounted opener now lazy-imports `FolderExplorerModalV2`. Every `useFolderExplorerOpener().open(id)` / `generateFolderPath(id)` call site routes through V2 automatically (no per-caller change needed). - `react/src/components/ServiceLauncherPageContent.tsx` — inline preview switched to `VFolderLazyViewV2`. - `react/src/pages/EndpointDetailPage.tsx` — inline preview switched to `VFolderLazyViewV2`. ## TODO marker - `react/src/components/MountedVFolderLinks.tsx` — `ComputeSessionNode` does not yet expose a V2 `VFolder` connection, so `MountedVFolderLinks` / `FolderLink` / `SessionDetailContent` cannot migrate. A `TODO(needs-backend)` comment is placed on the V1 fragment to migrate them once the backend adds the connection. ## Out of scope - `SessionDetailContent.tsx`, `MountedVFolderLinks.tsx`, `FolderLink.tsx` — blocked on the backend dependency above. - `VFolderMountFormItem.tsx` — uses the `vfolder_nodes(...)` list query, not single detail read; covered by FR-2685 (selector migration). - `LegacyModelCardModal.tsx`, `LegacyModelTryContentButton.tsx`, `pages/LegacyModelStoreListPage.tsx` — gated behind legacy model-store flows; deferred per the FR-2619 issue body. ## V2 schema gaps (TODO(needs-backend) markers in code) - `accessControl.permission` is the *mount* permission (`READ_ONLY` / `READ_WRITE` / `RW_DELETE`), not an effective per-user action permission set. The explorer modal's delete/write checks read it as a best-effort approximation. - V2 `VFolder` does not yet expose quota fields (`max_size`, `max_files`), so the MaxSize row is hidden. - The mount-permission update still goes through the legacy REST endpoint (`baiClient.vfolder.update_folder`); V2 has no equivalent mutation yet. ## Verification \`bash scripts/verify.sh\` — Relay / Lint / Format / TypeScript all PASS. --- **Checklist:** (if applicable) - [ ] Documentation - [x] Minimum required manager version — V2 `vfolderV2` / `VFolder` requires manager 26.4.2+ - [ ] Specific setting for review (eg., KB link, endpoint or how to setup) - [ ] Minimum requirements to check during review - [ ] Test case(s) to demonstrate the difference of before/after
c3f2778 to
2a84fd4
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 #6834 (FR-2619)
Important
Version branching
This PR routes consumers directly to the V2 path with no V1 fallback.
If shipped in a 26.4.x release — version branching NOT required.
The 26.4.x line pairs with manager ≥ 26.4.2, so
vfolderV2/VFolderis always available. The V1 files kept in tree are only there for the in-tree compatibility window and can be removed in a follow-up cleanup PR.If shipped in a 26.5.x or later release — version branching IS required.
WebUI 26.5+ may pair with older managers that predate
vfolderV2. Before merge, consumers (FolderExplorerOpener, the inline previews, etc.) must be updated to dynamically select V1 or V2 based on manager capability.Summary
Per the FR-2572 epic guideline ("do not modify legacy V1 files; create V2 siblings alongside and switch consumers"), this PR migrates the single-folder detail read paths to the Strawberry V2
vfolderV2(vfolderId)query. V1 files are left untouched — new*V2.tsxsiblings are added and only the entry-point consumers are switched to V2.New V2 siblings
Built on the
VFolderfragment /vfolderV2(vfolderId)query:react/src/components/FolderExplorerModalV2.tsxreact/src/components/FolderExplorerHeaderV2.tsxreact/src/components/EditableVFolderNameV2.tsxreact/src/components/FileBrowserButtonV2.tsxreact/src/components/SFTPServerButtonV2.tsxreact/src/components/VFolderNodeDescriptionV2.tsxreact/src/components/VirtualFolderNodeItems/VirtualFolderPathV2.tsxreact/src/components/VFolderLazyViewV2.tsxreact/src/hooks/useVirtualFolderNodePathV2.tsConsumer switches
Only three entry points are touched. Everything reachable from them automatically uses V2:
react/src/components/FolderExplorerOpener.tsx— the root-mounted opener now lazy-importsFolderExplorerModalV2. EveryuseFolderExplorerOpener().open(id)/generateFolderPath(id)call site routes through V2 automatically (no per-caller change needed).react/src/components/ServiceLauncherPageContent.tsx— inline preview switched toVFolderLazyViewV2.react/src/pages/EndpointDetailPage.tsx— inline preview switched toVFolderLazyViewV2.TODO marker
react/src/components/MountedVFolderLinks.tsx—ComputeSessionNodedoes not yet expose a V2VFolderconnection, soMountedVFolderLinks/FolderLink/SessionDetailContentcannot migrate. ATODO(needs-backend)comment is placed on the V1 fragment to migrate them once the backend adds the connection.Out of scope
SessionDetailContent.tsx,MountedVFolderLinks.tsx,FolderLink.tsx— blocked on the backend dependency above.VFolderMountFormItem.tsx— uses thevfolder_nodes(...)list query, not single detail read; covered by FR-2685 (selector migration).LegacyModelCardModal.tsx,LegacyModelTryContentButton.tsx,pages/LegacyModelStoreListPage.tsx— gated behind legacy model-store flows; deferred per the FR-2619 issue body.V2 schema gaps (TODO(needs-backend) markers in code)
accessControl.permissionis the mount permission (READ_ONLY/READ_WRITE/RW_DELETE), not an effective per-user action permission set. The explorer modal's delete/write checks read it as a best-effort approximation.VFolderdoes not yet expose quota fields (max_size,max_files), so the MaxSize row is hidden.baiClient.vfolder.update_folder); V2 has no equivalent mutation yet.Verification
`bash scripts/verify.sh` — Relay / Lint / Format / TypeScript all PASS.
Checklist: (if applicable)
vfolderV2/VFolderrequires manager 26.4.2+