7.1 KiB
| id | ticket | title | status | created | completed | tags | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0018 | studio-editor-document-vfs-boundary | Migrate the Code Editor workspace to consume `prometeu-vfs` | done | 2026-03-31 | 2026-03-31 |
|
Briefing
Replace direct editor-local filesystem services with prometeu-vfs while preserving current read-only behavior, current unsupported-file UX, and current session-local open-tab behavior.
Objective
Make the Code Editor workspace consume the project-session-owned prometeu-vfs for tree and document access without changing the visible behavior of the current editor wave.
Background
The editor currently wires EditorProjectSnapshotService and EditorFileBufferLoader directly into EditorWorkspace. DEC-0009 requires those concerns to move behind prometeu-vfs, while the editor remains owner of layout, visual tree state, open-tab presentation, and error presentation.
Dependencies
- DEC-0009 accepted and normatively locked
- PLN-0016 accepted or otherwise completed enough to provide the new module contract
- PLN-0017 accepted or otherwise completed enough to provide project-session ownership
Scope
Included
- update
EditorWorkspaceto consumeprometeu-vfsinstead of direct filesystem services - preserve existing
EditorOpenFileSessionownership for session-local tab state - preserve the existing unsupported-file modal behavior while moving support determination into
prometeu-vfs - remove or retire editor-local filesystem services whose ownership moved into
prometeu-vfs - adjust tests accordingly
Excluded
- write support
- dirty tracking
- watchers
- public event API exposure
- visual redesign of the editor
Non-Goals
- replace
EditorOpenFileSession - introduce outline semantics or helper-region behavior
- change the supported-file UX from modal to another surface
Execution Method
Step 1 - Rewire Editor Construction Around prometeu-vfs
What:
Inject the project-session-owned prometeu-vfs dependency into the editor workspace and route tree/document actions through it.
How:
Update shell/editor construction so EditorWorkspace receives the prometeu-vfs consumer dependency it needs and uses it for:
- navigator refresh
- file open
- support resolution
while keeping EditorOpenFileSession as the owner of open-tab presentation state.
File(s):
prometeu-studio/src/main/java/p/studio/window/MainView.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspace.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorOpenFileSession.java
Step 2 - Remove Direct Filesystem Ownership from the Editor
What: Stop the editor package from owning project-tree and document-loading filesystem code.
How:
Delete, deprecate, or reduce editor-local classes once their behavior lives in prometeu-vfs, ensuring no direct filesystem responsibility remains in the editor workspace boundary for those concerns.
File(s):
prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectSnapshotService.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorFileBufferLoader.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectSnapshot.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectNode.java
Step 3 - Preserve Visual Ownership in the Navigator and Status Surfaces
What: Keep the Studio UI responsible for presentation and view-model concerns after the data-source migration.
How:
Update navigator/status consumers to derive their presentation state from prometeu-vfs structural data without moving visual state into the module boundary.
File(s):
prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectNavigatorPanel.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorStatusBar.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspaceIcons.java
Step 4 - Rebalance the Test Suite Around the New Ownership Boundary
What:
Keep editor tests focused on editor-owned behavior after tree/document ownership moves to prometeu-vfs.
How:
- keep
EditorOpenFileSessionTestfor tab/session behavior - move filesystem behavior tests to
prometeu-vfs - add editor-facing tests where necessary for VFS integration, unsupported-file modal routing, and refresh wiring
File(s):
prometeu-studio/src/test/java/p/studio/workspaces/editor/EditorOpenFileSessionTest.javaprometeu-studio/src/test/java/p/studio/workspaces/editor/EditorProjectSnapshotServiceTest.javaprometeu-studio/src/test/java/p/studio/workspaces/editor/EditorFileBufferLoaderTest.java- new
prometeu-studio/src/test/java/p/studio/workspaces/editor/**
Test Requirements
Unit Tests
- editor session/tab behavior remains covered
- unsupported-file modal routing remains covered if testable at this layer
- no editor-local tree/document filesystem tests remain after migration
Integration Tests
- editor workspace integration test using a project-session-owned
prometeu-vfsdependency
Manual Verification
- open a project and confirm the navigator still shows the whole project
- use manual refresh and confirm the editor tree updates through
prometeu-vfs - open supported text files and confirm content still appears read-only
- open unsupported files and confirm the existing modal behavior remains intact
Acceptance Criteria
EditorWorkspaceno longer instantiates direct filesystem tree/document loaders- current read-only editor behavior remains unchanged from the user perspective
- unsupported-file handling still appears through Studio UI while support classification lives in
prometeu-vfs - editor tests now cover editor-owned behavior rather than filesystem ownership that moved to
prometeu-vfs
Affected Artifacts
prometeu-studio/src/main/java/p/studio/window/MainView.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspace.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectSnapshotService.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorFileBufferLoader.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectSnapshot.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectNode.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorProjectNavigatorPanel.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorStatusBar.javaprometeu-studio/src/test/java/p/studio/workspaces/editor/EditorOpenFileSessionTest.javaprometeu-studio/src/test/java/p/studio/workspaces/editor/EditorProjectSnapshotServiceTest.javaprometeu-studio/src/test/java/p/studio/workspaces/editor/EditorFileBufferLoaderTest.java- new
prometeu-studio/src/test/java/p/studio/workspaces/editor/**
Risks
- a shallow adapter-only migration could leave hidden direct filesystem access in the editor package
- moving too much presentation logic into
prometeu-vfswould violate DEC-0009 - changing unsupported-file UX during the migration would exceed the first-wave scope