editor workspace foundation

This commit is contained in:
2026-03-31 00:43:58 +01:00
parent 868006dd6b
commit 3a3bd407ce
6 changed files with 2 additions and 865 deletions
@@ -1,130 +0,0 @@
---
id: PLN-0012
ticket: studio-code-editor-workspace-foundations
title: Propagate DEC-0008 into Studio shell and workspace specs
status: done
created: 2026-03-30
completed: 2026-03-30
tags:
- studio
- editor
- specs
- read-only
---
## Objective
Propagate DEC-0008 into the normative Studio spec surface so the read-only first wave of the `Code Editor` workspace is explicit before or alongside implementation.
## Background
DEC-0008 locks the first `Code Editor` wave as a read-only editorial foundation with:
- `Project Navigator` over the full project,
- reserved `Outline` region,
- responsive tab strip with overflow,
- read-only file opening,
- passive helper region,
- passive status bar,
- manual refresh only,
- and explicit deferral of save/dirty/LSP/semantic behavior.
The current Studio spec corpus defines shell-level workspace presence and shared UI foundations, but it does not yet define the concrete contract of the `Code Editor` workspace itself.
## Scope
### Included
- Add a dedicated `Code Editor` workspace specification to the Studio spec corpus.
- Update Studio spec navigation so the new chapter is discoverable.
- Align shell/foundations references so DEC-0008 terminology is consistent with existing Studio norms.
### Excluded
- Java implementation changes in `prometeu-studio`.
- LSP or semantic-provider contract design.
- Editable-mode design, save behavior, or conflict-resolution policy.
## Execution Steps
### Step 1 - Add a dedicated Code Editor workspace specification
**What:**
Create a new Studio spec chapter that normatively defines the read-only `Code Editor` workspace baseline from DEC-0008.
**How:**
Add a new chapter under `docs/specs/studio/` covering:
1. workspace layout,
2. `Project Navigator` ownership and full-project visibility,
3. reserved `Outline` region,
4. responsive tabs with overflow,
5. read-only file opening,
6. unsupported-file modal behavior,
7. passive helper region,
8. passive status bar fields,
9. manual refresh,
10. and deferred scope for save/LSP/semantic features.
**File(s):**
- `docs/specs/studio/5. Code Editor Workspace Specification.md`
### Step 2 - Update Studio spec navigation and cross-references
**What:**
Make the new spec reachable from the Studio spec index and aligned with the current corpus order.
**How:**
Update the Studio README reading order and current-corpus list to include the new chapter.
Add or adjust cross-references where shell/foundations specs should point to workspace-local ownership rather than implying global responsibility.
**File(s):**
- `docs/specs/studio/README.md`
- `docs/specs/studio/1. Studio Shell and Workspace Layout Specification.md`
- `docs/specs/studio/2. Studio UI Foundations Specification.md`
### Step 3 - Align terminology and deferred-scope language
**What:**
Ensure the spec corpus consistently uses DEC-0008 language for the first editor wave.
**How:**
Normalize references to:
1. read-only first wave,
2. passive helper and `Outline` placeholder,
3. manual refresh,
4. and explicit deferral of semantic/LSP features and save/write behavior.
**File(s):**
- `docs/specs/studio/5. Code Editor Workspace Specification.md`
- `docs/specs/studio/1. Studio Shell and Workspace Layout Specification.md`
- `docs/specs/studio/2. Studio UI Foundations Specification.md`
## Test Requirements
### Unit Tests
- No Java unit tests are required for this editorial plan.
### Integration Tests
- No runtime integration tests are required for this editorial plan.
### Manual Verification
- Verify the new spec chapter is listed in `docs/specs/studio/README.md`.
- Verify the new chapter matches DEC-0008 exactly on read-only scope, manual refresh, and deferred LSP/save behavior.
- Verify shell/foundations wording does not contradict workspace-local ownership defined by the new chapter.
## Acceptance Criteria
- [ ] The Studio spec corpus contains a dedicated `Code Editor` workspace specification.
- [ ] The spec explicitly states that the first wave is read-only and excludes save/dirty/LSP/semantic behavior.
- [ ] The spec defines the baseline layout: navigator, reserved outline region, responsive tabs, editor body, passive helper, passive status bar.
- [ ] Studio spec navigation and cross-references are updated to make the new chapter discoverable and consistent.
## Dependencies
- DEC-0008 accepted content.
## Risks
- A too-light writeup could leave implementation inventing behavior that DEC-0008 already closed.
- Over-editing shell/foundations docs could blur shell-owned versus workspace-owned responsibilities.
@@ -1,123 +0,0 @@
---
id: PLN-0013
ticket: studio-code-editor-workspace-foundations
title: Implement the read-only Code Editor workspace shell and passive surfaces
status: done
created: 2026-03-30
completed: 2026-03-30
tags:
- studio
- editor
- implementation
- layout
- ui
---
## Objective
Replace the current hardcoded `EditorWorkspace` with the DEC-0008 read-only workspace shell: left navigator column with reserved `Outline` region, central tab/editor area, passive helper region, and passive status bar.
## Background
The current `EditorWorkspace` is only a `CodeArea` mounted under a toolbar.
DEC-0008 requires a stable read-only composition that reserves future surfaces without implementing semantic or writable behavior yet.
## Scope
### Included
- Recompose `EditorWorkspace` into the DEC-0008 structural layout.
- Introduce passive placeholder surfaces for `Outline`, helper, and status bar.
- Replace write-oriented/editorially misleading controls with a first-wave read-only shell.
- Keep the central editor body ready to host read-only opened file content.
### Excluded
- Project-tree scanning and refresh logic.
- Actual file opening/session state orchestration beyond the minimum shell integration points.
- Save, dirty tracking, write controls, or semantic/LSP behavior.
## Execution Steps
### Step 1 - Replace the current EditorWorkspace composition root
**What:**
Turn `EditorWorkspace` into a composition root that mounts the DEC-0008 layout instead of a single hardcoded `CodeArea`.
**How:**
Refactor the current border-pane structure into explicit regions:
1. left column for navigator + reserved outline region,
2. central work area for tab strip + read-only editor body,
3. bottom helper placeholder,
4. bottom status bar.
Prefer dedicated controls/panels over one large monolithic workspace class.
**File(s):**
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspace.java`
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/`
### Step 2 - Introduce passive placeholder controls
**What:**
Add concrete passive UI surfaces for the reserved regions required by DEC-0008.
**How:**
Create lightweight controls/panels for:
1. reserved `Outline` region,
2. passive helper region,
3. passive status bar,
4. and the tab-strip shell.
These controls should be visually real, but functionally passive where DEC-0008 says behavior is deferred.
**File(s):**
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/`
### Step 3 - Align editor chrome with read-only first-wave scope
**What:**
Remove or neutralize UI affordances that imply writable/editor-semantic behavior not present in this wave.
**How:**
Review the current toolbar and shell-level controls so the first-wave editor does not imply:
1. save,
2. run/build from inside the editor,
3. active outline,
4. or helper-driven functionality that does not exist yet.
If a control must remain for layout reasons, make it visually passive and consistent with DEC-0008.
**File(s):**
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorToolbar.java`
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/`
## Test Requirements
### Unit Tests
- Add focused tests for any pure layout/session-state model extracted from the workspace shell composition.
- If dedicated status/tab placeholder models are introduced, cover their default state with unit tests.
### Integration Tests
- No JavaFX full integration harness is required as a prerequisite for this plan.
### Manual Verification
- Verify the workspace visually matches DEC-0008 layout.
- Verify the left column contains navigator + reserved outline region.
- Verify the helper and status bar are present but passive.
- Verify no visible control implies save/write behavior in the first wave.
## Acceptance Criteria
- [ ] `EditorWorkspace` is no longer a single hardcoded `CodeArea` view.
- [ ] The workspace visibly contains navigator, reserved outline region, central tab/editor area, helper placeholder, and status bar.
- [ ] The first-wave shell is visually coherent with DEC-0008 read-only scope.
- [ ] Placeholder surfaces are present without implying semantic or writable functionality.
## Dependencies
- DEC-0008 accepted.
- PLN-0012 should land first or in parallel if the wording is stable.
## Risks
- If the composition stays monolithic, later navigator/session work will be harder to integrate cleanly.
- Leaving write-oriented controls visible would immediately contradict DEC-0008 and confuse later implementation waves.
@@ -1,148 +0,0 @@
---
id: PLN-0014
ticket: studio-code-editor-workspace-foundations
title: Implement the Project Navigator snapshot and read-only file opening flow
status: done
created: 2026-03-30
completed: 2026-03-30
tags:
- studio
- editor
- implementation
- navigator
- tabs
---
## Objective
Implement the DEC-0008 operational core of the first `Code Editor` wave: full-project navigator snapshot, manual refresh, opening files into responsive tabs, read-only buffers, and unsupported-file modal behavior.
## Background
DEC-0008 requires the editor to operate over the full project, maintain an in-memory structural snapshot for the navigator, tag frontend-relevant roots using `prometeu.json`, and open supported files into read-only tabs without save/dirty/merge behavior.
The current codebase already includes project services such as `ProjectReference`, `ProjectLanguageCatalogService`, and `ProjectStudioPaths`, but the editor workspace does not yet use them to build a real project tree or manage open files.
## Scope
### Included
- Build a structural project-tree snapshot model for the navigator.
- Add initial and manual refresh behavior.
- Open supported files into read-only tabs.
- Keep opened-file content in memory for the active session only.
- Show a simple modal for unsupported/non-text files.
### Excluded
- Save, dirty tracking, write flows, or merge/conflict resolution.
- Watcher-driven automatic refresh.
- Semantic/LSP integration.
- Cross-session restoration of tabs or tree state.
## Execution Steps
### Step 1 - Implement the Project Navigator structural snapshot
**What:**
Create a structural project-tree model that covers the full project and the DEC-0008 ordering/tagging rules.
**How:**
Introduce a navigator snapshot service/model that:
1. scans all project files and directories, including hidden files,
2. orders folders before files and sorts alphabetically,
3. derives frontend-relevant tags from `prometeu.json` and the selected frontend,
4. and keeps filesystem truth outside the in-memory snapshot itself.
**File(s):**
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/`
- `prometeu-studio/src/main/java/p/studio/projects/ProjectLanguageCatalogService.java`
- `prometeu-studio/src/main/java/p/studio/projects/ProjectReference.java`
- `prometeu-studio/src/main/java/p/studio/projects/ProjectStudioPaths.java`
### Step 2 - Wire refresh behavior into the navigator shell
**What:**
Support the refresh model closed by DEC-0008.
**How:**
Ensure the navigator:
1. performs one initial refresh when the workspace loads,
2. exposes a manual refresh button directly on the navigator surface,
3. and never assumes watcher-based automatic refresh in this wave.
**File(s):**
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/`
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspace.java`
### Step 3 - Implement read-only file opening and tab session state
**What:**
Open supported files into read-only tabs while keeping session state in memory only for the current Studio run.
**How:**
Add editor session models/services that:
1. open a new tab when the selected file is not already open,
2. keep the active tab visible in the responsive tab strip,
3. label tabs with file name plus extension only,
4. load supported text file contents into read-only editor buffers,
5. and keep tab/tree state session-local only.
**File(s):**
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/`
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/EditorWorkspace.java`
### Step 4 - Handle unsupported files explicitly
**What:**
Reject unsupported/non-text file opening through the UX rule closed by DEC-0008.
**How:**
When a navigator selection targets an unsupported file type, show a simple modal stating that the file is not supported in this wave instead of trying to fake a preview or partially open it.
**File(s):**
- `prometeu-studio/src/main/java/p/studio/workspaces/editor/`
## Test Requirements
### Unit Tests
- Add unit tests for the structural project-tree snapshot model:
- hidden-file inclusion,
- folder-before-file ordering,
- alphabetical ordering,
- frontend-root tagging.
- Add unit tests for any editor tab/session model extracted from the UI layer:
- open-new-tab behavior,
- no duplicate tab on reopening the same file,
- label formatting,
- session-local state behavior.
### Integration Tests
- No full JavaFX integration harness is required, but any extracted coordinator/service should be exercised through focused tests where possible.
### Manual Verification
- Verify the navigator shows the full project, including hidden files.
- Verify the manual refresh button rebuilds the tree on demand.
- Verify supported text files open read-only in tabs.
- Verify unsupported files trigger the simple modal.
- Verify no save/dirty/write affordance appears in the resulting flow.
## Acceptance Criteria
- [x] The editor has a structural navigator snapshot that covers the whole project and tags frontend-relevant roots.
- [x] The navigator performs initial refresh and supports manual refresh without watcher dependency.
- [x] Supported files open into read-only tabs with responsive/overflow behavior preserved.
- [x] Unsupported files trigger a simple modal instead of a partial preview.
- [x] Opened-file content and visual tab state remain session-local only.
## Dependencies
- DEC-0008 accepted.
- PLN-0012 should land first or in parallel if naming/spec wording is stable.
- PLN-0013 should land before or alongside this plan because navigator and tabs need the new workspace shell surfaces.
## Risks
- If snapshot and tab state live only inside UI controls, the implementation will become hard to test and harder to evolve later.
- If unsupported-file handling is loose, the first wave will silently imply file-format support it does not actually have.