Read-only review of `C:/ar-wrap-01a0d717`, initially uncommitted against `6ea7518e7be5b5f17d5fbc5d667da8b388058af4`; parent froze the same inspected source during review as `d8ccd6ed49adac799c02a3c52cb9e431214a4963`. This reviewer did not run Cargo, native UI, a renderer, or change source. Only this report was written. Parent owns reproduction, compilation, repair, visual evaluation, and publication.
Read the implementation handoff/intent, the alternatives and independent design critique, six touched Rust files, relevant core preview logic, and installed Iced/cosmic-text implementation. This is a narrow opt-in experiment review, not a general wrapping-policy or usability acceptance.
## Finding requiring a bounded fix or explicit edit-scope exclusion
**P2: a different edge's preview can retain wrapped bounds while losing its wrapping renderer.**
The coupling between the modified `RoutedEdge.label` and `Scene.label_layout` fails on a guard-refusal transition:
1. Build an automatic E/F scene. `apply` replaces the target's derived label bounds/center/fraction, and the scene holds its line layout.
2. Begin a route gesture on another edge. `diagram.rs:644` captures `self.scene(state).routed` as the gesture baseline, so the baseline includes the wrapped conversation geometry.
3. Move a foreign path through that label box. `routing.rs` preview logic copies unchanged edges/labels from the baseline and only regenerates the changed edge's label. Thus the conversation keeps its wrapped geometry.
4. `diagram.rs:605–624` passes that routed preview to `apply`. The new foreign stroke makes `guarded` false; because the target is still automatic, `label_layout_experiment.rs:192–195` returns None without modifying it.
5. The resulting scene has no Layout but still has the wrapped target geometry. `diagram.rs:1415` falls back to drawing the full one-line canonical string centered over a two-/three-line backing and hitbox. This violates the shared-layout invariant and can paint outside the hit region.
Concrete reproduction setup for the parent: load the pinned fixture with F; obtain the wrapped target box and center; select ordinary allocation `725f2e1b-aa2c-5615-9b1f-28da178168fa`; construct a normal route preview with a waypoint at that box's center (approximately the declared F witness around x1230/y254.2, but use measured geometry). Set Gesture.baseline to the pre-gesture scene.routed and changed=true. That point is in the free corridor and forces the foreign path to intersect the box when the pin is honored. Verify the route really intersects before asserting the mismatch. E supplies the same control. Preserve the first failure as evidence.
Responsible fix boundary: the desktop experiment's scene/preview adapter must keep wrapped geometry and its line layout together. Either retain the frozen target's existing layout during an unrelated route preview, with clear=false recording the conflict, or restore a **complete** matching one-line geometry/layout when falling back. Do not weaken the automatic guard globally, discard the other's preview, or reroute production paths to hide this state mismatch. Core routing's documented unchanged-edge preview retention is functioning as designed.
The existing five tests do not cover this path: the authored test drags the target label itself, which intentionally bypasses guard refusal; the guard tests start from an unwrapped core baseline. A focused different-edge preview regression is justified. Until resolved, the untouched fixed-scene visual trial may still proceed with its narrow limits, but edit-lifecycle parity cannot pass.
## Typography and export fidelity
The code genuinely measures the fixed lines using the installed Iced/cosmic-text stack, with font size 13, absolute line height 16, default Font, Basic shaping, and left/top alignment. Width is `Paragraph::min_width`, baseline is `run.line_y`, and a resolved font family is retained. Unsupported multiple runs, RTL, and mixed faces within a line reject measurement. The canonical semantic text remains unchanged; line breaks are presentation only. This is materially stronger than the earlier character-count arithmetic.
However, the handoff's statement that Canvas Text uses the same Paragraph implementation is incomplete for the normal rendering path. In both `iced_wgpu-0.14.0/src/geometry.rs:306` and `iced_tiny_skia-0.14.0/src/geometry.rs:173`, positive uniform scale/translation goes through **Text::Cached**, scaling font size and absolute line height first. `iced_graphics-0.14.0/src/text/cache.rs` creates and shapes its own cosmic-text buffer. `Paragraph::with_text` through `geometry/text.rs::draw_with` is the other transform path. The inputs align for this fixed ASCII/infinite-width case, but the actual Canvas is not drawing the measurement Paragraph or immutable measured glyph positions. Pixel/antialiasing and scaled-metric parity remain native checks.
SVG has the correct logical box, ordered strings, explicit line starts, measured baselines, and resolved family. It nevertheless delegates each entire string's glyph placement to the SVG viewer. Cosmic-text Basic shaping (`cosmic-text-0.15.0/src/shape.rs`, `shape_skip`) uses individual glyph advance widths without contextual kerning; the SVG has no explicit per-glyph positions or kerning/ligature policy. Family names also do not embed the resolved face. Consequently **shared line records are established by source, exact glyph parity is not**—even on the same machine, browser shaping can differ. This is not a demonstrated clipping defect; compare actual exported and native rendering before claiming fidelity. Avoid solving arbitrary fonts or SVG shaping globally for this witness.
`min_width` is a layout advance bound, not an exact glyph-ink contour. The eight-unit horizontal padding and declared line spacing may be adequate for these words, but tests checking measured widths inside backing are not an independent raster extent check.
## Cache and font-version assessment
The measurement cache keys profile and Iced FontSystem Version. Scene/work-preview caches additionally compare profile and font version, along with existing context/preview/route/port state. Ordinary pointer, selection, pan and zoom changes therefore reuse logical layout rather than remeasure/rescore. Baseline avoids initializing the font-system version path. No new per-hover route scan was found in the ordinary scene path.
Iced's Version increments when its `FontSystem::load_font` loads font bytes. Raw database mutation through `.raw()` is outside that contract. No dynamic runtime font-loading path was found in this application's normal setup, so there is no demonstrated stale-font bug for the fixed trial. A true font-load invalidation test is absent: the cache test covers profile/revision changes and measurement reuse, not an actual Version increment. This is a test-evidence limit, not grounds to rewrite the cache.
Version is sampled before measurement and separately before scene creation; concurrent font loading could produce a one-frame mixed-version snapshot, then be invalidated next time. Without evidence of concurrent loading in this trial, treat that as a broader-policy limitation. Failed measurement is not cached, so unsupported metrics may repeatedly attempt shaping on geometry rebuild; the accepted fixed English witness avoids that only after the parent verifies measurement succeeds.
## Authored shape and geometry consumers
The explicit experiment policy is coherent for target-label dragging: it inserts the measured fraction/offset at drag start; authored moves retain E/F shape even when the guard fails, with clear=false; the same externally selected profile derives that shape after rebuild. Undo returns to the fixed automatic witness. Ordinary reopening without the environment profile restores ordinary one-line rendering, so this is not persisted formatting support. Existing authored fields remain exact, but previously authored target labels are intentionally visually wrapped under the experiment profile, as declared.
Fit in app.rs, main/work-preview scene rendering, label picking, drag start, saved-view/edge focus bounds, dirty-input shielding, and SVG are wired through the transformed geometry. Other routes/labels are not resettled by the adapter. Core retains routing ownership; application paths that use route points only, such as AddBend, do not need a label transform.
One **dormant consumer limitation** remains outside the representative Traceability workflow: `app/allocation_drag.rs:929` still passes an untransformed core RoutedView to `Frozen::capture`, whose controls include label bounds (`:155`). The visible work-preview scene is transformed, so the frozen Allocation drop occluders would use the old label box if this experiment were extended into an Allocation projection with the same target IDs. This is not an active defect in the fixed Traceability trial. Do not claim all Allocation drag consumers have measured-label parity, or generalize the experiment without reconciling that admission path.
Conservative bounds retain the core's original extents and enlarge them for new authored placements; they do not shrink away obsolete one-line extents. For this fixed automatic fixture both shapes are inside the same node extents, so unchanged Fit is supported by geometry. For arbitrary authored moves the result is intentionally conservative, not a minimal fitted bounding box.
## Guard and baseline invariants
The private adapter returns immediately for Baseline and checks target diagram ID, relation ID/name and canonical displayed string. It rejects nested/collapsed views and custom-suspended target routes. Automatic guards include full padded cards, other labels, association-end labels, and every semantic edge's strokes without discarding coincident ownership. E requires exactly one full straight own crossing; F rejects all stroke intersections. Authored collision bypass is explicit. These are sensible fixed-witness boundaries, not a general layout engine.
Baseline routing/export branches remain structurally unchanged apart from no-op adapter calls and additional cache fields. Existing output equality tests are appropriate, but this review does not claim they passed. The first focused test checks restoration of target label geometry yields complete baseline RoutedView equality, which usefully covers paths, other labels, bounds, and solver metadata. Canonical Project serialization equality is also checked. No core/schema or semantic mutation was found.
The identity guards do not hash the entire fixture: a same-ID diagram edited into another flat scene can still enter apply and be accepted/rejected geometrically. That is needed for controlled edits, but do not describe it as verifying exact immutable fixture bytes at runtime. Freeze fixture identity externally for the reading trial.
## Reviewed hashes and limits
SHA-256, collected from the inspected source; all relative paths are from the experiment worktree:
Installed dependency sources were read under `C:/Users/User/Documents/Git/ARCADIA-Studio/.local/toolchain/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/`, versions Iced graphics/wgpu/tiny-skia 0.14.0 and cosmic-text 0.15.0. No web or secondary-source inference was required.
This review supports a narrowly identified fixed-scene measurement/render experiment, with one actionable preview state mismatch. It establishes neither native readability, glyph-level export parity, actual latency, successful tests, nor production acceptance. Parent should preserve the original failure, repair at the desktop layout/preview boundary, then recheck affected lifecycle behavior before broadening claims.
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.