Skip to content

[CTX-1703] feat(render): paint kitty relative placements from the parent anchor (bitty#2875) - #2893

Merged
Xuepoo merged 2 commits into
mainfrom
ctx-2875/feat-relative-image-placement
Nov 5, 2026
Merged

Xuepoo merged 2 commits into
mainfrom
ctx-2875/feat-relative-image-placement

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Priority: P1 | Area: render | Labels: feat,P1,area:render | Milestone: v0.2.0 | Task: CTX-1703

Refs #2875

Summary

a=p relative placements (P= parent image, Q= parent placement, H=/V= cell offsets) were recorded as terminal truth — anchor, cascade delete, ENOPARENT refusal — but never painted: the pixel layer had no parent-anchor model, and the bodiless a=p mirror explicitly skipped them.

Presentation now stores the parent's wire identity verbatim and derives the child rect at paint time from the parent's painted origin plus the cell offsets. Nothing is re-anchored on scroll, so there is no second scroll bookkeeping and presentation still never mutates grid truth.

  • bitty-rich: KittyPlacement gains parent: Option<(u32, u32)> and parent_offset: (i32, i32); new display_relative_for_origin admission seam and placement_full_rect_resolved, which walks the parent chain (depth-bounded), takes the absolute ancestor's scroll-adjusted rect, adds the accumulated H/V offsets in pixels and uses the child's own span. KITTY_PLACE_MAX_PARENT_DEPTH = 8.
  • bitty-rich: relative children cascade with their parent (remove_placement, remove, delete_by_wire) so a later re-place of the same wire identity cannot resurrect a child truth already dropped.
  • bitty-rich: addressed re-puts now replace in place (terminal-truth upsert parity) instead of delete-then-add, so children of a re-put parent keep resolving and no duplicate blit stacks.
  • bitty-runtime: the bodiless a=p mirror accepts relative placements and calls the new seam with the captured parent link; the admission gate now checks that truth recorded the same parent (a refused child never paints).
  • bitty-runtime present path: the placement rect comes from the resolver, so scroll/clip/death follow the parent automatically.

Fail-closed

A missing parent, a virtual prototype as parent (never in the placement deque), an offset that overflows the i32 pixel range, and a chain past the depth bound all paint nothing and never panic. The depth bound matters because a cycle is wire-reachable: a re-put only requires its named parent to exist, so p1 → p2 → p1 can be built.

z-order

The child keeps its own z=, so the existing ImagePaintLayer split still applies: a negative-z child composites below text, a z >= 0 child above it.

Tests

Headless, through the same surface the shipped kitty paint tests use (placement counts, composite blit counts, headless_rgba pixels):

  • relative_child_paints_at_parent_origin_plus_offsets — child colour bounding box sits exactly H=2 / V=1 cells from the parent's.
  • relative_child_follows_parent_through_a_scroll — two scroll phases; the child keeps its offset and the exact second-phase delta is one cell per scrolled row.
  • relative_child_disappears_when_its_parent_is_deleted — truth and pixel layer both cascade to zero, no orphan pixels.
  • relative_child_fully_off_grid_paints_nothing — V=30 is clipped away while the parent still paints.
  • relative_below_text_child_paints_under_glyphs — z=-1 child has glyph ink punched through it, with a z=0 control run that covers the text completely (so the assertion discriminates).
  • relative_child_without_a_parent_paints_nothing — missing parent and virtual-prototype parent, with an absolute control run proving the same command without P= does paint.
  • relative_parent_cycle_fails_closed_without_hanging — the wire-reachable p1 ⇄ p2 cycle presents and paints nothing.
  • bitty-rich unit tests: offset + scroll resolution, missing parent, offset overflow, cycle at the depth bound, exact depth boundary, re-put keeps children / delete cascades.

All new runtime tests fail on the pre-change tree (verified by re-adding the !control.has_parent() gate: 6 of 7 fail), so they are behavioural, not tautological.

Deliberately left out

  • Animation replay for relative placements is unchanged (a=a still drives the parent's frame; a child replay path is not added).
  • a=T + P= (payload-carrying transmit-and-display) relative placements: only the bodiless a=p wire form is mirrored; the a=T path places at the cursor. Follow-up if a client needs it.
  • Location-based delete selectors (c/p/q/x/y/z) still do not clear the rendered layer — pre-existing residual, unchanged here.

Gates (local)

  • cargo fmt --all -- --check — ok
  • cargo clippy -p bitty-render -p bitty-runtime -p bitty-term-state --all-targets --offline -- -D warnings — ok, no warnings
  • cargo test -p bitty-term-state -p bitty-render -p bitty-runtime --offline — 255 test binaries, all ok, 0 failed
  • cargo +1.85 check -p bitty-rich --offline — ok (MSRV 1.85, no let-chains)
  • RUSTDOCFLAGS="-D warnings" cargo doc -p bitty-rich --no-deps — ok (intra-doc links)

just ci-local was not run: this lane is instructed to use the targeted gates above to avoid colliding with parallel lanes sharing the act image and target cache.

Summary by CodeRabbit

  • New Features
    • Kitty graphics can now be positioned relative to another image, with their placement following the parent as content scrolls.
  • Bug Fixes
    • Relative placements are no longer rendered when their parent is missing or the placement chain is invalid.
    • Removing a parent image also removes its dependent placements. Replacing an existing placement now updates it without an intermediate removal.

…ent anchor (bitty#2875)

Relative placements (`a=p` with `P=`/`Q=` plus `H=`/`V=`) were stored as
terminal truth but never reached the screen: the pixel layer had no
parent-anchor model and the bodiless `a=p` mirror skipped them.

Presentation now records the parent's wire identity verbatim and derives the
child rect at paint time from the parent's painted origin plus the cell
offsets (`KittyImageLayer::placement_full_rect_resolved`). Scroll and parent
death need no second bookkeeping: the parent rect is recomputed every frame,
so the child follows a scroll, hides when the parent leaves the grid, and
dies with the parent (delete cascade added to the rich layer so a re-place
cannot resurrect a dropped child).

Fail-closed: a missing parent, a virtual prototype (never in the placement
deque), an unrepresentable offset, or a chain past
`KITTY_PLACE_MAX_PARENT_DEPTH` paints nothing and never loops — a cycle is
reachable on the wire because a re-put only needs its named parent to exist.
z-order stays the child's own `z=`, so a negative-`z` child still composites
below text.

Addressed re-puts now replace in place (truth's `upsert` parity) instead of
delete-then-add, so children of a re-put parent keep resolving and no
duplicate blits stack.

No per-frame allocation is added: the resolver reads the bounded placement
deque and the paint path allocates exactly what it did before. Presentation
still never mutates grid truth.
@Xuepoo Xuepoo added this to the v0.2.0 milestone Nov 5, 2026
@Xuepoo Xuepoo added feat Feature P1 Priority: high area:render Area: rendering labels Nov 5, 2026
@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 071c4198-4de0-4d4c-9aa6-f3c8ee823c9f
Commits

Reviewing files that changed from the base of the PR and between 87222a2 and 3f4989e.

Files selected for processing: 1

  • crates/bitty-rich/src/kitty_place.rs

No actionable comments were generated in the recent review.

Walkthrough

Kitty image placements can now reference a parent placement and cell offset. The runtime captures and stores those links, the painter resolves relative positions from parent origins, and placement removal cascades to descendants. Tests cover placement resolution, rendering, scrolling, invalid parent chains, replacement, and deletion.

Changes: Relative Kitty placements

Layer / File(s) Summary
Capture and store parent-linked placements
crates/bitty-rich/src/kitty_place.rs, crates/bitty-runtime/src/runtime/kitty_images.rs, crates/bitty-runtime/src/runtime/pty.rs
The PTY path captures parent identity and offsets for parented placements. Runtime admission stores relative placements alongside absolute placements. Addressed re-puts replace existing entries in place, and deleting a parent removes orphaned descendants.
Resolve and render relative placements
crates/bitty-rich/src/kitty_place.rs, crates/bitty-runtime/src/runtime/present.rs, crates/bitty-runtime/tests/kitty_images_present.rs
Relative rectangles use the parent’s scroll-adjusted painted origin and the child’s span. Resolution fails closed for missing, cyclic, excessive-depth, or unrepresentable parent chains. Rendering and tests cover scrolling, clipping, z-order, and deletion.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant PtyCapture
  participant Runtime
  participant KittyImageLayer
  participant paint_kitty_images
  PtyCapture->>Runtime: Pass captured parent identity and offset
  Runtime->>KittyImageLayer: Admit relative placement
  paint_kitty_images->>KittyImageLayer: Resolve placement rectangle
  KittyImageLayer-->>paint_kitty_images: Return rectangle or unresolved result
  paint_kitty_images->>paint_kitty_images: Blit resolved placement
Loading

Possibly related issues

  • bitty-terminal/bitty issue 2875: This change implements relative placement and z-order behavior described by the issue, but does not add image decoding or the image paint path.

Possibly related PRs

  • bitty-terminal/bitty#2881: This change extends the stored placement and presentation path from that PR with parent identities, relative resolution, and in-place re-puts.
Merge Risk: Minimal · previous review 87222

No identified issue blocks merging after normal checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: Kitty relative placements are painted from the parent anchor. The raw summary and objectives confirm that the PR adds parent-relative resolution and rendering for a=p …
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: Kitty relative placements are painted from the parent anchor. The raw summary and objectives confirm that the PR adds parent-relative resolution and rendering for a=p placements with P=/Q= parent identity and H=/V= offsets. The title includes a tracker prefix and a PR number, which do not affect the assessment. The title is specific and matches the changeset.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 4 files. (1 skipped: 1 too large.)

Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 33a0adcc-1dde-4722-8478-fc538d897b12
Commits

Reviewing files that changed from the base of the PR and between ef09532 and 87222a2.

Files selected for processing: 5

  • crates/bitty-rich/src/kitty_place.rs
  • crates/bitty-runtime/src/runtime/kitty_images.rs
  • crates/bitty-runtime/src/runtime/present.rs
  • crates/bitty-runtime/src/runtime/pty.rs
  • crates/bitty-runtime/tests/kitty_images_present.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

…tive placement test

The workspace quality gate runs clippy with -D warnings across --all-targets; the new assertion spelled a cell offset as 1 * 16, which trips clippy::identity_op. Value unchanged.

@Xuepoo Xuepoo left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read-only review of ctx-2875/feat-relative-image-placement at 3f4989e (base origin/main ef09532). All claims below come from reading the tree and running the commands in this worktree; the PR body was not used as evidence.

1. Resolution math — PASS

KittyImageLayer::placement_full_rect_resolved (crates/bitty-rich/src/kitty_place.rs:2814-2850) walks while let Some((parent_image, parent_placement)) = ancestor.parent (2827), accumulates each link's wire H=/V= at 2834-2835 (dx_cells.checked_add(..parent_offset.0), dy_cells.checked_add(..parent_offset.1)), takes the absolute ancestor's painted rect at 2839 (placement_full_rect(ancestor, metrics, scrollback_now)), and adds the accumulated cell offsets in pixels at 2843-2844. Extent comes from the child, not the parent: 2847-2848 read placement.cols/placement.rows.
Rationale: the child rect is exactly parent_painted_rect.origin + Σ(H,V)·cell_metrics with the child's own span, recomputed per frame (nothing of the child's own anchor/base is consulted).

2. Cycle/overflow safety — PASS

Depth bound: KITTY_PLACE_MAX_PARENT_DEPTH: u8 = 8 (kitty_place.rs:331), enforced at 2828-2831 (if depth >= KITTY_PLACE_MAX_PARENT_DEPTH { return None }), counter advanced with depth.saturating_add(1) (2837). No wrapping/panicking arithmetic on the new path: checked_add/checked_mul at 2834-2835 and 2843-2844, i32::try_from(..).ok()? at 2845-2846, saturating_u32(..) at 2849; the reused ancestor rect is itself saturating (2785-2788). No unwrap/indexing/as-truncation in the resolver or in cascade_relative_orphans (2874-2893, whose loop strictly shrinks the deque).
Rationale: a wire-reachable cycle terminates at the 8th link and an unrepresentable offset returns None rather than saturating into a plausible wrong origin.

3. Fail-closed refusals — PASS

Three distinct None paths, no panic:

  • missing parent / off-origin parent: kitty_place.rs:2833 (find_placement_for_origin(..)?, origin-scoped at 2855-2864);
  • virtual prototype: never lives in placements (it is in virtual_protos), so 2855-2864 misses it → 2833 returns None; truth also refuses it upstream (crates/bitty-term-state/src/state.rs:2334-2339);
  • depth/cycle and offset overflow: 2828-2830, 2843-2846.
    Off-grid resolved rect: the paint path clips at crates/bitty-runtime/src/runtime/present.rs:6616-6622 (viewport intersection → continue), reached after 6606-6612.
    Evidence in tests: kitty_place.rs:4215-4263 (missing parent + H=i32::MAX overflow), 4265-4287 (cycle), runtime kitty_images_present.rs:1140-1171 (V=30 off-grid: placement count 2, blits 1, no blue pixels), 1258-1279 (cycle paints 0).
    Rationale: every refusal is an Option short-circuit on the paint path; nothing panics and nothing paints.

4. Layering — PASS

Paint path present.rs:6575-6683: per-placement z order comes from placements_in_paint_order_for (kitty_place.rs:2564-2572, sort_by_key(|p| p.z)), and the blit layer is chosen at present.rs:6680 as ImagePaintLayer::from_z(placement.z) (crates/bitty-render/src/grid.rs:1871-1877: negative → BelowText, else AboveText). The z used is the child's own: pty.rs:1200 captures control.z_index, forwarded through kitty_images.rs:1899-1911 into display_relative_for_origin(.. z ..) (kitty_place.rs:2380-2394). Relative resolution never rewrites z.
Rationale: a relative child inherits no layer from its parent; z=-1 composites below text and z=0 above, and the runtime test relative_below_text_child_paints_under_glyphs (kitty_images_present.rs:1173-1212) carries a z=0 control run that covers the text completely (blue == area), so the below-text assertion is not satisfiable by an inert path.

5. Truth boundary — PASS

git diff --stat origin/main...HEAD touches only crates/bitty-rich/src/kitty_place.rs, crates/bitty-runtime/src/runtime/{kitty_images,present,pty}.rs, crates/bitty-runtime/tests/kitty_images_present.rs — nothing under crates/bitty-term-state. Presentation stores the parent's wire identity only: pub parent: Option<(u32, u32)> (kitty_place.rs:855) and pub parent_offset: (i32, i32) (858), doc at 849-857 stating the resolved anchor is deliberately not stored. pty.rs:1281-1291 only reads truth (kitty_placements().get(..)) to decide whether to mirror; kitty_place_stored_relative (kitty_images.rs:1831-1860) and push_placement (kitty_place.rs:2402-2476) mutate self.kitty_images only.
Rationale: truth stays the single writer of grid state (invariant 3); the presentation layer derives geometry from stored identity at paint time.

6. Test non-tautology — PASS (proved by reintroducing the old gate)

Temporarily restored the pre-change gate in pty.rs (&& !control.has_parent() on the bodiless_place condition that the PR deleted), then:
cargo test -p bitty-runtime --offline --test kitty_images_present → test result: FAILED. 33 passed; 6 failed (exit 101). The six failures are exactly the new relative-paint pins: relative_child_paints_at_parent_origin_plus_offsets (1018: "parent and child both place"), relative_child_follows_parent_through_a_scroll (1058), relative_child_disappears_when_its_parent_is_deleted (1116), relative_child_fully_off_grid_paints_nothing (1149), relative_below_text_child_paints_under_glyphs (1190), relative_parent_cycle_fails_closed_without_hanging (1271, a stale absolute parent still painted once). Reverted with git checkout -- crates/bitty-runtime/src/runtime/pty.rs; git status --short clean and the suite re-ran 39 passed; 0 failed.
Rationale: the pins fail when the feature is removed, and the one that still passes under the gate (relative_child_without_a_parent_paints_nothing, 1214-1256) is a truth-refusal pin with an absolute-control run, so it is legitimately gate-independent rather than tautological. The pixel assertions are colour bounding boxes on headless_rgba, not just counters.

7. Regression safety — PASS

cargo test -p bitty-rich --offline --lib kitty_place → 52 passed; 0 failed; 273 filtered out (exit 0).
cargo test -p bitty-runtime --offline --test kitty_images_present → 39 passed; 0 failed (exit 0).
Extra signal: full cargo test -p bitty-rich --offline --lib → 325 passed; 0 failed.
Rationale: the re-put-in-place change (no delete_by_wire before re-place) did not break the existing FIFO/quota/wire-identity pins.

8. Gate parity — PASS

cargo fmt --all -- --check → exit 0.
cargo clippy -p bitty-rich -p bitty-runtime --all-targets --offline -- -D warnings → exit 0, no warnings printed (Finished dev profile ... in 25.66s).
The previously failing clippy::identity_op class is gone: 3f4989e0 rewrites base.y + 1 * 16 to base.y + 16 at kitty_place.rs:4189, and the -D warnings all-targets run over both crates is clean.
Rationale: the exact gate command the CI uses on these crates passes on the final head.

9. MSRV 1.85 — PASS

cargo +1.85 check -p bitty-rich --offline → exit 0 (Finished dev profile ... in 8.77s). clippy.toml pins msrv = "1.85" and Cargo.toml:33 rust-version = "1.85". No let-chains were introduced: git diff origin/main...HEAD contains no && let / || let / if let ... && form; the new walk is a plain while let Some(..) = ancestor.parent (kitty_place.rs:2827) and the nested if let/if pair at 2443-2452 avoids the let-chain form.
Rationale: the crate compiles on the declared MSRV and the newer-1.88 syntax is absent.

10. Hygiene — PASS

Both commits carry the ticket: [CTX-1703] feat(render): paint kitty relative placements from the parent anchor (bitty#2875) and [CTX-1703] fix(render): drop the identity op clippy flags in the relative placement test. Comments/docs are English (only typographic —/→/× characters, consistent with the surrounding module docs). No host paths or usernames in the diff (grep for /home/, /mnt/, /Users/, fuyu, C:\ → no hits). No unrelated files: the five changed files are the feature, its wiring, and its tests. No public API removals: git diff shows zero removed pub fn/const/struct lines; placement_full_rect (kitty_place.rs:2766) and the existing placement_rect/display_for_origin_with_wire signatures are intact, and the additions are KITTY_PLACE_MAX_PARENT_DEPTH (331), display_relative_for_origin (2367), placement_full_rect_resolved (2814), kitty_place_stored_relative (kitty_images.rs:1831).
Rationale: the diff is in-scope, additive, and ticket-stamped.

Findings

Blocking: none.

Non-blocking:

  • kitty_wire_spans_for (crates/bitty-runtime/src/runtime/kitty_images.rs:1531-1567) still derives damage spans from p.anchor_row/p.anchor_col, which a relative placement stores as the unused (0, 0) (kitty_place.rs:2422). It filters on p.wire_image, so a relative placement contributes a spurious damage span at row 0/col 0 in addition to truth's correct span (state.rs:2341-2342 resolves the real anchor). Extra repaint only — no wrong pixels — but the helper's doc ("from the same anchor/scroll math the present layer paints with") is now inaccurate for relative entries. Follow-up, not a blocker.
  • Quota eviction (kitty_place.rs:2462-2470) removes a placement without calling cascade_relative_orphans, so an evicted parent's child lingers (paints nothing) and could revive if the same wire identity is re-placed. Terminal truth has the same gap (placement.rs:605-624 pops front without cascading), so presentation matches truth rather than diverging — documented as parity, worth a comment.
  • The depth bound of 8 diverges from truth, which records an arbitrarily deep chain (it resolves only one level per admission). A chain deeper than 8 is recorded by truth but paints nothing. Intentional fail-closed, currently only stated in the resolver doc — fine, but a client-visible limit worth a line in the PR description.
  • Combined payload + a=p is still unsupported (any a=p continues at pty.rs:1302-1306 without pixel intake), so relative placement only works in the bodiless form. Pre-existing, unchanged by this PR, but the PR title reads broader than that.
  • cascade_relative_orphans is O(n²) over the deque and now runs on every remove_placement/delete_by_wire. Bounded by the placement caps, so acceptable; noted only for the record.

Not verified

  • No real compositor/GPU render: all geometry evidence is headless (headless_rgba pixel bounding boxes), not an on-screen frame.
  • Full-workspace clippy/test (cargo clippy --workspace) was not run; only the two named crates were checked as specified, plus the full bitty-rich lib suite.
  • The out-of-tree graphics extension crate (bitty-graphics, referenced as the W-141 raster mirror) is not in this worktree, so I could not confirm it needs no matching change; the KittyPlacement struct gained two fields and is not #[non_exhaustive].
  • kitty-spec conformance for a relative placement that omits c=/r= (truth refuses spanless places at state.rs:2317-2324, pre-existing) was not exercised.

VERDICT: APPROVE

@Xuepoo
Xuepoo merged commit 7ff36fc into main Nov 5, 2026
20 checks passed
@Xuepoo
Xuepoo deleted the ctx-2875/feat-relative-image-placement branch November 5, 2026 04:55
Xuepoo added a commit that referenced this pull request Nov 5, 2026
… text fallback (bitty#2875) (#2894)

* [CTX-1705] feat(render): truthful kitty a=q probes and image-cell text fallback (bitty#2875)

Closes the residual scope items of issue #2875 that PRs #2881/#2893 left
open.

Scope 4 (a=q reply truthfulness): a PNG support probe answered `;OK`
without reading the payload's `IHDR`, while the transmit path refuses an
`IHDR` past the decode ceilings. A client was therefore told images work
and got a blank. `bitty_rich::precheck_png_payload` now runs the decoder's
own pre-allocation gate (signature, `IHDR` placement, non-zero sides,
per-side/area ceilings, RGBA byte cap) and the probe calls it, so
`probe == OK` iff the same bytes transmit. Raw formats already had this
guarantee; PNG was the hole.

Scope 6 (a11y/scene contract): a direct `a=p`/`a=T` placement owns no grid
cell, so `bitty ctl terminal text` and the devtools grid-text snapshot
reported an empty hole where the user sees an image. The runtime now
derives each painted placement's cell footprint from the paint layer
(unit cell metrics, so cell coordinates are exact and headless
deterministic) and the shared text projection substitutes the Unicode
object-replacement character for covered *blank* cells. Cells that hold
real text keep it: an image over text must not erase that text from a
reader.

Scope 5 (animation): re-verified, no code gap. The bounded tick path
(33ms quantum floor, at most 4 timed steps, 256-frame/64-image caps) is
wired into present; added a test proving the *presented surface* changes
when a frame advances and that wrapping repaints frame 1's bytes, which
descriptor-only coverage could not catch.

Tests: PNG probe/transmit verdict agreement (fails pre-fix: the probe
answered OK), probe-over-refused-payload, image footprint + projection
through PTY bytes (fails pre-fix: blank grid), ctl terminal text stand-in,
deleted-image fail-closed, and the animation repaint pin.

* [CTX-1705] docs(rich): drop a private intra-doc link from precheck_png_payload (bitty#2875)

The rustdoc gate runs with -D warnings, and a public doc comment linked to
the private `decode_png`. Plain code formatting keeps the reference without
the broken link. Verified with RUSTDOCFLAGS="-D warnings" cargo doc
--no-deps -p bitty-rich -p bitty-runtime -p bitty-terminal.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:render Area: rendering feat Feature P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant