4.2 KiB
| id | ticket | title | status | created | completed | tags | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PLN-0021 | studio-editor-write-wave-supported-non-frontend-files | Integrate DEC-0010 editor write UI and workflow in Studio | review | 2026-03-31 |
|
Objective
Make the Studio editor consume the DEC-0010 VFS write contract and expose the intended UI workflow for editable non-frontend documents and hard frontend read-only documents.
Background
Once VFS access policy and save behavior exist, the editor still needs to:
- stop being globally read-only,
- surface mixed editable and frontend hard
read-onlytabs correctly, - expose editor-local save commands,
- and keep frontend warnings/status consistent with the decision.
Scope
Included
- wire editor UI to new VFS access policy and save commands
- add editor-local
SaveandSave Allcommand bar - keep frontend docs hard
read-only - show frontend top warning and status-bar state
- update editor tests
Excluded
- LSP integration
- frontend editing
- shell-global menu save behavior beyond remaining unused for this flow
Execution Steps
Step 1 - Rewire Editor Session State Around Access Policy
What: Make the editor session aware of document access mode and save capability.
How: Update open-file/session models so they track:
- document access mode,
- save eligibility,
- frontend hard
read-onlystate, - and editor-local command enablement.
File(s):
prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorOpenFileBuffer.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorOpenFileSession.java
Step 2 - Add the Editor Command Bar and Save Flow
What: Expose the write commands in the editor itself.
How:
Add a top command bar or equivalent editor-local surface with Save and Save All, wired to VFS save operations for editable non-frontend docs only.
File(s):
prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspace.java- new
prometeu-studio/src/main/java/p/studio/workspaces/editor/**command-bar surface as needed prometeu-studio/src/main/resources/themes/default-prometeu.css
Step 3 - Enforce Hard Frontend Read-Only in the Editor UX
What:
Make frontend files visibly hard read-only.
How: Ensure FE files:
- cannot be mutated in the editor UI,
- show
read-onlyin the status bar, - show the required top warning,
- and can coexist with editable non-frontend tabs without ambiguity.
File(s):
prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspace.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorStatusBar.javaprometeu-studio/src/main/java/p/studio/workspaces/editor/EditorTabStrip.java
Step 4 - Update Editor Tests
What: Keep editor tests focused on editor-owned behavior under the new mixed access-mode workflow.
How: Add or adjust tests for:
- editable non-frontend save command routing,
- FE hard
read-onlyUI state, - mixed tab behavior,
- command enablement.
File(s):
prometeu-studio/src/test/java/p/studio/workspaces/editor/**
Test Requirements
Unit Tests
- mixed access-mode tab/session behavior
- save command enablement
- FE hard
read-onlypresentation state
Integration Tests
- editor workspace integration against a VFS test double exposing editable and hard
read-onlydocs
Manual Verification
- open editable
json/bash/textdocs and confirm save works - open FE docs and confirm they cannot be edited
- confirm FE warning and status-bar state are visible
Acceptance Criteria
- editor consumes VFS access policy instead of local editability inference
SaveandSave Alllive in the editor UI- FE docs are hard
read-onlyin actual editor interaction - mixed editable and FE
read-onlytabs behave coherently - editor tests cover the new workflow
Dependencies
- DEC-0010 accepted
- PLN-0020 review completed or otherwise stable enough for UI integration
Risks
- UI may accidentally permit FE mutation if command enablement and editor mutability diverge
- save flow could become split-brained if some callsites bypass editor-local commands
- warning/status surfaces may drift if they are implemented independently