Skip to content

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

Merged
graphite-app[bot] merged 1 commit into
mainfrom
06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer
Jun 29, 2026
Merged

fix(FR-3204): keep model project folder mount permission read-only in Folder Explorer#8034
graphite-app[bot] merged 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.77% 1947 / 28754
🔵 Statements 5.53% 2194 / 39649
🔵 Functions 5.7% 322 / 5646
🔵 Branches 3.71% 1387 / 37362
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
react/src/components/FolderCreateModalV2.tsx 0% 0% 0% 0% 50-730
react/src/components/VFolderNodeDescriptionV2.tsx 0% 0% 0% 0% 51-355
Generated in workflow #2309 for commit da225f7 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 3 times, most recently 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

@nowgnuesLee nowgnuesLee force-pushed the 06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer branch from 64d418d to c70c0ef Compare June 29, 2026 04:52
@nowgnuesLee nowgnuesLee dismissed agatha197’s stale review June 29, 2026 05:00

resolved review

@graphite-app

graphite-app Bot commented Jun 29, 2026

Copy link
Copy Markdown

Merge activity

… Folder Explorer (#8034)

Resolves #8033 (FR-3204)

## Summary

![CleanShot 2026-06-24 at 14.50.51@2x.png](https://app.graphite.com/user-attachments/assets/50830b9c-a5b5-478b-aa33-0544de3c8c97.png)

![CleanShot 2026-06-24 at 14.50.31@2x.png](https://app.graphite.com/user-attachments/assets/3e591e72-9259-403a-9cea-9b9d89d3c099.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.
@graphite-app graphite-app Bot force-pushed the 06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer branch from c70c0ef to da225f7 Compare June 29, 2026 05:01
@graphite-app graphite-app Bot merged commit da225f7 into main Jun 29, 2026
13 checks passed
@graphite-app graphite-app Bot deleted the 06-24-fix_fr-3204_keep_model_project_folder_mount_permission_read-only_in_folder_explorer branch June 29, 2026 05:02
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