Skip to content

Design CommandForms with auto/manual mode, generated fields and resizable columns #556

Closed

Description

@einari

Outcome and current baseline

The current inspector is descriptor-driven but Scene has no complete column-based CommandForm designer. Reuse the shared ScreenEditorWorkspace and package designer/action host; command metadata remains the authority for fields.

Acceptance criteria

  • Select the scoped command and toggle auto mode; auto renders current command fields without manual layout.
  • In manual mode, the component exposes a Generate fields action with correct visibility/enabled state and deterministic non-destructive behavior.
  • Use a specialized property editor to add/remove/reorder columns and configure widths; drag command fields among columns and resize widths directly on the design surface.
  • Canvas edits and properties stay synchronized with the canonical Scene model, exposure, validation and undo/redo; handle command schema changes explicitly.
  • Prove save/reopen, Screenplay round-trip and Stage/runtime-render equivalence for a custom two-column form.

References and dependencies

Part of Cratis/Scene#7.

Blocked by

Blocks

Activity

  1. self-assigned this
    on Oct 8, 2026
  2. added
    releaseRequired for the Studio release
    screensScreens release delivery
    on Oct 8, 2026
  3. einari commented on Oct 8, 2026

    @einari
    ContributorAuthor

    Implementation plan

    Screens release: Cratis/Scene#7.

    Prerequisites: Cratis/Scene#71, Cratis/StudioIssues#156.

    1. Implement the CommandForm package designer through the generic extension host, exposing command selection and auto/manual mode from shared descriptors.

    2. Add a columns property editor and canvas drop/resize targets; connect both to the same canonical edits and native Scene form preview.

    3. Expose Generate fields through contextual action availability, with deterministic insertion and explicit handling of existing custom fields.

    4. Test keyboard and pointer editing, undo/redo, inherited settings, command changes, save/reopen and full runtime/render round trips.

    Completion evidence: link implementation PRs and the tests/results for every checkbox under ## Acceptance criteria; keep release dependency links current. This is a proposed implementation plan, not a claim that the work or tests have already run.

  4. einari commented on Oct 12, 2026

    @einari
    ContributorAuthor

    Final conformance refresh (2026-10-12). Public vector: CLI 3.53.1 (latest) + cratis/stage:4.73.1 + Screenplay 4.137.0 + corpus Cratis.Screenplay.CanonicalCorpus 4.139.0, via run-public-acceptance.sh: live-Stage browser PASSED 76 assertions / 0 blockers (60 + 16 history/guarded assertions added by Screenplay#671, merged), render-audit PASSED (62 artifacts byte-identical and portable, CLI-RENDER-007/008 refusals exit 5, stale managed artifact refused, 45 declarations recovered), MCP transcript PASSED (38 tools, stale apply refused, apply, reopen). Generated React on the same CLI/Stage pair: 70 passed / 0 blockers. Local Studio (Playwright screen-editor-dom): 18/18. Production Studio 0.157.7 scratch vector: save PASS, export PASS (lossy), import PASS (lossy, STUDIO0026), Play chrome PASS, Play content blocked (no Stage pod schedulable: cluster CPU).

    Not closing. Delivered: command form geometry authoring (#1621: manual mode, layout, undo/redo, save, reopen), a command form element that owns its command and form editor shown only on selection (#1651, #1685; properties-panel-selection-scope.spec.ts), design-time Generate fields in Scene.

    Remaining gaps: 'prove ... Screenplay round-trip and Stage/runtime-render equivalence for a custom two-column form' has not run (the corpus has no two-column manual form, Scene#71 gap, and Studio export currently drops forms: STUDIO0026 'forms ... not attached to a screen'); Stage/Play mapping of a commandForm's command slice id -> command name is unverified.

  5. einari commented on Oct 12, 2026

    @einari
    ContributorAuthor

    Gap run (2026-10-12). Stage/Play mapping fixed in Studio#1718: the command of an action/commandForm (slice id) is resolved to the slice's command name before export, so the plan's action and form are for RegisterOrder, not the id (C# specs when_transporting_a_command_form_element*, for_SceneCommandReferences). Two-column round trip proven: manual 2fr+240px form, 24/8 gaps, column-spanning placement through generator -> Stage scene parser -> importer; editor DOM command-form-geometry (author/undo/save/reopen). Remaining: bare component names do not travel typed (needs a design choice, see agents/wave2/gap-studio-editor.status.md).

  6. einari commented on Oct 13, 2026

    @einari
    ContributorAuthor

    Closing; the public two-column render comparison is tracked in Cratis/Screenplay#721.

    Proven: scoped command selection and auto mode; manual mode with a Generate fields action (visibility/enabled state, deterministic, non-destructive); specialized column editor for add/remove/reorder and widths, drag among columns and resize on the surface; canvas/properties synchronized with the Scene model, exposure, validation, undo/redo and command schema changes; save/reopen (Playwright command-form-geometry.spec.ts, viewport-matrix.spec.ts); Screenplay round trip and Stage mapping for a two-column form (manual 2fr+240px, 24/8 gaps, column-spanning placement through the generator -> Stage scene parser -> importer, command named for Stage not slice id: Studio#1718); a placed commandForm keeps position and siblings through Studio export -> Stage Play on production (Studio#1727, Stage #363).

    Not shown (Screenplay#721): the custom two-column form rendered and compared on live Stage and generated React.

    Final public acceptance (2026-10-13), run-public-acceptance.sh against the newest public releases: CLI 3.59.0 (Homebrew cratis 3.59.0) + cratis/stage:4.92.0 (the CLI default; Stage 4.93.0 is published too) + Screenplay 4.153.0 with Cratis.Screenplay.CanonicalCorpus 4.153.0 (read from the NuGet package) + Scene 4.22.1 (npm + NuGet) + AI 7.46.0 + production Studio 0.170.1 (core 2/2 ready):

    • live-Stage browser: passed, 81 assertions, 0 blockers; render-audit: passed (62 artifacts byte-identical across two renders and portable, CLI-RENDER-007/008 refusals); MCP stdio transcript: passed (41 tools, stale apply refused, apply, reopen); production Studio scratch vector: passed, 14 steps (corpus ZIP imported with 0 compiler notes, board drew, a layout authored/saved/survived reload, Screenplay file + folder export, Play rendered the application on a Stage pod with no unresolved component, Stop restored the chrome, scratch project deleted).
    • Studio export vs the published corpus: 0 of 290 corpus lines absent.
    • Evidence (kept with the screens-release worktree): agents/wave2/closer2-evidence/public-acceptance-cli-3.59.0/.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

releaseRequired for the Studio releasescreensScreens release delivery

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions