5.2 KiB
| id | ticket | title | status | created | completed | tags | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0062 | studio-editor-workspace-cleanup | Shell Session and State Cleanup After Editor Removal | done | 2026-05-05 | 2026-05-05 |
|
Objective
Remove the Code Editor workspace from the Studio shell and reconfigure project session and persisted state so the application remains coherent without any editor-owned concepts.
Background
DEC-0031 locks the complete removal of the embedded editor stack. The shell, project session, workspace registry, and .studio/state.json currently still assume the existence of WorkspaceId.EDITOR, EditorWorkspace, editor restoration state, and editor-specific layout state.
Scope
Included
- Remove
WorkspaceId.EDITORfrom the Studio shell. - Remove
EditorWorkspaceregistration and shell integration. - Remove editor-specific state persistence and restoration paths.
- Remove
LSP/VFSlegacy ownership fromStudioProjectSessionandStudioProjectSessionFactory. - Keep
Assets,Shipper,Debug, launcher, and shell flows functional.
Excluded
- Removal of the
prometeu-lspandprometeu-vfsmodule source trees themselves. - Documentation and lesson cleanup.
- New code backend or replacement LSP architecture.
Execution Steps
Step 1 - Remove editor workspace registration from the shell
What: Remove all shell-level references to the Code Editor workspace.
How: Update the main window composition to stop creating EditorWorkspace, remove the editor rail item, stop selecting or restoring WorkspaceId.EDITOR, and ensure shell fallback remains stable when old persisted state still references the editor.
File(s): prometeu-studio/src/main/java/p/studio/window/MainView.java, prometeu-studio/src/main/java/p/studio/workspaces/WorkspaceId.java, any directly related shell controls or selectors.
Step 2 - Remove editor-owned state and restoration from project-local state
What: Remove editor layout and restoration data from persisted project-local Studio state.
How: Simplify ProjectLocalStudioState to remove editorRestoration and shellLayout.editorLayout, update normalization/defaults, and make loading old .studio/state.json degrade safely without crashes or stale editor assumptions.
File(s): prometeu-studio/src/main/java/p/studio/projectstate/ProjectLocalStudioState.java, prometeu-studio/src/main/java/p/studio/projectstate/ProjectLocalStudioStateService.java, any callers that write or restore editor state.
Step 3 - Reconfigure project session to stop owning editor legacy dependencies
What: Remove legacy editor-driven LSP and VFS ownership from project session composition.
How: Refactor StudioProjectSession and StudioProjectSessionFactory so opening a project no longer constructs VfsProjectDocument or LspService, and so close semantics remain valid without those resources.
File(s): prometeu-studio/src/main/java/p/studio/projectsessions/StudioProjectSession.java, prometeu-studio/src/main/java/p/studio/projectsessions/StudioProjectSessionFactory.java, dependent tests.
Step 4 - Remove bootstrap/container dependencies that only existed for the editor stack
What: Remove application bootstrap and container seams that exist only to inject legacy editor stack services.
How: Delete LspServiceFactory and ProjectDocumentVfsFactory accessors from the container surfaces once shell/session no longer depend on them, and update AppContainer accordingly.
File(s): prometeu-studio/src/main/java/p/studio/Container.java, prometeu-app/src/main/java/p/studio/AppContainer.java, directly affected tests.
Test Requirements
Unit Tests
- Update session and state tests to reflect the absence of editor state.
- Add coverage for loading old persisted project-local state without editor restoration fields being required.
Integration Tests
- Verify the main Studio shell opens a project and activates a surviving workspace without editor registration.
- Verify session close still saves valid project-local state and shuts down surviving services cleanly.
Manual Verification
- Open the Studio shell and confirm only surviving workspaces appear.
- Reopen a project with stale
.studio/state.jsoncontaining editor data and confirm safe fallback. - Confirm project switching and shell startup remain stable.
Acceptance Criteria
WorkspaceId.EDITORno longer exists in production code.MainViewno longer instantiates or restoresEditorWorkspace.- Project-local state no longer persists editor restoration or editor layout fields.
StudioProjectSessionno longer owns legacy editorLSP/VFSresources.- The Studio shell remains functional with surviving workspaces.
Dependencies
DEC-0031accepted and normatively locked.- Knowledge of all shell/session/state call sites that currently assume the editor exists.
Risks
- Shell restoration may break if old persisted state is not normalized defensively.
- Session teardown may regress if hidden resource ownership remains after field removal.
- Removing editor assumptions too early may temporarily orphan callers still using editor-specific state APIs.