feat(studio): restore project selection and loading flow
Restore the project launcher, creation wizard and loading shield with UI2 components. Coordinate real opening phases, a one-second minimum, pending session cleanup and per-project window geometry while retaining the Play slice. Keep global presentation controls in the project window, make the launcher frame resize with its window and prevent root run from chaining the foundation demo after the product exits. Update desktop/installed probes and documentation. Register the existing native bundle after capacity qualification, without changing native binaries or bypassing the execution guard. Validated with unit, desktop, native Play, headless, save, MCP and installed connector gates. Human-tested and accepted under WRK-0018.
This commit is contained in:
@@ -169,6 +169,31 @@ environment, scaffolding/preparation and JavaFX startup.
|
||||
|
||||
### Integrated Play
|
||||
|
||||
The product starts with a separate project launcher. Add selects a `prometeu.json`
|
||||
and remembers the project without opening it; Forget removes only the reference.
|
||||
New Project opens a five-step wizard using the language catalogue. Successful
|
||||
creation opens the project through the same shield as an existing project. The
|
||||
shield follows actual opening steps and remains visible for at least one second,
|
||||
counted in parallel with preparation. Opening a project does not compile or start
|
||||
the game. Closing its window stops execution and returns to the launcher.
|
||||
|
||||
The launcher inherits presentation preferences and has no language, theme,
|
||||
typeface or scale controls. Closing it exits Studio. `./gradlew run` at the root
|
||||
launches only the product; the independent shell/gallery require their explicit
|
||||
module commands and do not run after the product closes.
|
||||
|
||||
Qualify these windows without a native runtime using disposable projects and
|
||||
isolated presentation storage:
|
||||
|
||||
```bash
|
||||
./gradlew :prometeu-app:studioProjectsDesktopTest
|
||||
```
|
||||
|
||||
Scene captures and environment metadata are written to
|
||||
`prometeu-app/build/projects-desktop-captures`. This gate covers the catalogue,
|
||||
wizard, appearance, geometry, failure feedback and late-session cleanup; the
|
||||
separate Play gates below exercise the native process and game lifecycle.
|
||||
|
||||
Requires a desktop environment and an installed native runtime:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -9,9 +9,14 @@ The normal `prometeu-app` launcher and managed installation MUST use
|
||||
development entry points. The previous frontend is retained for existing adapter
|
||||
qualification; its workspaces are not mounted in the new product.
|
||||
|
||||
Startup MUST show known projects and an action to open an existing project
|
||||
directory. A project MUST be closed before another can open. Closing returns to
|
||||
the chooser. Startup MUST NOT automatically restore the previous project.
|
||||
Startup MUST show a separate compact project launcher with known projects and
|
||||
actions to add an existing `prometeu.json`, open, forget and create a project.
|
||||
Opening MUST hide the launcher and present a separate loading shield; the project
|
||||
window MUST appear only after preparation and the minimum shield duration.
|
||||
A project MUST be closed before another can open. Closing returns to the
|
||||
launcher after execution and session cleanup. Startup MUST NOT automatically
|
||||
restore the previous project. Project-window geometry MUST be restored per
|
||||
project through the neutral window-state port.
|
||||
|
||||
This slice exposes Play, Pause, Resume, Stop, a game viewport, and bounded logs.
|
||||
It MUST NOT initialize an AI client or editor/LSP infrastructure when opening for
|
||||
@@ -19,11 +24,70 @@ Play. Existing headless, MCP, evidence, tests and agent contracts remain availab
|
||||
through their existing entry points and services. Their preservation takes
|
||||
precedence over interactive convenience.
|
||||
|
||||
Project creation UI, editors, workspaces, AI prompts, tuning during Play,
|
||||
Editors, workspaces, AI prompts, tuning during Play,
|
||||
breakpoints, hot reload, PMC builds and distribution/export are outside this
|
||||
slice. Future packaging belongs in Studio as a separate action; Play MUST NOT
|
||||
implicitly package a PMC or a distributable runtime.
|
||||
|
||||
## Project selection, creation and loading
|
||||
|
||||
The launcher MUST reuse the persisted known-project catalogue, ordered by name,
|
||||
and display name, version, language, stdlib and path. Open and Forget MUST require
|
||||
a selection; Open MUST also work by double click or Enter. Adding a manifest MUST
|
||||
validate, remember and select it without automatically opening. Forget MUST remove
|
||||
only the catalogue reference, never files. Cancelled file selection MUST leave the
|
||||
catalogue unchanged. Empty and failed states MUST provide visible feedback.
|
||||
The launcher MUST contain project selection/management and identity only, without
|
||||
global language, theme, typeface or scale controls. It MUST inherit the existing
|
||||
presentation settings; those controls belong to the project window. Closing the
|
||||
launcher MUST exit Studio without presenting an empty project/foundation shell.
|
||||
The internal project frame MUST grow and shrink with the available launcher width
|
||||
and height, allocating additional height to the project list. Smaller viewports or
|
||||
larger text scales MUST retain scrolling so project commands remain accessible.
|
||||
|
||||
The creation wizard MUST use UI2 components and preserve five steps: name,
|
||||
language/stdlib/source root, indentation/runtime details, parent location and
|
||||
confirmation. Options MUST come from `ProjectLanguageCatalog`, with Game as the
|
||||
target. Back MUST preserve input. Cancel MUST return to selection; creation and
|
||||
persistence MUST execute off the FX thread. Successful creation MUST remember and
|
||||
open the project through the common loading flow. A failed opening after creation
|
||||
MUST explain that the project exists and can be opened again. Partial creation
|
||||
MUST retain diagnostics and identify its location without deleting files as an
|
||||
automatic rollback. The catalogue's existing machine-local MCP configuration
|
||||
preparation remains available; it does not start an AI client or LSP.
|
||||
|
||||
The opening coordinator MUST expose real steps for catalogue validation,
|
||||
`openForPlay()` session acquisition, known-project persistence and FX view
|
||||
composition. The sequence MUST accommodate future steps without enabling them in
|
||||
this slice. It MUST NOT initialize the previous workspace initializer merely to
|
||||
provide the loading mechanism. Unmeasurable work MUST use indeterminate progress;
|
||||
time-driven percentages MUST NOT stand in for actual progress.
|
||||
|
||||
The shield MUST identify Studio, its version, the project and current phase. It
|
||||
MUST remain visible for at least one second, measured with a monotonic clock from
|
||||
presentation, in parallel with preparation. The project is ready when validation,
|
||||
session acquisition, required persistence and view composition succeed. If ready
|
||||
before the minimum, show completion while awaiting the remainder; if slower,
|
||||
there MUST be no additional full-second delay. This is independent of native
|
||||
runtime READY and first-frame delivery, which belong to Play.
|
||||
|
||||
Each opening attempt MUST own its pending session, timer and callbacks until
|
||||
handoff or cleanup. Failures at every step, including executor admission and FX
|
||||
composition, MUST release acquired resources before enabling another opening and
|
||||
return to selection with a visible error after the minimum. Cleanup failure MUST
|
||||
retain recovery feedback and block new openings until explicitly retried cleanup
|
||||
succeeds. There MUST be no automatic opening retry. Application exit MUST cancel
|
||||
the cosmetic delay, prevent late presentation and still release late-arriving
|
||||
sessions; cancelling a future is not proof of resource release.
|
||||
|
||||
IO, session teardown and operation waits MUST stay off the FX thread. Window
|
||||
transitions MUST NOT accidentally exit JavaFX while all stages are hidden.
|
||||
Launcher, wizard, shield and project MUST share UI2 theme, locale, typeface and
|
||||
scale, with scrolling as needed to keep commands accessible. The launcher MUST
|
||||
request application exit when closed; closing the project window MUST request
|
||||
project closure and return to selection under the existing Stop/save rules.
|
||||
Timers, views and appearance subscriptions MUST be disposed with their owners.
|
||||
|
||||
## Preparation, process and authority
|
||||
|
||||
Play MUST reuse the compiler/Packer/Shipper preparation pipeline to produce the
|
||||
@@ -143,6 +207,12 @@ called end-to-end input latency or physical scanout latency. CPU/heap observatio
|
||||
and hardware/OS/build flavor MUST accompany performance claims. A heap-used sample
|
||||
does not prove retained-memory bounds; ownership and resource tests do.
|
||||
|
||||
`studioProjectsDesktopTest` qualifies real launcher/wizard/shield/project window
|
||||
transitions with isolated projects/preferences and filesystem catalogue services.
|
||||
It does not require or qualify native execution. Its snapshots include environment
|
||||
metadata under `prometeu-app/build/projects-desktop-captures`. Unit tests with a
|
||||
controlled clock cover fast/slow loading, failure, cleanup retry and late results.
|
||||
|
||||
Executed functional qualification includes macOS ARM64 with Java 25 and the release
|
||||
umbrella distribution produced by `runtime/scripts/local-dist.sh`, including real
|
||||
Pong Play and the deterministic headless process. Capacity qualification identifies
|
||||
|
||||
Reference in New Issue
Block a user