Record independent review of published State label follow-up

This commit is contained in:
2026-09-24 17:53:28 -07:00
parent 6c0d9e807c
commit b2ef3f5457
@@ -0,0 +1,30 @@
# Independent static review of state-label contribution
Reviewed immutable production/test diff `715036e132677dd2bc2fb37ed316d93dc9987aec..70bdcdf8fec1728e971cd90ad7f79a1df99777ff` and published contract/evidence README/source-review/native-review/handoff-review at `57b3fe4bff43a7df602f1567b8867bb1d31051d0`. Git shows no crate changes between the tested source and the evidence HEAD. No checkout, worktree, source edits, Cargo, executable/GUI launch or remote operation was performed.
**Disposition: no material new source-level correctness regression found in this bounded review.** Suitable to consider for integration with its stated evidence limits. This is not combined-source runtime acceptance, release approval or resolution of the independently owned restored-window input issue.
## Source-backed checks
- `oa-core/src/routing.rs`, StateLabelLayout and make_label: only StateTransition labels in dedicated State projections obtain the new layout. Raw shortened summary remains separate from display normalization, preserving usage-prefix offsets. Fixed title excerpt budget comes from raw summary before measurement, avoiding width-dependent truncation feedback. CRLF folding, other specified separators, blank/trailing cells and four-space tabs match the contract. Maximum measured line advance plus10 padding and max(24,12*line_count) drive placement, bounds and later paint together. Existing authored fraction/offset are not rewritten; automatic collision placement legitimately changes with the new size.
- `oa-desktop/src/state_label.rs`: measurements use Iced Paragraph with canvas-default font, shaping and alignment, font10, explicit12 line height and infinite width. Each already-split line is measured independently. This removes the wide-W scalar-width error without adding a font dependency to core. Core fallback remains explicitly approximate; advance is not a universal glyph ink-overhang bound.
- `behavior/state_canvas.rs`: scene and bend-preview routing use the measured wrapper. Ordinary hit testing checks State label rectangles before covered nodes/rows and reverses BTree paint order, so frontmost labels own padding and blank cells. Exposed pixels continue to the existing row identity path. The new paint loops use shared origins and heights rather than separately shortening strings. Existing selected endpoint/bend handling remains outside/earlier than ordinary hit resolution.
- `diagram.rs`: generic fallback canvas also has a State-label prepass for click/context targeting. A selected lower label can begin its drag only if it is the frontmost hit label; selection alone cannot steal an overlapping upper label. State labels are painted after nodes, and non-State labels retain the prior branch. Read-only selection is retained while mutation still requires editability.
- `diagram/multiselect.rs`: selected State attachment/bend resolves to that exact Edge before label targeting, then still passes through Shift toggling and normal group admission. It does not introduce unconditional handle-edit fallthrough that would bypass selected Edge+Placement mixed-group refusal. Allocation handling retains its existing precedence; this contribution does not switch every projection to global edge-first selection.
- Coordinate paths use canvas-local points followed by the existing inverse pan/zoom once; shared bounds remain world coordinates. The diff does not add a second viewport translation or change DPI/window mapping. New generic input tests exercise nonzero pan and multiple zooms. This source inspection cannot diagnose the recorded restored-window/Home input discrepancy.
- App Fit, State Fit, usage/focus queries, work/allocation routing and preview consumers now use the measured wrapper. A source search found remaining direct `routing::route_diagram` desktop calls only in tests, apart from the wrapper's deliberately measured calls. Routed bounds include the actual label rectangle, so existing focus/Fit calculations see increased extents rather than the previous one-line geometry.
- SVG export consumes that same measured route plan, emits escaped independently positioned lines with explicit font size and preserved spaces, and paints State labels after nodes. Overall SVG viewBox derives from routed bounds. Exact external-viewer font substitution/line metrics remain outside the promise; non-State export behavior is preserved.
## Tests and evidence scope
Read the added core layout tests and canvas test changes in the diff, plus generic selection/group handling. Coverage targets the pertinent failure modes: hard-line normalization, raw-prefix provenance, wide/Unicode measurement, overlapping opaque label selection, exposed row identity, selected-handle versus front-label behavior, Shift/mixed-group refusal, nonzero pan/zoom, preview cancellation, fixed group displacement/one-step history and SVG ordering. These are meaningful source-level controls, not substitutes for native pixels.
Published evidence distinguishes focused core gates at2af40c7e from desktop/build gates at70bdcdf8 and reports no intervening core changes. It reports68 focused core passes,1540 desktop passes with7 inherited diagnostic/manual ignores, format/strict workspace all-target Clippy/build success, and preserves the earlier test-only E0382 compile failure. I read those committed records but did **not** independently unpack/reconcile their raw archive inventories, execute gates or validate retained binaries in this review.
The published independent native review reports maximized B/W/U observations, exact six Save/reopen Project/source comparisons and two observed clean process exits. Its detailed limits are appropriate: no universal Unicode containment, rounded68/82 percent scales, no native group-movement/history trial, and no generic-fallback native trial. I did not independently inspect screenshots or raw saved Projects in this static review and therefore do not elevate the peer's observations to newly performed visual/runtime verification.
## Remaining acceptance limits
The unsuccessful restored-window label and Home-button interactions remain unresolved and separately owned. The source change neither demonstrates their cause nor claims a fix. Do not infer all-window hit correctness from successful maximized trials or synthetic Program events.
Before claiming integrated acceptance, bind the eventual combined source, review any integration conflict, and run the selected integration gates. The bounded contribution is not evidence that a future source8 combination, whole-workspace test suite, package or new release has passed. The frozen715036e prerelease remains unaffected. No new blocking code finding arose here, and no speculative redesign or unrelated State layout expansion is warranted by this review.