Skip to content

feat(FR-2619): migrate single-folder detail reads to Strawberry V2 vfolderV2 query#6842

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query
Apr 30, 2026
Merged

feat(FR-2619): migrate single-folder detail reads to Strawberry V2 vfolderV2 query#6842
graphite-app[bot] merged 1 commit intomainfrom
04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query

Conversation

@ironAiken2
Copy link
Copy Markdown
Contributor

@ironAiken2 ironAiken2 commented Apr 21, 2026

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.tsxComputeSessionNode 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
  • 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

@github-actions github-actions Bot added the size:L 100~500 LoC label Apr 21, 2026
Copy link
Copy Markdown
Contributor Author

ironAiken2 commented Apr 21, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent changes, fast-track this PR to the front of 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.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Apr 21, 2026

CLA assistant check
All committers have signed the CLA.

@cla-assistant
Copy link
Copy Markdown

cla-assistant Bot commented Apr 21, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

Coverage report for ./react

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

@ironAiken2 ironAiken2 changed the base branch from 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api to graphite-base/6842 April 22, 2026 04:25
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from c829f05 to 83e3a29 Compare April 22, 2026 06:40
@ironAiken2 ironAiken2 changed the base branch from graphite-base/6842 to 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api April 22, 2026 06:40
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api branch from 4f71e33 to ea5c773 Compare April 22, 2026 06:55
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch 2 times, most recently from bd08a00 to 4af5380 Compare April 22, 2026 07:00
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api branch 2 times, most recently from 0886aed to 7d7a301 Compare April 23, 2026 02:23
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from 4af5380 to 5c25214 Compare April 23, 2026 02:23
@ironAiken2 ironAiken2 marked this pull request as ready for review April 23, 2026 02:55
Copilot AI review requested due to automatic review settings April 23, 2026 02:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.*).

Comment thread react/src/hooks/useVirtualFolderNodePath.ts Outdated
Comment thread react/src/components/VFolderNodeDescription.tsx
@ironAiken2 ironAiken2 marked this pull request as draft April 23, 2026 04:14
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from 5c25214 to dd9c9c0 Compare April 23, 2026 04:35
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api branch from 7d7a301 to 674a935 Compare April 23, 2026 04:35
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from dd9c9c0 to dd0f151 Compare April 23, 2026 07:13
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api branch from 674a935 to 492788e Compare April 23, 2026 07:13
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from 7144e82 to edce67f Compare April 27, 2026 08:55
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api branch 2 times, most recently from b54fea7 to f68a0b2 Compare April 27, 2026 10:00
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch 2 times, most recently from a854196 to 6fd1340 Compare April 28, 2026 02:03
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api branch 2 times, most recently from 707aba2 to bdae917 Compare April 28, 2026 03:21
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from 6fd1340 to 48c0e92 Compare April 28, 2026 03:21
@ironAiken2 ironAiken2 changed the base branch from 04-21-feat_fr-2573_migrate_vfolder_list_queries_to_strawberry_v2_graphql_api to graphite-base/6842 April 28, 2026 06:19
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from 48c0e92 to 741f9e0 Compare April 28, 2026 06:20
@ironAiken2 ironAiken2 changed the base branch from graphite-base/6842 to 04-23-feat_fr-2688_migrate_notification_item_virtualfoldernode_branch_to_strawberry_v2 April 28, 2026 06:20
@github-actions github-actions Bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Apr 28, 2026
@ironAiken2 ironAiken2 marked this pull request as ready for review April 28, 2026 08:43
@ironAiken2 ironAiken2 force-pushed the 04-23-feat_fr-2688_migrate_notification_item_virtualfoldernode_branch_to_strawberry_v2 branch from 7a7c311 to 2dcc90f Compare April 29, 2026 01:07
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch 2 times, most recently from 07bfd2e to 35a2bde Compare April 29, 2026 01:37
@ironAiken2 ironAiken2 force-pushed the 04-23-feat_fr-2688_migrate_notification_item_virtualfoldernode_branch_to_strawberry_v2 branch from 2dcc90f to d05aa9e Compare April 29, 2026 09:59
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch from 35a2bde to 56b3d0c Compare April 29, 2026 09:59
@ironAiken2 ironAiken2 force-pushed the 04-23-feat_fr-2688_migrate_notification_item_virtualfoldernode_branch_to_strawberry_v2 branch from d05aa9e to 94c01ea Compare April 29, 2026 10:27
@ironAiken2 ironAiken2 force-pushed the 04-21-feat_fr-2619_migrate_single_folder_detail_reads_to_strawberry_v2_vfolderv2_query branch 2 times, most recently from 4ce2fa9 to d0eec65 Compare April 30, 2026 00:37
@ironAiken2 ironAiken2 force-pushed the 04-23-feat_fr-2688_migrate_notification_item_virtualfoldernode_branch_to_strawberry_v2 branch from 94c01ea to c3f2778 Compare April 30, 2026 00:37
@graphite-app
Copy link
Copy Markdown

graphite-app Bot commented Apr 30, 2026

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
@graphite-app graphite-app Bot force-pushed the 04-23-feat_fr-2688_migrate_notification_item_virtualfoldernode_branch_to_strawberry_v2 branch from c3f2778 to 2a84fd4 Compare April 30, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500~ LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate single-folder detail reads to Strawberry V2 vfolderV2 query

2 participants