feat: add volume workspace - #3497
Conversation
Replace the volume browser with a Project-style staged workspace backed by typed, revision-safe file APIs. Share generic workspace components and path utilities while keeping Volume permissions, rollback, configuration, and service behavior resource-specific.
Run volume workspace traversal, reads, mutations, and scoped rollback through commands supported by the published helper image. Add contextual failure logging and focused unit plus Docker-gated integration coverage for the transaction path.
Represent traversal depth and entry limits as consumable shell budgets so the published tools image can scan volume workspaces without arithmetic expansion. Update the helper integration inputs and unsupported-feature regression guard.
Classify volume workspace entries from POSIX mode metadata and normalize them in the shared explorer so folders expand and remain mutable while symlinks and special files stay locked. Extend parser and Docker helper coverage for conflicting metadata, empty folders, and nested entries.
Collapse the duplicate mode and kind branches into a single classification switch so the workspace parser stays within the configured cognitive complexity limit.
Lock workspace updates per volume so revision validation and file changes cannot overlap and overwrite newer saves.
Make uploads, deletions, directory creation, and restore flows share the per-volume workspace lock. Add race-tested coverage proving every legacy mutation waits for an active workspace update.
Restore the established file-action sizing, hover treatment, tooltips, and accessible labels in the shared workspace tree. Keep delete actions visibly destructive across Projects and Volume workspaces.
|
@kmendell I'd be eternally grateful if you took a look at this when you have some extra time. :) |
There was a problem hiding this comment.
this is a nit pick on my part but just have codex move tests into the same volumes_test file i dont like when there random files names , call me crazy :D
There was a problem hiding this comment.
I have OCD, I get it. :)
There was a problem hiding this comment.
@kmendell should the workspace service and workspace service tests also be moved into the volume service and volume tests?
Merge the handler and workspace helper coverage into their source-paired test files while preserving the existing cases and opt-in Docker integration gate.
Acquire the per-volume workspace lock for direct backups and carry lock ownership through restore contexts so nested safety backups do not self-deadlock. Extend the lock test to cover backup creation alongside existing mutation and restore paths.
Read and return the post-save workspace before releasing the per-volume transaction lock so concurrent updates cannot change the response tree or revision.
Change into the volume path before creating rollback archives so root-level entries, including names with spaces, are resolved correctly. Cover the helper command and restore flow with regression tests.
Combine backup path inspection and archive creation in one helper command so new files and folders are recorded as absent rather than passed to tar. Cover missing root and nested paths plus rollback restoration in the helper-image test.
|
@kmendell Codex is recommending we add a small native Rust-based scanner to the Arcane tools image. The current BusyBox build runs Saving scans twice: once to check that the volume hasn’t changed since it was loaded, and again to return the updated tree and revision after saving. A native scanner could collect the same metadata in one process without changing the API or removing these safety checks. |
|
ill have to look and see whats out there. |
|
Im not a expert on rust i really only know how to read/write go code lol, ive dabbled in rust a bit but, ill see if i can somehow create a go version that walks directories faster and more efficiently |
I get it, haha. I figured we could follow up in a second PR later to address performance. For the moment, this is perfect for those that need to edit settings in a named volume. Thank you so much for being so open to contributions! |
WIP: Fully Align Project and Volume WorkspacesSummary
Canonical APIProvide identical route structures:
Both
Convert
Remove:
Upload Limits and BehaviorAdd paired environment variables:
Contract:
Retain and rename the paired traversal settings:
Remove the old Canonical File StructureShared:
Project:
Volume:
Delete or retire:
Move the shared Legacy Removal and MigrationRemove Volume Browser implementation:
Clean up infrastructure naming while preserving the helper implementation used by Workspace and backup restore:
Remove the obsolete
Other cleanup:
Project Save FlowKeep one Save action:
Project Workspace excludes protected Compose, override, and environment files from both its entries and revision hash, so configuration changes do not invalidate workspace revisions. Test Plan
|
|
@kmendell I’m not sure how you feel about the proposed changes above. The commit can be reverted or adjusted if you see any issues with the approach. I felt the existing implementation was becoming difficult to follow because we were duplicating functionality, and the API contract was starting to become somewhat messy as a result. I know we all tend to have strong opinions when developing software, so I’ll leave the final direction up to your discretion. I’ll try to get the rest of my current work pushed shortly. |
Introduce canonical revision-checked multipart Workspace APIs and configurable project and volume upload limits. Remove legacy Project file/include and Volume Browser routes, permissions, edge commands, and frontend modules while preserving Build Workspace browsing. BREAKING CHANGE: Project file/include and Volume Browser APIs and legacy workspace environment setting names have been removed.
SummaryThis commit makes Workspace the canonical file-management feature for both Projects and Volumes. Highlights
Breaking changesLegacy Project/Volume routes, DTO fields, edge commands, frontend modules, permissions, and old ValidationBackend builds and focused Workspace, configuration, migration, authorization, and route tests passed. CLI compilation, shared-types tests, frontend checks, formatting, build, and test TypeScript checks also passed. Full backend lint was waived because of an unrelated pre-existing |
Guard volume workspace reads with keyed shared locks so mutations cannot expose intermediate state, including for the lifetime of download streams. Resolve the CLI against the repository-local shared types module so dependency installation can find the new workspace package.
Match the Project Workspace E2E checks to the canonical Workspace Files heading so tree-layout assertions follow the renamed UI.
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed. |
Integrate current upstream main and resolve the project and volume workspace conflicts against the shared editor, project services, and resource-detail layouts.
|
I am hoping to get this and the s3 PR merged this weekend , just been a bit busy. |
I haven't tested with the major refactoring I did because it requires a migration, which I wanted to avoid running on prod until I get the okay from you. Let me know when you have time and I'll deploy the changes to prod to make sure there is no regression. |
|
Do not be alarmed about the conflicts that are about to happen on here lol, I will fix them there is going to be alot i restructured the netire backend to clean stuff up and make it easier to maintain |
|
This pull request has merge conflicts. Please resolve the conflicts so the PR can stay up-to-date and reviewed. |
|
I have a native Go binary that ill addto speed up the files stuff, but just wnated ot get this in first |
Checklist
mainbranchm.*())What This PR Implements
Brings the Projects-style file browser and text editor to Docker volumes. File changes are staged and saved together through the volume workspace.
Fixes #3247
Changes Made
Testing Done
AI Tool Used (if applicable)
Codex 5.6 Sol (Extra High) — assisted with implementation, testing, code review, and drafting this PR description. The completed feature was manually verified in production.
Additional Context
None.
Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
The PR adds a revision-safe workspace for browsing and editing Docker volume files, reusing the project workspace UI and coordinating volume mutations through a per-volume lock.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains; the previously reported revision, legacy-mutation, backup-consistency, and response-snapshot races are now serialized by the same per-volume lock over their full critical sections.
Reviews (6): Last reviewed commit: "fix(volumes): return workspace from lock..." | Re-trigger Greptile
Context used (5)
types/)Disclaimer Greptiles Reviews use AI, make sure to check over its work.
To better help train Greptile on our codebase, if the comment is useful and valid Like the comment, if its not helpful or invalid Dislike
To have Greptile Re-Review the changes, mention
greptileai.Greptile Summary
The PR adds a revision-safe Docker volume workspace with shared browsing and editing behavior. The latest changes serialize workspace reads, updates, legacy mutations, backup creation, and restores around the same per-volume state.
Confidence Score: 5/5
The PR appears safe to merge.
No blocking failure remains; the previously reported revision, legacy-mutation, backup-consistency, response-snapshot, and intermediate-read races are protected by the same per-volume lock over the relevant critical sections.
Reviews (10): Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." | Re-trigger Greptile
Context used (3)