Files
ARCADIA-Studio/harness/release-lifecycle-clipping-ytr83r-20260911.md
T

4.7 KiB

B4 Create label clipping, 2026-09-11

Codex-ytr83r /root/lifecycle_clip. Root ratified correction A from release-lifecycle-typography-review-ytr83r-20260911.md after reboot; source base reported by root is fb77b857d26b64b80d99eabb4c65cf6785f3f451 (B4 52f6e17 plus CLI 023e3a8). Coordination: issue 1 comments 272 and 276; current issue 2, open PR list (empty), and ScenarioLifetimeRendering Wiki read before editing. Full canvas redesign remains Codex-956atf's work.

Implemented, frozen for root's build

The existing Create name is clipped to the 140 x 28 capsule's interior: 8 units of horizontal and 4 units of vertical padding. It retains short(name, 18), its original world position, size 12, default single-line/unbounded-width text and selection color. The finite clip can cut a glyph or hide the existing ellipsis; measured, grapheme-aware fitting remains separate work. No capsule, endpoint, marker identity, hit selection, lifetime, model or source contract changed.

Root review refined the first draft's 6-unit vertical clip padding to 4 units: the final 124 x 20 clip gives glyph overhang two extra units above and below while retaining the original text offset (+8, +6). The first draft merely matched the text origin symmetrically; it had no font evidence favoring the tighter bound. Default 12 x 1.2 line height is 14.4, but that does not establish ink bounds for accents or fallback glyphs. Native typography remains necessary.

draw_markers now receives Scene's current uniform scale. The only behavior.rs change is self.lifecycle.draw_markers(&mut f, self.selected, self.scale);. birth_label_clip scales the padded rectangle into canvas coordinates and intersects it with the origin/frame-size viewport, skipping an empty intersection or invalid scale. The clipped child explicitly reapplies scale to the unchanged world-space text position. It does not translate to the clip's origin.

Installed API scrutiny

Sources read under .local/toolchain/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/:

  • iced_graphics-0.14.0/src/geometry/frame.rs: size is available; with_clip drafts a child, invokes the closure, then pastes its geometry.
  • iced_wgpu-0.14.0/src/geometry.rs: Frame::new initializes identity transform and uses the supplied clip verbatim; draft calls that constructor. It does not inherit transform, add the clip origin, or intersect the parent clip. paste appends child text unchanged. Positive uniform scale in fill_text transforms the position and font size and stores the child's clip bounds.
  • iced_core-0.14.0/src/rectangle.rs: intersection returns only a strictly positive intersection. Size::ZERO exists in the installed core API.

This matches current Scene draw: origin-based full canvas frame followed by f.scale(self.scale), with no pan/rotation transform before markers. Any later camera integration must adapt BOTH clip coordinates and child text transform; this narrow bridge does not claim to support that future camera automatically.

Validation scope and handoff

Two tests are prepared in render_tests.rs: independently specified padded bounds at 0.05, 0.5, 1 and 2 scale, plus partial right/bottom clipping, negative-origin intersection, wholly outside/empty viewport and invalid scale. These exercise geometry only. Existing real-Scene endpoint, identity, hit and source tests remain unchanged. No fake font metrics or assertions of native pixel containment added.

No Cargo, rustc, rustfmt, native app, Git, dependency or frozen-fixture action was run by this worker. Root owns compilation/tests/format checks and native evidence. Root is preparing separate wide and cluster typography inputs with unchanged original six fixtures/oracle. Ordinary admission must precede native opening. Actual WGPU text appearance, fallback, clipping at normal and minimum Fit, DPI, hit identity and exact passive Project/SourceBundle preservation remain pending. No native, font-width or pixel pass follows from the geometry tests.

Frozen source SHA256 (before root's build or formatting):

File SHA256
crates/oa-desktop/src/behavior/scenario_lifecycle/render.rs 88594D0758358D776BB5453CCF5D482A5775600D926C53D4FCE71DD7833AC8C7
crates/oa-desktop/src/behavior/scenario_lifecycle/render_tests.rs 8C81103BB2B258289E137A45A5DE026A418CE681E3EE182C797ED3D05B53730F
crates/oa-desktop/src/behavior.rs BAE613FD378B39A2E265B354F6D652C549C1F9ECA4A79255EEDF95705FD52FCC

Root received the freeze before this report was completed so cached Windows compilation can proceed. No further source edits by this worker without follow-up. Root should link the resulting verified checkpoint and tests from the shared Wiki once its gate completes; the prior Wiki's pending acceptance remains accurate.