Add reusable UI2 conversation balloons, tool cards, native Markdown, copy actions and controlled streaming scroll. Preserve typed ACP tool updates and chat lifecycle, add Alt+Enter sending, update specifications and qualify the UI through desktop tests. Include the Pong asset cache.
Studio JavaFX 2 foundation
This frontend provides the Studio presentation foundation, project chooser and
integrated Play view used by the normal prometeu-app entry point. It consumes
neutral Studio API services and has no dependency on the previous frontend, Core,
concrete runtime/provider adapters or MCP. The standalone shell/gallery remain
independent developer demonstrations without a project/backend.
Requires Java 25; Gradle selects Java 25 and JavaFX 23.0.2 for the module.
From the Studio repository:
./gradlew :prometeu-studio-ui-javafx-2:run
./gradlew :prometeu-studio-ui-javafx-2:gallery
The standalone shell contains identity, presentation selectors and an empty central area. The product uses a separate project launcher, creation wizard and loading shield, then mounts Play in its project shell. The separate development gallery demonstrates components, validation, progress, both fonts and configurable text scale. Gallery actions operate on sample text only.
The product project chooser contains identity, the project list and project
commands and access to Prometeu Studio > Preferences. The brand appears only in
that menu, without a second identity block in the chooser. It inherits presentation settings;
appearance selectors and the default runtime live in that separate dialog.
Project > Settings contains a nullable runtime override and save media choices.
The project shell places global Play/Stop and Pause/Resume controls on the right above a Gameplay
tab, alongside the left-aligned Prometeu Studio menu and golden-square mark. A small
project header and equally sized contextual footer frame the workspace. The product
workspace is plain, with balanced top/bottom margins; the standalone foundation
keeps its decorative panel. Native tabs
use stepped upper corners, an open flat base and Studio theme colors; Gameplay supplies scale information to the
footer and owns automatic/manual image scaling, not execution lifetime. From the repository root, an
unqualified run starts the product and skips the foundation demo. The gold tab
outline encloses the content; Gameplay splits game and logs with a draggable
horizontal divider. Automatic scale follows this resize, while manual scale stays
fixed. Header/footer remain outside the split. Launch the
foundation with the explicit module command above (or from that module directory).
./gradlew :prometeu-studio-ui-javafx-2:test
./gradlew :prometeu-studio-ui-javafx-2:desktopTest
./gradlew :prometeu-studio-ui-javafx-2:installDist
./gradlew :prometeu-app:studioProjectsDesktopTest
desktopTest requires a desktop session and opens temporary windows. It exercises actual JavaFX behavior and writes PNG captures with environment metadata under build/desktop-captures. Normal unit tests do not require a display. Clipboard testing replaces clipboard content with a test string. Preference tests use an isolated disposable node rather than application preferences.
The generated launcher is build/install/prometeu-studio-ui-javafx-2/bin/prometeu-studio-ui-javafx-2; pass --gallery to open the gallery. This development distribution uses an available Java installation, unlike the existing product installation's bundled runtime.
Components and ownership
AppearanceContext belongs to one window. Construct it with initial PresentationSettings, loaded Messages and FontResources, and a persistence consumer. Attach it to the window root. Views own their children; the context owns their presentation subscriptions and removes them on close(). Do not reuse a closed context. Settings updates and composition run on the FX thread.
| Component | Contract |
|---|---|
StudioText |
Localized label with wrapping and optional title role in the visual hierarchy. setLabelFor associates input labels. |
StudioIcon |
Decorative vector pixel mark; put meaningful names on the action or container that uses it. |
StudioButton |
Native Button actions, focus/default-button APIs and enabled/armed behavior; optional primary appearance. |
StudioToggle |
Native ToggleButton selection and accessibility. |
StudioTextField |
Native editing, clipboard and IME path; setError controls appearance and must accompany explanatory feedback. |
StudioSelect<T> |
Native, non-editable ComboBox with localized cells, context-owned selection connection and themed popup. |
StudioPanel |
Resizable content frame with stepped vector geometry and layered bevel colors. |
StudioFeedback |
Localized parameterized message/error and optional determinate progress. |
Fields retain their contents when theme, locale, typeface or scale changes. Geometry follows each Region's actual layout size, rather than stretching a low-resolution image. JavaFX native controls and skins retain interaction semantics; there is no all-Canvas widget toolkit.
Semantic theme colors are in styles/dark.css and styles/light.css. Component geometry/state styles are in styles/components.css. AppearanceContext sets inherited family and size from the centralized presentation settings. There is no third-party control library in this slice.
Preferences and localization
UserSettingsStore uses the Java Preferences node p/studio/ui/javafx2 for theme, language, bundled typeface and text scale (75–200%). Startup uses dark, Departure Mono and 100%; a supported system locale chooses pt-BR, otherwise English. Invalid individual values fall back independently with diagnostics.
Load preferences and font/bundle resources before composing views. SettingsPersistence debounces writes on its worker, flushes the last choice asynchronously on close, and shuts the worker down. It never writes from the FX thread. WindowStateStore persists launcher and per-project normal geometry plus maximization. Geometry snapshots are stabilized on FX and written serially off FX, with orderly close awaiting pending writes. Placement considers the matching monitor and recovers onto an available display. Previous frontend presentation preferences are not migrated.
All interface messages live in UTF-8 messages_en.properties and messages_pt_BR.properties. Missing translations diagnose and fall back to English; an absent English key displays [key]. Bundle parity is checked by unit tests. Dynamic feedback retains its key/arguments and is reformatted on locale changes; user-authored text retains its value.
Fonts and licenses
- Departure Mono 1.500: default, monospaced pixel design. Source:
rektdeckard/departure-mono, revision75152a3f1e6dacdd248a6c397c97dbf27e33eea0. - Roboto Mono Regular: bundled alternative. Source:
googlefonts/RobotoMono, revision7bf0b33178844cc7d0c9915b746ece1be7f46bea.
Both font files load from local classpath resources. Their full copyright/SIL OFL 1.1 notices are under src/main/resources/p/studio/ui/javafx2/fonts/*-LICENSE.txt, inside the application jar and in the installed distribution's licenses/ directory. No system font installation or network request is required. A failed font load diagnoses and uses Monospaced; JavaFX supplies fallback glyph rendering.
The default 16.5 logical pixel size was checked on a macOS display reporting 2× output scale. Departure's 11 px grid does not guarantee pixel-perfect rendering at every fractional output/text scale. Alternative family/scale are presentation choices rather than fixed assumptions inside views. Future editors may choose their own documented text roles.
Validation boundaries
Unit tests verify preference codecs/storage, asynchronous final persistence, locale fallback and bundle parity, font/license packaging and semantic contrast pairs. Desktop qualification exercises actual selectors/popups, dynamic feedback, clipboard, Tab traversal, input retention, both themes/locales/fonts, minimum width, repeated appearance changes and reopening with new contexts.
The initial desktop target is macOS. Snapshot PNGs are logical scene captures; metadata records actual output scale, but these captures do not themselves prove physical-pixel sharpness at every scale. Windows/Linux, a screen-reader walkthrough and native multi-step IME input remain environment-specific manual qualification. Preserving JavaFX semantics is not a claim that those checks were completed.
The launcher supports known-project selection, manifest addition, opening,
forgetting and a five-step new-project wizard through neutral API ports. Loading
uses observable real steps and a one-second minimum counted in parallel; pending
sessions and late results remain owned until presentation or cleanup. A failed
cleanup blocks a replacement opening and offers an explicit cleanup retry.
closeAsync() completes after coordinated session and presentation teardown;
callers must await it off the FX thread before shutting down their worker pool.
The project shell also includes the AI workspace: a left chat manager, conversation log and editable prompt. The right-hand footer icon opens a compact prompt from other tabs, with a chat selector, New chat and actions menu. Its native divider resizes the panel without covering the content. The same compositor moves into the AI tab; there the footer icon focuses it. Text survives tab changes, collapse and presentation changes, and is discarded when the project closes. The footer icon is the only open/collapse control and remains highlighted while the prompt is visible. Starting Play collapses the drawer while preserving the text. Tab headers share a uniform width that follows the longest current title and the active presentation settings. Studio preferences show AI / ACP, Codex and ChatGPT login only.
Both managers support local chats: create/select, rename and confirmed delete. They share one active conversation, with an independent text draft per chat. A project opens without chats; create one to enable writing. Renaming keeps the draft and identity, and deleting selects the next/previous remaining chat. Cancelling a dialog leaves the chat unchanged. All chats and drafts are temporary and are discarded on project close, including any open chat dialog. Reopening starts empty.
Prometeu Studio > Preferences > AI / ACP saves one non-secret executable and
literal argument vector for every project in ~/.prometeu-studio/ai-settings.json.
Project settings do not contain ACP configuration. Legacy acp fields in project
setup are ignored and omitted by later setup writes; runtime/save/indentation and
MCP intent remain intact. An arbitrary project never becomes the global default.
Install the pinned adapter once, from the Studio repository:
bash scripts/install-codex-acp.sh
The installer needs a working Node.js 22+ and npm for initial installation. It stages
@agentclientprotocol/codex-acp@2.9.0 under
~/.prometeu-studio/agents/codex-acp/2.9.0 and publishes the stable launcher
~/.prometeu-studio/bin/codex-acp. It selects a working Node, checks common NVM
locations and embeds its absolute path/PATH so desktop launch does not depend on
your terminal environment. STUDIO_NODE_BIN can explicitly select Node;
STUDIO_NPM_CLI can select npm-cli.js. A compatible installed Codex 0.171.x is reused;
otherwise the adapter uses its package dependency. The installer preserves a custom
global preference and refuses to replace an unmanaged launcher. It does not modify
system Node/npm, project files or ChatGPT login. Re-running the installer reuses the
pinned installed package. No npx or temporary launcher is needed at runtime.
Opening a project automatically connects the installed adapter using these shared settings and that project's root as cwd. An existing Codex ChatGPT login is reused. Without a login, open Studio preferences and explicitly sign in; no browser opens automatically. Connection and login actions operate on the opened project's process; settings can also be saved from the launcher. Changes apply at the next connection. Sessions and drafts remain isolated by project. Sending creates one session per chat, opens AI and streams its response into that chat even when selection changes. One request runs per project. Cancel waits for termination; deleting a running chat or closing the project first cancels it. Permission requests require an explicit choice. Transport/process ownership live in the application behind a neutral Studio API port.
The draft clears only after agent progress or successful completion, and only if it still matches the sent text. A rejection retains it; Recover last request copies the last submitted text only into an empty draft. After connection loss, old conversations remain readable but require a new chat to send after reconnection. Studio chats remain temporary; the agent may keep separate history. Loading that history and asset attachment are disabled. Creating/selecting/renaming local chats does not start ACP or authenticate. The contract is AI workspace presentation. The execution contract is Codex ACP integration. The opt-in real gate sends a minimal no-tools prompt using an existing ChatGPT login in a disposable directory; it does not open browser login:
./gradlew :prometeu-app:test --tests p.studio.app.acp.CodexAcpConnectionTest
./gradlew :prometeu-app:codexAcpSmoke
# Optional existing-project handshake, without prompts or tools there:
./gradlew :prometeu-app:codexAcpSmoke -PstudioCodexProject=/absolute/path/to/project
No editor host, asset authoring, debug or shipping view is mounted in this product. Native Play remains behind the execution API.