Files
ARCADIA-Studio/harness/scenario-reorder-interaction-20260924.md
T

51 lines
10 KiB
Markdown

# Scenario semantic reorder interaction experiment
This is a branch-specific experiment toward [issue 29](http://217.177.34.108:3000/sorokin.oleg.edu/ARCADIA-Studio/issues/29), not a finished user interaction. [Stable-block semantics](scenario-group-reorder-policy-20260924.md) and [ordinary saved group spacing](scenario-group-spacing-20260924.md) remain distinct. The user requires direct graphical editing, low cognitive load and avoidance of long homogeneous lists. A passing planner or chooser-only prototype cannot establish the entire requested workflow.
## Question and observable success
Can an engineer select C then A in semantic `[A,B,C,D]`, request a position before D, identify `[B,A,C,D]` before and after committing, and then adjust B's saved spacing without confusing the two operations? Repeat with authored coordinates whose visual order differs from semantic order, close or equal-Y anchors, a nested operand, repeated long names, an offscreen anchor and twenty siblings. The exact full-model oracle changes only the common parent's step list; saved coordinates, metadata, unrelated sequences and other views stay unchanged. One Undo/Redo must cover the whole source transaction.
Compare an inline explicit destination chooser with a fixed labelled “Reorder N” drag handle, using the same frozen planner and preview. The chooser begins without a chosen destination; Enter alone must never commit an implicit default. The drag candidate resolves the nearest displayed slot before parent validation and must expose invalid nearer destinations instead of skipping to a farther legal one. Both name the exact parent and before-anchor (or end), display before/after semantic order, retain complete selection/primary and explain that authored positions are preserved.
The chooser's bounded destination set is the explicitly named common parent in semantic order, including selected anchors as no-change choices. That is an explicit semantic Slot choice, distinct from nearest-screen-slot resolution. It must not silently discard same-parent destinations because temporal validation rejects them. Their refusal reasons need to be inspectable. A searchable, bounded display must keep the chosen anchor and local before/after neighborhood visible; a giant unstructured menu fails the stated requirement. The drag candidate must demonstrate that every offered destination is actually reachable, including ties and offscreen destinations, before claiming equivalence.
## Shared frozen session boundary
Capture one immutable Project, full Scenario Context, complete Selection Snapshot and nonnil operation token. Match requested representation's actual owner and the snapshot's document/surface/revision/epoch. Admit every original member against the actual rendered scene and the whole-set semantic planner before considering any no-op. Preserve click order and primary as selection data; construct the moved block in semantic order.
An explicit Slot produces a cached proposal with original/result ID order, semantic Change/Noop/Refused outcome and separate candidate presentation status. Repeating the current Slot reuses its proposal; pointer pixel motion must not revalidate the full Project. Keep only the current proposal: retaining a whole rendered scene for every visited destination would grow with the number of destinations times scene size. Revisiting a previous destination can recompute it. Keep the requested Saved/Automatic identity while resolving the candidate. Ready, Fallback and Unavailable are different presentation states, independent of semantic validity. The experiment must show fallback/unavailable feedback; it must not silently change representation or equate semantic validity with usable geometry. The final UI's commit policy for degraded candidates remains a decision to verify, not an implicit permission in the session API.
Finishing requires an explicitly selected destination, exact unchanged Project, Context, Snapshot and token. The session returns the already validated command and retained selection; it does not execute Document or edit live state. Its command cache stays private. No destination, refusal, cancellation and no-op have no model/source/history side effects. A consumed session cannot finish twice.
## Required App integration after the experiment
The App must reject stale events **before taking a current session or retiring any live owner**. Session consumption on an invalid Finish is not a substitute for early App admission. Start captures a fresh token and the whole rendered selection; another active input owner, dirty Properties/source, pending insertion, source rename or modal must prevent start. Selection generation, representation visit, revision and document-instance identity reject ABA and replacement. Current cancellation, every admitted terminal Finish (success, no-op, semantic refusal or source-commit failure) and admitted failed Start retire the operation lifetime; old Begin/Choose/Finish/Cancel packets cannot affect a newer session on an unchanged selection.
Input paths need explicit ownership: ordinary selected body/header spacing keeps its current meaning; reorder input is separate. Selection/navigation, source and property edits, Undo/Redo and conflicting gestures cancel the old reorder operation without pruning its captured set. A chooser can allow passive layout measurement and scrolling only if those events cannot retarget the exact chosen Slot. A drag additionally owns camera, bounds, pointer threshold and outside-release rules. Source-update failure leaves the accepted model/source/history, stored camera, selection and primary unchanged. Commit executes one command through Document and retains a nonmodal result/Undo explanation. Legacy menu, Details and keyboard actions must never apply to the primary alone while a group is displayed.
Baseline Fallback admission is separate from candidate degradation: the frozen session can admit a semantically valid whole selection visible in the actual fallback scene, but this does not enable coordinate input or accept a UI commit policy. A chooser might offer semantic repair despite a baseline fallback; a geometric drag must establish which geometry its slots mean. Candidate Fallback/Unavailable must be described and explicitly governed before either adapter is enabled. Also settle whether a handle drag returning to its original screen point means cancel/no-change regardless of nearest Slot. Stationary release must not accidentally reorder to the handle's incidental nearest anchor. These are pending interaction decisions, not behavior inferred from the pure planner.
## Evidence and decision boundary
The test-only session and slot experiments are isolated from production input until their results are reviewed. Source-level tests establish transformations, rendering facts and admission invariants; they do not establish discoverability, keyboard access, result comprehension or native usability. Those need a built App adapter, direct Windows workflows at ordinary and compact sizes, then independent review. Linux remains user-paused.
The two candidates are materially different: the chooser favors explicit identity and keyboard reachability; the handle favors continuous canvas manipulation but inherits geometric ambiguity. Their shared session is an implementation dependency, not evidence that either user interaction is accepted. Record actual experiment results before choosing or revising either candidate. Aggregate removal and broader feature completeness remain required beyond this experiment.
## Executed result and resulting decision
At source `cae7a22297d09810c412dbdf4ce5d8a28164b247`, Windows GNU/LLVM `cargo test -p oa-desktop reorder_ --message-format=json -- --nocapture` passed **22 tests, zero failed, zero ignored** (1,573 filtered). This includes all five new session tests, all four slot experiments and thirteen existing tests selected by this name filter. It is not the complete Scenario or desktop suite. The gate captured 814 unchanged inputs and independently compared their exact inventory and bytes with that commit. Workspace formatting and strict all-target desktop lint also passed with the same exact source proof. [Portable checks and independent review](scenario-reorder-interaction-evidence-20260924/README.md) retain all three complete runs.
All four geometry fixtures passed real Saved-presentation Ready and core-error-free assertions. Their source-order list is A/B/C/D:
| Authored message Y | Actual before-slot Y | Observed consequence |
| --- | --- | --- |
| 200 / 500 / 300 / 400 | 158 / 458 / 258 / 358 | Physical A/C/D/B order differs from semantic order; each of the four before-anchors is individually reachable. |
| 200 / 300 / 300 / 500 | 158 / 258 / 258 / 458 | B and C share slot Y; the actual nearest picker chooses B and cannot uniquely address C. Explicit before-C and nearest before-B produce different literal complete-model results for selected D/A. |
| 200 / 300 / 300.125 / 300.25 | 158 / 258 / 258.125 / 258.25 | C is continuously reachable in a subpixel interval, but one-pixel samples at scale 1/pan 0 miss it. This does not claim that Windows always quantizes pointer coordinates. |
| 200 / 300 / 400 / 2000 | 158 / 258 / 358 / 1958 | D cannot win in a fixed 600px-high scale-1/pan-0 viewport; changing the camera can make it reachable. |
The tied-slot counterexample is decisive for the original fixed-handle candidate using unchanged nearest-Y picking: it cannot be the sole method for selecting every valid semantic destination. A different deterministic tie winner only exchanges which identity is unreachable. Preserve exact semantic destination input or add an explicit disambiguation/order-strip interaction. Crossed and close geometry also require feedback, but do not prove universal unreachability. Offscreen evidence is limited to the stated fixed viewport.
**Accepted decision:** reject the unchanged nearest-Y-only candidate as a complete group reorder interface. Build the exact destination and before/after semantic preview foundation first; compare click/keyboard access and a graphical handle using explicit destination identity or a disambiguator before final UI acceptance. The current session and tests remain behind `cfg(test)`; no new product command is enabled by this checkpoint. The model/source equality and round-trip oracles pass, but no actual chooser/handle, App lifetime adapter, native comprehension, keyboard workflow, long-name/twenty-sibling usability or new release is claimed.