Add direct diagram connections, movable ports, and contextual authoring

This commit is contained in:
2026-09-06 02:13:49 +03:00
parent 35133de650
commit fef2e0dbce
39 changed files with 7076 additions and 499 deletions
+3
View File
@@ -35,3 +35,6 @@
- Recovery state is independent of source diagnostics. Interrupted Save All journals remain discoverable after lint, typing, missing entry files or first-save failure. Recovery validates current bytes against known transaction states; it does not promise atomic multi-file visibility or cross-process filesystem locking. Source/property draft guards prevent one representation from silently replacing pending edits in the other.
- Production source3 nesting expresses semantic element ownership only. Extend the existing parser and source index with real lexical owners/body spans, rather than adopting the experiment's parallel parser. Flat canonical interchange remains valid. Structural writeback composes declaration pieces after ordinary token edits and uses original occurrence provenance through temporary UUID collisions. This preserves independent parent/child moves, authored files, comments and exact history while allowing new children to be emitted inside their owners. Allocation and ordered occurrence membership remain explicit.
- A hosted revision owns the accepted model and stabilized source bundle together. Store one atomic envelope, use the same core writer for commands and previews, and advance the ETag for comment-only edits. Old model-only envelopes acquire deterministic source in memory without a read-time write or revision change. A detached source sidecar would create inconsistent revisions and unsafe restart behavior. Accepted model equality alone is insufficient for a no-op when command provenance deletes/recreates a declaration; this was reproduced and corrected in desktop and REST adapters.
- Contextual actions use a controlled Iced overlay and captured semantic target plus document/revision/view context. Menus reuse existing handlers, and opening a menu does not select/apply another draft. Canvas focus scopes routing keys; Actions is an accessible alternative to right-click. Source files use a folder tree with exact paths and aggregate draft/diagnostic markers.
- Port anchors are per-placement presentation records with four sides and normalized offsets. Automatic sides use port direction and visible peer geometry; explicit anchors do not change owner minimum dimensions. Canvas, routing, Fit and SVG share projected anchors and side normals. Graphical reparent batches old-owner anchor cleanup with semantic reparent; raw source and API remain strict and require explicit repair.
- Direct connections use explicit Select/move and exchange palette tools. Compatible visible endpoints are highlighted; click-click or drag creates one ordinary validated command. Function-card gestures use the existing automatic port planner. Tool invocation, blank-canvas restart, Escape and model/view changes invalidate old gesture contexts. No project clone or whole-model compile occurs per highlighted candidate; final commit still validates the complete model/source change.
+3 -1
View File
@@ -14,7 +14,9 @@ The current forms are a closed typed-record adapter, not a second metamodel. Exp
## Milestones and measurable acceptance
Nested source ownership and persistent REST bundles are implemented and under final native acceptance. Per-file repair/recovery passed at 1100×700; production parsing, exact structural writeback and coupled service revisions passed independent review and Windows/Linux suites. Root's Windows nested reparent/source/Undo/Redo/Save/reopen passed; minimum-size source-to-graphics review and rebuilt Linux trial remain. Preserve the existing grammar/updater and separate allocation/order semantics. Next, use the updated direct-state core/desktop maps to freeze one small persisted-canvas contract before implementation.
Nested source ownership and persistent REST bundles are implemented and verified: Windows minimum-size source-to-graphics, nested reparent/source/Undo/Redo/Save/reopen, recovery, rebuilt Linux source/history/Save/reopen, independent review and both platform suites passed. Preserve the existing grammar/updater and separate allocation/order semantics.
Current user-directed sequence: finish native contextual-menu/source-tree acceptance; then ship draggable per-placement port sides and intelligent automatic placement; then direct diagram connection tools for OA interactions, functional exchanges and boundary exchanges. Port placement is presentation state, and drawing an exchange uses the existing typed semantic command boundary. Select/move and Connect are explicit modes; connection targets highlight only compatible visible endpoints. A completed drag commits once, retains text/REST parity, and supports Undo/Redo/Save/reopen. Verify all four port sides, nested owners, routing/pins, compatible and incompatible endpoints, zoom, Escape, stale gestures, and minimum Windows/Linux layouts. The independently tested state-core slice is preserved in its worktree until these latest usability priorities are integrated; all broader release milestones remain required.
The user-directed actor/system port and model-navigation milestone is accepted: visible Add port → Connect boundary exchange, grouped roots, focused containment, breadcrumbs, contextual search and paging, clear full-depth outline, and separate allocations. Native Windows authoring/save/reopen, 251-root paging, 12-level navigation, 1440×900/1100×700 inspection, rebuilt Linux save/reopen and single-line font correction passed. Independent requirements, correctness, native UI and simplicity findings are addressed; release-explorer-usability.md records exact evidence and remaining performance boundaries. Resume source recovery acceptance and the release milestones below; the full scope remains intact.
+20 -11
View File
@@ -8,18 +8,18 @@ The editable connection-routing milestone is accepted at `23535b4` with viewport
## Completed foundations
Nested source/REST integration checkpoint: production parser and iterative structural writer are implemented; REST persists the accepted bundle and model in one ETag envelope. Final workspace runs passed 422 Windows and 425 Linux tests; strict workspace Clippy, formatting and Windows/Linux builds passed. Actual server import, comment-only revision, cross-file reparent, stale ETag and exact restart/conditional GET passed. Owner-opening-line comment reassignment and equal-model delete/recreate provenance defects were reproduced, fixed and reverified. Independent parser/writer/model-source boundary reviews found no remaining material findings; fresh spawn was unavailable because of the thread limit, so workers reviewed one another's artifacts. Strict language/API reST rendering passed after correcting an API heading underline. Root's Windows nested reparent/arrange/source/Undo/Redo/Save/reopen passed with 22 objects,13 links,0 checks. Independent minimum-size/source-created port QA is active; actual rebuilt Linux nesting trial remains. Evidence: release-source-integration.md.
Nested source/REST integration checkpoint: production parser and iterative structural writer are implemented; REST persists the accepted bundle and model in one ETag envelope. Final workspace runs passed 422 Windows and 425 Linux tests; strict workspace Clippy, formatting and Windows/Linux builds passed. Actual server import, comment-only revision, cross-file reparent, stale ETag and exact restart/conditional GET passed. Owner-opening-line comment reassignment and equal-model delete/recreate provenance defects were reproduced, fixed and reverified. Independent parser/writer/model-source boundary reviews found no remaining material findings; fresh spawn was unavailable because of the thread limit, so workers reviewed one another's artifacts. Strict language/API reST rendering passed after correcting an API heading underline. Root's Windows nested reparent/arrange/source/Undo/Redo/Save/reopen passed with 22 objects,13 links,0 checks. Independent minimum-size/source-created port QA passed. Root also verified Linux nested source edit/Undo/Redo/Save/reopen; the Linux instance closed normally with an empty log. Evidence: release-source-integration.md.
Current continuation: previous goal turn made concrete progress at `d364d3c` (native-verified explorer/port usability). Root reread the complete authoritative objective. Native source recovery acceptance passed: comment-preserving reopen, graphical rename/writeback/Undo, inactive-file syntax repair, mixed interrupted-save rollback, first-save recovery with retained draft/retry, and included-file repair/Save/reopen at 1100×700. The prominent recovery banner closed normally with an empty runtime log. All implementation ownership is released to root. `explorer_usability_review` alone owns native input for its bounded QA; `source_document_review` and `source_integration_map` are mapping direct-state core/desktop contracts read-only. No blocker; release scope is unchanged.
Historical start of this continuation (superseded by the active checkpoint below): nested source/REST is committed at `4e8575b`. Independent Windows source-created Standard actor port, boundary-exchange entry, Undo/Redo and Save/reopen passed at 1100×700; the isolated QA window closed normally. Linux native nesting acceptance passed (source comment/history/save/reopen and rendered hierarchy; cross-file graphical reparent was exercised on Windows). Original Windows window 6228978 contains unsaved user work: do not save, reset or close it. Root again owns native input. The state-core worker owns only oa-core in isolated worktree `D:/CodexBuilds/Capella2-state-diagram-core`, branch `codex/state-diagram-core`; root integrates after review. The latest user request prioritizes contextual right-click menus and removes permanent bend buttons. Root owns desktop integration; explorer_usability_review owns only the new reusable context_menu.rs; source_integration_map maps existing actions read-only. Native source recovery acceptance already passed; no blocker and broader release scope is unchanged.
- The user-directed explorer/port usability milestone is accepted. Add port is visible on participants, and selected component ports expose Connect boundary exchange. The browser uses grouped roots, focused direct children, breadcrumbs, paged contextual search and Locate; the outline keeps real depth, guides and single-line labels with full-name tooltips. Root created two Standard ports and a Boundary Exchange, exercised Undo/Redo, Save/reopen, duplicate-name search, 251-root paging and 12-level navigation. Independent native review and root's final Windows build passed at 1100×700; actual rebuilt Linux save/reopen and font-fix inspection passed. Full Windows workspace tests passed 382, followed by all 138 desktop tests; Linux full workspace passed 386. Strict checks and final Windows/Linux builds passed. Slow picker, stale reparent focus, deep-row cost, collapsed header sizing, scroll reset and font wrapping findings are fixed. Exact scope, hashes and evidence: release-explorer-usability.md.
- Source integration checkpoint `3c87576` passed full366 Windows tests; its draft-history cap follow-up passed122 desktop tests and strict workspace Clippy. Root ran native build SHA256 `FCA6140E835B17AE4FAB003B0DAC38D7D820DD36C7559F536BA3CC607E30FE51`: opened two included buffers, typed separate rationale comments, switched with drafts retained, Apply all, model Undo/Redo, then Save All to `ui-source-project/native-source-trial.arcadia`. The entry is1496 bytes with20 other included files; both authored comments are present on disk and the UI reports all changes saved,41objects/25links/0checks. Runtime log is empty; the window closed normally (exec session99563 exited0). Native source reopen/failure/minimum-size acceptance is still required.
- Fresh source integration review at 3c87576 reproduced property-draft loss and diagnostic-only recovery state. Both are fixed in the current app: guards retain both drafts, and durable pending_recovery survives typing/lint, missing entries and initial Save failure. Four real-journal recovery tests and source/property collision tests pass in the full workspace run. The bounded reviews are complete; all agents released file/native ownership to root. Frozen source probe evidence: D:/CodexBuilds/Capella2-source-app-independent/REVIEW.md. The explorer Linux trial additionally verified failed Save to a missing directory retained the model and successful retry saved all files; interrupted-journal UI recovery still needs native acceptance.
- Source integration checkpoint `3c87576` passed full366 Windows tests; its draft-history cap follow-up passed122 desktop tests and strict workspace Clippy. Root ran native build SHA256 `FCA6140E835B17AE4FAB003B0DAC38D7D820DD36C7559F536BA3CC607E30FE51`: opened two included buffers, typed separate rationale comments, switched with drafts retained, Apply all, model Undo/Redo, then Save All to `ui-source-project/native-source-trial.arcadia`. The entry is1496 bytes with20 other included files; both authored comments are present on disk and the UI reports all changes saved,41objects/25links/0checks. Runtime log is empty; the window closed normally (exec session99563 exited0). Those initially pending native source reopen/failure/minimum-size checks were subsequently completed at the nested-source checkpoint above.
- Fresh source integration review at 3c87576 reproduced property-draft loss and diagnostic-only recovery state. Both are fixed in the current app: guards retain both drafts, and durable pending_recovery survives typing/lint, missing entries and initial Save failure. Four real-journal recovery tests and source/property collision tests pass in the full workspace run. The bounded reviews are complete; all agents released file/native ownership to root. Frozen source probe evidence: D:/CodexBuilds/Capella2-source-app-independent/REVIEW.md. The explorer Linux trial additionally verified failed Save to a missing directory retained the model and successful retry saved all files; interrupted-journal UI recovery was subsequently verified in the source-recovery milestone above.
- Branch `codex/release1-engineering`; baseline `93ba83d`, hierarchy `c7101b9`, drag selection `2ef16dc`, typed core/schema 3 merge `757ab88`, alias and batch lifecycle corrections `e41b8de`.
- Typed desktop integration `fa096ce` provides contextual function/component ports, FE endpoint and exchange-item choices, generation, resolution, split and synchronization with semantic previews. Legacy migration, Standard/Flow distinctions and independent orientation are retained. Independent findings and native-discovered no-op synchronization and SA-only initial-perspective defects were fixed.
- Native typed-port trials created real function endpoints and exchanges, supplementary output/items, and a Standard component implementation with two port allocations and an exchange allocation. Undo/redo and save passed with zero model checks. Reviewed reopen entered SA correctly; unchanged synchronization disabled Apply. The long-reference review modal was inspected at 1440×900 and 1100×700. Evidence and fixtures are under `D:/CodexBuilds/Capella2-release1-01a06e2e/ui-typed-ports` and `ui-typed-ports-reviewed`.
- Source bundle foundation `06b3384` and token-preserving updater `dbc8971` passed 160 core tests, including 30 source-project tests, and strict core Clippy at that checkpoint. This is a pure core foundation; production editor, filesystem Save All/conflict handling and REST bundles remain to be integrated.
- Source bundle foundation `06b3384` and token-preserving updater `dbc8971` passed 160 core tests, including 30 source-project tests, and strict core Clippy at that checkpoint. This was the initial core-only checkpoint; production editor, filesystem Save All/conflict handling and REST bundles were subsequently integrated at 4e8575b.
- Isolated source authoring comparison `c5788fc` and nested writeback experiment `2dd17aa` passed 23 experiment tests and strict Clippy. An independent executable probe at `D:/CodexBuilds/Capella2-source-writeback-independent/probe.log` reproduced positional list-comment misattachment after item reorder, rejection of a valid description edit on port shorthand, and unsupported occurrence deletion. The same comment-reorder probe retained attachment in the production updater. Complete model equality alone does not protect comment meaning. Extend the production parser/span index and shared updater for selected nesting/shorthand constructs; do not copy the experiment into a parallel production parser/writer. Freeze comment ownership, exact source Undo and full edit/delete support before adoption. `experiments/source-authoring/WRITEBACK.md` retains the bounded evidence; production syntax is not yet adopted.
- R1 process topology, R2 mission/capability, R4 scenarios and R5 events/states are implemented at the semantic/form level. Full native authoring acceptance and direct behavior canvas gestures remain required; release-state-gesture-design.md records the proposed first vertical slice.
@@ -52,14 +52,23 @@ Original Capella was operated in a disposable workspace. Native creation demonst
Earlier Studio windows disappeared during concurrent work. Fresh inventory confirmed absence and no matching application-crash event was observed; the earlier unsaved routing trial was not recovered. It is superseded by the explicitly saved reviewed fixture, not retroactively claimed as recovered.
## Active drawing integration checkpoint
Meaningful progress continues: direct connection tools, movable per-diagram port anchors, contextual menus and source folders are implemented. Core commits93fd32c (feasibility scaling) and35133de (port anchors) are integrated. Full Windows workspace passed485 tests (264core,185desktop,36server); full Linux passed488 (267core,185desktop,36server). Final ordered-cursor follow-up passed189 desktop tests on both platforms, strict workspace Clippy and rebuilt desktop binaries. Earlier full runs precede those four additional lifecycle regressions. API/port anchor HTTP tests and strict reST generation passed. Detailed scopes and saved fixtures are in release-port-drawing.md and release-context-menus.md.
Fresh independent correctness review reproduced post-release mouse motion in one native batch creating a port move or exchange after a stationary click. Ordered CursorMoved coordinates are now authoritative for press and release; tests cover both failures, same-batch drags, stationary-source continuity, menu epochs, middle/arrow pan and fresh-context Reset/Draw. Nearest-glyph hit testing fixes incorrect port identity at overview zoom. Port hover shows name, owner and alias in a separate screen-space frame; no label-text overprint. Fresh requirements/architecture review found no further material issue after these fixes and scope-document correction.
Root operated final Windows binary `ui-port-drawing-final/arcadia-studio.exe`, SHA2569A7FF074296D49A714AD664848170D717832A28964719A903B45ABE100BBAA1F, window328292, exec68098. Fast FE port-to-port drag, first Bottom port drag, repeated Left drag, arrow panning with source retained offscreen, target completion and single Undo passed with0checks. It currently contains the isolated unsaved41object/26link model with Left port anchor and first FE. Native input is EXCLUSIVELY delegated to drawing_requirements for Save/reopen, Standard boundary drawing, Function-card auto endpoints, menu lifecycle and minimum-size acceptance. Root must not issue native input until handoff. Current Linux binary SHA25623CEAE18F53736B9B38A94E4185C45D6639825A3775DEB3FB814938B9CD00387 is built/tested; native follow-up pending.
Previous46EE7BD9 trial closed normally (exec90275 exit0) after saving its Bottom anchor/FE fixture, reopening the DE6BD100 Left-anchor/FE/Flow-boundary fixture, SVG export and1100x700 inspection. Saved fixtures and precise results are in release-port-drawing.md. Protected user window7210312 was absent after the interrupted turn; root did not close it. If it returns, do not save/reset/close it. Earlier6228978 likewise absent; no recovery claim.
Parallel release work: drawing_correctness reviews preserved state-core commit a63654f against current anchors/routing. drawing_linux owns behavior draft lifecycle implementation only in a new isolated worktree, excluding app.rs. All broader first-release requirements remain active and incomplete.
## Exact next actions
1. Explorer/port acceptance is complete; preserve release-explorer-usability.md and the saved native/large-model fixtures. Finish native source comment-preserving reopen/error/recovery acceptance under release-source-integration.md.
Source integration is committed at 3c87576; recovery/property guard follow-ups are implemented and tested with the explorer milestone. Identity provenance and conflict-aware Save All foundations are committed at 86bf36b/271f062. Root verified multi-file editing, Apply, Undo/Redo and Save natively; comment-preserving reopen and interrupted recovery still require runtime evidence. Preserve these tests/evidence rather than restarting integration. Then extend production nested syntax and REST bundles; do not promote the experiment unchanged.
2. Linux routing acceptance is complete. Independent verification passed all 324 workspace tests, strict Clippy, formatting and optimized desktop/server builds at `23535b4`. Root's actual Linux/WSLg bend, label, Undo/Redo, Save and reopen passed. That run exposed a dialog-induced viewport recenter, fixed in `366ce44`: all 105 Windows desktop tests and strict desktop Clippy passed, Windows/Linux rebuilds passed, and root's rebuilt Linux native trial preserved the viewport throughout Save. `release-routing-linux.md` records exact scopes/hashes; final saved fixture is `ui-routing-viewport/linux-routing.arcadia` (33,546 bytes). The Linux test window was closed normally after saving. No full 325-test Linux invocation is claimed.
3. Implement direct state/scenario/process gestures, R3 semantic drift and reviewed reconciliation, R6 data contracts, persistent coverage/filters, Home/recent/recovery, hosted ETag workflows, navigable offline guidance and normative reST/API completion. These are required release work, not non-blocking limitations of a finished release.
4. Run fresh requirements, correctness, native UI/UX and architecture reviews for the complete release; address material findings. Verify current Windows/Linux/MSRV builds, runtime workflows, documentation, packages and checksums before completion.
1. Finish independent native acceptance of the frozen9A7FF074 Windows build, then root verifies the frozen23CEAE18 Linux build. Cursor, pan, nearest-hit and tooltip fixes have passed automated verification and root's current native drawing/port/pan workflow. Preserve exact binary scopes while broader implementation continues.
2. Finish direct-drawing acceptance: default/minimum-size Windows and Linux, existing-port FE and Function-card auto endpoints, Flow/Standard boundary links, invalid/cancelled/folded targets, Save/reopen and SVG. Record exact scopes in release-port-drawing.md, update menu/source-tree acceptance and commit the coherent UX milestone.
3. Integrate preserved state-core commit `a63654f` from isolated worktree only after this user-directed usability milestone. Implement direct state/scenario/process gestures, R3 semantic drift and reviewed reconciliation, R6 data contracts, persistent coverage/filters, Home/recent/recovery, hosted ETag workflows, offline guidance and normative contracts. All remain required release work.
4. Complete independent requirements, correctness, native UI/UX and architecture reviews for the entire release; address material findings. Verify current Windows/Linux/MSRV builds, runtime workflows, documentation, packages and checksums before completing the broad goal.
## Environment and reproducibility
Windows Rust 1.98.1; `CARGO_TARGET_DIR=D:/CodexBuilds/Capella2-01a06e2e`. Release logs and native fixtures are under `D:/CodexBuilds/Capella2-release1-01a06e2e`. Use `cargo test --locked --workspace`, `cargo clippy --locked --workspace --all-targets -- -D warnings`, and `cargo build --locked -p oa-desktop -p oa-server`. Generate the routing example with `cargo run --locked -p oa-core --example routing_workshop`; historical migration goldens stay frozen.
+3 -1
View File
@@ -27,7 +27,7 @@ System engineers can develop a coherent OA→SA system model, including iterativ
- Independent core review reproduced alias reservation and same-transaction allocation replacement defects; fixes have focused regression evidence. Typed desktop integration `fa096ce` passed full checks and native creation/generation, undo/redo, save/reopen and no-op synchronization trials. Long-reference previews were inspected at 1440×900 and 1100×700; detailed evidence is in STATE.md.
- Per-diagram pins and labels, source/API parity and shared orthogonal routing are implemented in `4e5a88d`, `a7c6f96`, `68b1eff` and `30c7db1`. `65fa9ab` resolves all six reproduced default SA label-overlap pairs. Native OA/SA editing, movement/undo, fold restoration, save/reopen, SVG inspection and short gestures at 1100×700 passed. Routing code/native acceptance and independent native follow-up are complete at `23535b4`; exact scope is recorded in release-routing-verification.md.
- The source experiment passed 23 tests, but an independent probe reproduced positional item-comment misattachment, shorthand description rejection and unsupported deletion. Whole-model equality does not establish source-comment fidelity. The production updater retained comment attachment on the same reorder probe; extend its parser/updater instead of copying the experimental parallel implementation.
- Current behavior diagrams derive geometry and only handle selection; direct behavior editing remains a product gap. The source editor retains modular accepted source; nested element syntax is implemented and under native acceptance. Port/exchange/steps shorthand remains an independent future implementation slice required by the current authoring strategy.
- Current behavior diagrams derive geometry and only handle selection; direct behavior editing remains a product gap. The source editor retains modular accepted source; nested element syntax and cross-file graphical updates passed Windows/Linux native acceptance at4e8575b. Port/exchange/steps shorthand remains an independent future implementation slice required by the current authoring strategy.
- Independent source review exposed declaration/comment reassignment during UUID changes and swaps, Linux FIFO hangs during disk admission, file-mode changes on save, and overlong detached-file receipt lifetimes. Command provenance, pre-open regular-file admission, permission retention and saved-detach receipt retirement resolve the reproduced cases. Exact probes and test scopes are in STATE.md.
## Assumptions to test
@@ -54,3 +54,5 @@ System engineers can develop a coherent OA→SA system model, including iterativ
Accept native per-file editing, safe project saves and exact source Undo, then extend production source parsing/updating using the independent probe findings as regressions and integrate REST bundles. Linux routing is accepted with actual WSLg Save/reopen; all11 current Linux disk integration tests also pass. Full release Linux acceptance remains open. Prototype persisted direct behavior gestures next. Continue R3 reconciliation, R6 data contracts, lifecycle/recovery, hosted editing, offline guidance and fresh Windows/Linux release acceptance; no subsystem checkpoint constitutes release completion.
Meaningful progress now includes verified drag and typed-port authoring, accepted editable routing with native save/reopen, group movement and minimum-size evidence, and tested source-bundle/nested-writeback foundations with independent limitations exposed. Production source and direct behavior usability remain open engineering tasks; feature counts alone do not establish completion.
Current user-directed drawing evidence: palette creation and draggable per-placement port anchors passed scoped native Windows trials with Save/reopen; full485 Windows and488 Linux workspace suites passed before final pointer-release and hover refinements. Fresh independent review exposed post-release motion turning clicks into edits, nearest-port mispicking at overview zoom, and missing target identity feedback. The first two have production regressions and fixes; named owner/alias hover details and source-preserving pan are implemented, with final native acceptance pending. See release-port-drawing.md. The preceding goal turn made concrete progress through implementation, saved source/SVG artifacts, actual runtime verification and reproduced findings; it was not a wait or no-progress turn. Direct behavior and the broader release requirements remain active.
+23
View File
@@ -0,0 +1,23 @@
# Contextual menus and source tree
## Outcome and implementation
The latest user priorities are discoverable, contextual actions without a crowded Properties column, no permanent bend-button row, and a source-file folder tree. Preserve the accepted port creation workflow: participants retain a primary Add port button, and component ports retain Connect boundary exchange. Actions and right-click menus expose secondary operations. Existing forms and core commands remain the semantic boundary; menus do not introduce a command registry or change stored models.
`context_menu.rs` supplies a controlled Iced overlay and right/left press anchors. It clamps to the viewport, scrolls long menus, skips disabled rows during keyboard navigation, and captures outside-dismissal press/release without click-through. `model_menu.rs` captures target identity plus document/revision/view context. Opening a menu does not select another object or apply a pending draft. Invocation validates the captured context before using existing guarded handlers. Canvas hit testing shares the rendered port/route geometry; Add bend here uses the clicked world point. Insert/Delete are scoped to canvas focus. Shift+F10/Menu uses selected identity with geometry only for the popup anchor.
`source_tree.rs` groups exact logical file paths, retains duplicate basenames and aggregate draft/diagnostic indicators on collapsed folders, and uses the explorer's 32-pixel rows and 16-pixel guides. Collapse/Locate/file navigation are presentation state only. File closing remains restricted to clean detached buffers and never deletes disk files.
## Current verification and remaining acceptance
Independent reusable popup tests and strict Clippy passed (8 tests); source tree tests passed (6 tests). Root is running integrated desktop regressions. Independent review identified stale menu tokens dismissing a newer menu and keyboard menus losing selected port/bend identity; both fixes are implemented, with focused regressions and revalidation active. Initial compile errors were corrected; an obsolete modeling-picker type was removed after strict warning review.
Native acceptance still required on the new binary: unselected actor Add port, selected port connection, edge/bend insertion/removal/reset, Undo/Redo, menu dismissal and keyboard focus, minimum-size clamping/scrolling, folder collapse/reveal/diagnostics, and Save/reopen. Preserve original Windows window 6228978, which contains user edits. Root alone owns native input. The isolated state-core commit `a63654f` is not merged until this user-directed desktop milestone is reviewed and accepted.
The first native menu trial on binary `6A28BCB0…` reproduced a blank 280×12 strip on actor right-click. Iced reconstructs overlay instances while retaining layout; geometry held only in the transient layout instance was lost before draw/update. The reusable widget owner is fixing this root cause and adding a reconstruction regression; no UI acceptance is claimed for that build. The same native trial verified source-folder expansion/file selection and identified unnecessary horizontal scrolling at depth1; root adjusted shallow row widths to match the explorer's approach while preserving true depth for larger trees.
Follow-up binary `1B430A5822563B76699F421EA2C50EC23D0A5A47582BABC49598751683978F99` fixes overlay reconstruction by deriving geometry from retained layout children; 10 reusable widget tests pass including reconstruction regressions. Integrated162 desktop tests, strict Clippy and build pass. Root native default-size actor/explorer Add port and typed Boundary exchange creation passed,43objects/26links/0checks. Add bend here, Insert, Delete, Shift+F10/keyboard Remove, Reset routing and Undo passed; outside dismissal did not select the underlying object. One first drag was unchanged; a repeat succeeded, and three independent production-widget first-drag/coalesced-release probes passed without reproducing a code defect. Save All wrote the isolated authored/project.arcadia with both Standard ports, Coordination interface and the restored FE detour. Independent reopen/minimum-size/source-tree QA is active. Native minimum/menu acceptance is not yet complete.
Independent native review on1B430 passed reopen,1100x700 Actions clamping and keyboard use, source/property draft gates, outside dismissal, input Delete isolation, duplicate basenames and seven-deep source navigation. It reproduced Actions -> Escape swallowing the next Revert click. Root fixed the Area opening-release lifecycle and added a regression; rebuilt177-test drawing binary contains the fix, native revalidation still pending. Evidence: D:/CodexBuilds/Capella2-release1-01a06e2e/context-menu-independent-native-review.md.
Root reverified the Actions -> Escape -> first Revert fix natively on DE6BD100: edited the selected FE name, observed all modeling actions disabled, pressed Escape, clicked Revert once, and captured the restored name and Property draft reverted status. This closes the independent first-click finding. The final pointer-batch follow-up still requires its own runtime acceptance.
+83
View File
@@ -0,0 +1,83 @@
# Direct connections and port placement
## User workflow and decisions
Architecture has explicit Select/move and perspective-specific drawing tools:
OA Interaction, SA Functional exchange and SA Boundary exchange. Select a source
and a highlighted target, or drag between them. Function cards generate/reuse
typed ports through the existing atomic planner; explicit port hits retain the
chosen identity. Boundary links use actual compatible component ports. Middle
drag and canvas-focused arrows pan while retaining the chosen source. Escape
cancels; empty space restarts. Hover details identify ports, owners and aliases.
Port sides and normalized positions belong to each diagram placement, preserving
semantic ownership. Dragging snaps to the owner's border; automatic placement
uses direction, connected peers and available border space. Right-click Reset
automatic position restores the derived anchor. Core commands, source bundles,
JSON/REST and SVG use the same model and projected geometry. Each completed
gesture makes one source-aware history operation. Menus and source-file folders
are covered separately in release-context-menus.md.
The bounded automatic router still permits dense-model crossings. Authored bends
remain available; no perfect-layout guarantee is made. Input direction and carried
items are not guessed from geometry. Drawing creates an empty carried-item list;
Properties supplies the name and contract editing workflow.
## Findings resolved during integration
- Shared feasibility queries previously scanned unrelated interface roles for
every candidate. Commit93fd32c reduced the measured4000-port/4000-role picker
from804ms to3.169ms optimized without relaxing final validation.
- Per-placement port anchors are integrated in35133de. Owner changes repair
graphical anchors atomically; raw source/API reject invalid owner references.
- Automatic labels now avoid other edge strokes as well as nodes/labels, with
bounded deterministic placement. Both source-ID orders have regression tests.
- Iced supplies a batch-final window cursor for every event. Ordered motion is
now authoritative for both press and release, preserving stationary-source
drags and preventing later motion from converting a click into a model edit.
Menu transitions invalidate cached pointer state through captured epochs.
- Enlarged port hit areas overlap at overview zoom. All three picking paths now
choose the nearest glyph, with stable tie-breaking for coincident ports.
- Port labels use a separate screen-space frame, avoiding text overprint and
keeping target identification legible while zoomed out.
## Observed verification and remaining acceptance
Full Windows workspace passed485 tests (264 core,185 desktop,36 server); full
Linux passed488 (267 core,185 desktop,36 server), with strict Linux workspace
Clippy and optimized desktop/server builds. These full runs precede the last
ordered-release/hover changes. Four subsequent production lifecycle tests and
nine external lifecycle probes passed. Final189-test desktop runs, strict
workspace Clippy and rebuilds passed on both Windows and Linux. Native acceptance
is still in progress; do not infer it from automated suites.
Root operated DE6BD100 and46EE7BD9 Windows builds through Computer Use. OA palette
click-click creation/history, SA direct FE/Flow boundary links, fast port-to-port
drag, four port sides across trials, automatic reset/Undo, draft/menu guards and
save/reopen passed. The46EE build was inspected at1100x700, rejected an input port
as an outgoing source, and cancelled without dirtying the saved model. Its window
closed normally, exit0. The final ordered-pointer/hover/pan build still needs
native acceptance on both platforms; middle-button dragging is unavailable in
the native tool, so use the actual keyboard-pan path plus production mouse probes.
Saved evidence under `D:/CodexBuilds/Capella2-release1-01a06e2e/`:
- `ui-port-drawing/authored/project.arcadia`:41objects,27links,0checks; Left anchor,
FE and Flow boundary link. Reopened on46EE and exported `project.svg` (5050bytes).
Root inspected its raster rendering for port direction, nesting and routes;
the renderer's fallback font differs from the application.
- `ui-port-drawing-reviewed/authored/project.arcadia`:41objects,26links,0checks;
Bottom anchor and fast-drawn FE, source bytes inspected after native Save.
- `port-drawing-final-tests.log`, `port-drawing-final-linux-*.log` and independent
review/probe folders retain exact command scopes.
Root's final Windows build9A7FF074 passed fast FE drag, first Bottom port drag,
repeated Left drag, readable hover name/owner/alias, arrow pan with source retained
offscreen, target completion and one Undo. Current native window328292 has the
isolated41object/26link model; independent native reviewer owns it exclusively
for the remaining Windows tasks. Linux final build23CEAE18 passed189 desktop
tests and strict workspace Clippy but still needs native verification.
Pending: final menu lifecycle, Function-card auto endpoint creation, Standard
boundary drawing, minimum layout, save/reopen and Linux native workflow.
The broader first-release objective remains incomplete.
+3
View File
@@ -209,3 +209,6 @@ saved project with 22 objects, 13 links, zero checks and all changes saved; the
SA allocation view retained the same participant/function ports and exchanges.
Minimum-size follow-up, independent native review and actual rebuilt Linux
nesting trial are still pending.
# Linux nested source acceptance — 2026-09-06
Root operated the optimized Linux desktop SHA256 `C794426BD91980B2384B92884176542B2B081FA7B4ADE8ADA5D7EECEB72D6351` through Computer Use. The isolated six-file fixture was on the native Linux filesystem at `/home/sorokinoleg/.cache/arcadia/nested-source-native-20260906/project.arcadia`. Native Open loaded 22 objects, 13 links and zero checks. OA allocated hierarchy and SA system/actor nesting, real function-port triangles and component-port squares were visually inspected. Textual model opened the nested `sa/reporting.arcadia` declarations with highlighting, stable UUIDs and comments. A comment edit was applied, model Undo restored the original accepted file and clean state, Redo restored the edit, Save all completed, and native Open reopened the entry. The comment and nested source were personally verified after reopening, with all changes saved and zero checks. The Linux validation window closed normally; the original Windows window containing user edits was untouched. This is source/comment and rendered hierarchy evidence; the cross-file graphical reparent workflow was exercised on Windows, not repeated on Linux. Save latency was not benchmarked.
+38 -1
View File
@@ -8,7 +8,8 @@ Connection routing became the user's next priority after this design handoff.
Reuse Diagram/NodePlacement and existing atomic commands. Prefer a typed
`ProjectionKind::StateMachine { machine: Id }` over desktop-only coordinates or
a second persisted behavior-layout store. Existing projection strings remain
valid. Proposed source: `projection StateMachine { machine @operating_modes; };`.
valid. Use the existing constructor syntax:
`projection { StateMachine { machine @operating_modes; }; };`.
The context references a same-layer machine and scopes placements to its machine,
regions and vertices. Explicit creation initializes existing contents in one
transaction; rendering must not dirty a model. Missing placements remain legal
@@ -85,3 +86,39 @@ two regions, a nested composite and guarded transitions. Try invalid edges into
Initial, invalid history reconnection, Escape mid-drag, a folded composite,
root-Event selection and save/reopen. Record task completion, discoverability,
ownership clarity and recoverability; no such native result is claimed here.
## Current-interface review (2026-09-06)
Independent core and desktop maps confirm the payload projection remains the
smallest persisted boundary. Preserve unit-variant JSON strings; the new value
is `{"StateMachine":{"machine":"UUID"}}`. A machine context is required for
empty and partial views; inferring it from placements cannot represent an empty
diagram, while an optional unrelated Diagram context adds invalid combinations.
Use one narrow state-view membership predicate and preserve existing projections'
legal hidden placements. Dedicated views disappear with their machine; moving
elements across machines must repair incompatible views/routes in the same Batch
or reject atomically.
The shared router now owns route pins, label placement and grouped translation.
An executed probe found that merely retaining an External self-transition yields
an 18 px out-and-back stub. Add genuine self-loop and state-symbol endpoint
geometry in the shared routing/projection path; Entry/Exit snapping must precede
draw/hit testing. Internal transitions remain rows, and folded descendants must
not create false visible self-transitions. Probe:
`D:/CodexBuilds/Capella2-source-document-contract/examples/state_projection_boundary_probe.rs`.
Before adding gestures, close existing behavior draft gaps: Start/Edit must not
overwrite an unresolved form, Submit must retain it until Document source/model
commit succeeds, and Save/Close/navigation must account for behavior drafts.
Canvas events carry the existing document/diagram/revision/epoch context and
recheck it before acceptance. Generic MoveNode message delivery selects the
current active diagram and is insufficient for delayed behavior gestures.
Keep Select, State/symbol, Region, Transition and Fit in a compact toolbar.
Create inside an explicitly highlighted eligible owner, place missing ancestry
in the same command batch, and expose unplaced semantic elements. Retain the
behavior view independently of selection, including root Events. Reconnect
clones the relation and changes one endpoint; preserve all other data and reject
invalid cardinalities. Keep form editing in a bounded panel so the canvas remains
usable at 1100×700. These are decision-ready interfaces; no implementation or
native gesture acceptance is claimed.