Skip to content

[CTX-1271] fix(render): occlude lower chrome under detached floats (#2138) - #2160

Merged
Xuepoo merged 1 commit into
mainfrom
ctx-1271/fix-2138-float-occlude
Oct 16, 2026
Merged

Xuepoo merged 1 commit into
mainfrom
ctx-1271/fix-2138-float-occlude

Conversation

@Xuepoo

@Xuepoo Xuepoo commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Priority: P1 | Area: ui | Labels: bug,P1,area:ui | Milestone: 0.0.24 | RFC: n/a | Task: CTX-1271

Closes #2138.

Summary

Floating mode rendered tiled gaps/panel outlines behind the float: tiled text was hidden correctly, but the divider/border rings (and shadows/glows) of panels behind still painted over the float interior.

Root cause

DrawList paint order is fills, then rounded fills, then backgrounds, then overlay fills, then glyphs. The CTX-1148 opaque float fill is a FillRect (fills pass), so lower leaves RoundedFill rings/shadows/glows (rounded pass, painted later) drew over it.

Fix

crates/bitty-runtime/src/runtime/present.rs: Float-tier frames now also push a solid rounded cover (same frame, border: 0, float radius, theme bg) into the rounded pass, ahead of the float own shadow/glow/ring. Lower chrome is occluded; tiled baseline unchanged (Float tier only, one fill + one cover per float frame, empty frames skip).

Verification (TDD + headed)

  • New crates/bitty-runtime/tests/float_chrome_occlusion.rs: three-pane + detach over the divider; interior probe must be exactly theme bg. RED before (690 leaked px), GREEN after.
  • Related suites green: float_stacked_occlusion, float_opaque_present, float_cursor_occlusion, floating_present, pinned_floats, float_drag_resize, decoration_present, present_golden, style_present_s3.
  • Headed (Hyprland ws6 runbook, origin/main build): before shot shows tiled divider + focus/idle rings crossing the float interior (pixel forensics: cyan x=1273 + gray x=1285 over float span); after shot shows a clean float. Shots: recording/ctx-1271/shots/20261016T102103Z-04-2138-float.png (before), 20261016T105000Z-f2138-02-float.png (after).

Gates

  • cargo fmt --check, cargo clippy -D warnings, just test (7099 nextest + doctests + platform + benches + dev): green.
  • MSRV 1.85 cargo check --workspace --all-targets: green. cargo check --target x86_64-pc-windows-gnu: green.
  • just check: green except pre-existing scratch-paths failure on origin/main itself (WSL /mnt/ literals in component/wsl.rs, terminal/src/component.rs; untouched by this PR; fails identically on clean main).
  • just ci-local: cannot complete in this environment — the Quality job dies at the first compile because sccache GHA backend has no cache service under act (create gha cache failed ... not in github action environment; zero compiles attempted). Environmental, source-independent; remote CI runs Quality gates for real. Log: recording/ctx-1271/ci-local-2138.log.
  • No TODO/FIXME; no new absolute paths in touched files.

Reviewer notes

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

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 44 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
  • Configuration used: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 572d78ed-a9cd-455c-b8cc-ba147bbac0ae
📥 Commits

Reviewing files that changed from the base of the PR and between 8eafcb8 and cc945e3.

📒 Files selected for processing: 2
  • crates/bitty-runtime/src/runtime/present.rs
  • crates/bitty-runtime/tests/float_chrome_occlusion.rs
  • 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

Comment @coderabbitai help to get the list of available commands.

@Xuepoo Xuepoo added this to the 0.0.24 milestone Oct 16, 2026
@Xuepoo Xuepoo added bug Something isn't working P1 Priority: high area:ui Area: UI / layout labels Oct 16, 2026
@Xuepoo
Xuepoo merged commit 10f5a5e into main Oct 16, 2026
17 checks passed
@Xuepoo
Xuepoo deleted the ctx-1271/fix-2138-float-occlude branch October 16, 2026 13:10
Xuepoo pushed a commit that referenced this pull request Oct 16, 2026
…ts (#2168)

While a detached float is up, the surviving tiled leaves paint their
Core-owned chrome (focus/idle rings, shadows, glows) in the background
around the float. Follow-up to #2138/#2160, which fixed lower chrome
leaking OVER the float interior; this is the behind-float variant.

Design: HIDE, not dim. The surface already clears to theme background
in the gap bands, so suppressing background-tier chrome leaves a clean
backdrop while tiled text stays live. No new primitive, no alpha policy.
Detached-only gate via FloatStore: pinned overlays share the Float tier
but must not restyle the workspace they annotate. Popup/Messages tiers
keep their foreground chrome; only tiers strictly below Float (tiled
None, Editor base) hide. The float keeps its own chrome, glyph clipping
is unchanged (clip still returned), and the tiled baseline with no
detached float is untouched.
Xuepoo added a commit that referenced this pull request Oct 16, 2026
…ts (#2168) (#2174)

* [CTX-1280] fix(ui): hide background tiled chrome behind detached floats (#2168)

While a detached float is up, the surviving tiled leaves paint their
Core-owned chrome (focus/idle rings, shadows, glows) in the background
around the float. Follow-up to #2138/#2160, which fixed lower chrome
leaking OVER the float interior; this is the behind-float variant.

Design: HIDE, not dim. The surface already clears to theme background
in the gap bands, so suppressing background-tier chrome leaves a clean
backdrop while tiled text stays live. No new primitive, no alpha policy.
Detached-only gate via FloatStore: pinned overlays share the Float tier
but must not restyle the workspace they annotate. Popup/Messages tiers
keep their foreground chrome; only tiers strictly below Float (tiled
None, Editor base) hide. The float keeps its own chrome, glyph clipping
is unchanged (clip still returned), and the tiled baseline with no
detached float is untouched.

* [CTX-1280] fix: assert tiled chrome after float restoration

---------

Co-authored-by: reviewer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ui Area: UI / layout bug Something isn't working P1 Priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

floating mode shows gap + panel outlines behind the float

1 participant