Skip to content

fix(FR-3204): keep model project folder mount permission read-only in Folder Explorer#8034

Open
nowgnuesLee wants to merge 1 commit into
mainfrom
06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer
Open

fix(FR-3204): keep model project folder mount permission read-only in Folder Explorer#8034
nowgnuesLee wants to merge 1 commit into
mainfrom
06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer

Conversation

@nowgnuesLee

@nowgnuesLee nowgnuesLee commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Resolves #8033 (FR-3204)

Summary

CleanShot 2026-06-24 at 14.50.51@2x.png

CleanShot 2026-06-24 at 14.50.31@2x.png

When a model folder is created into a project from the Model Store, the mount permission is forced to read-only (ro) at creation time (FolderCreateModalV2 / FR-1290). However, the Folder Explorer detail panel still let users switch that permission back to read-write (rw), bypassing the enforcement.

Changes

  • VFolderNodeDescriptionV2.tsx — Disable the rw mount-permission option for model project folders (metadata.usageMode === 'MODEL' && accessControl.ownershipType === 'GROUP'). A tooltip on the disabled option explains why, reusing the existing data.folders.ModelProjectFolderRestrictedToReadOnly message already shown in the create modal, plus a defensive onChange guard.
  • FolderCreateModalV2.tsx — Rename the permission field label from data.Permission ("권한") to data.folders.MountPermission ("마운트 권한") for consistency with the Folder Explorer, since both refer to the mount permission. Also drop the now-redundant feature-flag gate (see below).
  • Dropped the allow-only-ro-permission-for-model-project-folder feature-flag gate from both screens. The restriction is enforced by all currently supported manager versions (LTS ≥ 25.18.2), so the version gate was always true — a dead branch. Removing it from both call sites keeps the two screens consistent.

Verification

bash scripts/verify.sh → Relay / Lint / Format / TypeScript all PASS.
(The pre-existing "Vite warmup paths" check fails on main as well, unrelated to this change.)

Test plan

  1. Create a model folder into a project folder from the Model Store (permission forced to ro).
  2. Open it in Folder Explorer → the mount-permission rw option is disabled and shows the read-only tooltip on hover; only ro is selectable.
  3. Non-model folders are unaffected — both ro and rw remain selectable.

@github-actions github-actions Bot added the size:S 10~30 LoC label Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

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.

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for react-coverage (./react)

Status Category Percentage Covered / Total
🔵 Lines 6.46% 1875 / 28998
🔵 Statements 5.29% 2116 / 39962
🔵 Functions 5.34% 305 / 5704
🔵 Branches 3.56% 1342 / 37651
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/FolderCreateModalV2.tsx 0% 0% 0% 0% 50-724
react/src/components/VFolderNodeDescriptionV2.tsx 0% 0% 0% 0% 51-353
Generated in workflow #2213 for commit 64d418d by the Vitest Coverage Report Action

@nowgnuesLee nowgnuesLee force-pushed the 06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer branch from 213a6b5 to ddad0d2 Compare June 24, 2026 04:25
@github-actions github-actions Bot added size:M 30~100 LoC and removed size:S 10~30 LoC labels Jun 24, 2026
@nowgnuesLee nowgnuesLee marked this pull request as ready for review June 24, 2026 04:25
Copilot AI review requested due to automatic review settings June 24, 2026 04:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aligns Folder Explorer mount-permission editing behavior with the existing model project folder creation restriction (forced read-only), preventing users from switching such folders back to read-write when the backend feature flag is enabled. It also improves label consistency by explicitly naming the field “Mount Permission” in the creation modal.

Changes:

  • Disable the rw mount-permission option for model project folders in Folder Explorer when allow-only-ro-permission-for-model-project-folder is supported, with an explanatory tooltip.
  • Rename the create-modal permission label to data.folders.MountPermission for consistency with Folder Explorer terminology.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
react/src/components/VFolderNodeDescriptionV2.tsx Gates and disables the rw mount-permission option for model project folders (feature-flagged), adds tooltip explanation, and adds a defensive early-return in onChange.
react/src/components/FolderCreateModalV2.tsx Updates the permission field label to “Mount Permission” using the existing i18n key.

@nowgnuesLee nowgnuesLee force-pushed the 06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer branch 2 times, most recently from 330741b to a404b57 Compare June 24, 2026 04:44
… Folder Explorer

When a model folder is created into a project from the Model Store, the
mount permission is forced to read-only (ro) at creation time
(FolderCreateModalV2 / FR-1290). However, the Folder Explorer detail
panel still let users switch that permission back to read-write (rw),
bypassing the enforcement.

Mirror the creation-time restriction in VFolderNodeDescriptionV2: disable
the 'rw' mount-permission option for model project folders
(usageMode === 'MODEL' && ownershipType === 'GROUP'), with a tooltip
reusing the existing data.folders.ModelProjectFolderRestrictedToReadOnly
message and a defensive onChange guard.

The read-only restriction is enforced by all currently supported manager
versions, so drop the now-redundant
'allow-only-ro-permission-for-model-project-folder' feature-flag gate
from both the Folder Explorer and the creation modal.

Also rename the folder-creation permission field label from
data.Permission to data.folders.MountPermission for consistency with the
Folder Explorer, since both refer to the mount permission.
@nowgnuesLee nowgnuesLee force-pushed the 06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer branch from a404b57 to 64d418d Compare June 24, 2026 05:44

@agatha197 agatha197 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Add more design intent comments after discussing with core team.

@ironAiken2 ironAiken2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30~100 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model folder mount permission can be changed in Folder Explorer despite read-only enforcement at creation

4 participants