Skip to content

fix(core): clip transparent borders to scissor - #1353

Closed
opencode-agent[bot] wants to merge 1 commit into
mainfrom
transparent-stale-cells
Closed

fix(core): clip transparent borders to scissor#1353
opencode-agent[bot] wants to merge 1 commit into
mainfrom
transparent-stale-cells

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Summary

  • clip drawBox geometry to the active scissor before any border rendering path runs
  • prevent the transparent-border fast path from writing raw cells outside a scroll viewport
  • add both a native buffer invariant test and a high-level ScrollBoxRenderable regression that places an oversized transparent bordered child above a later sibling

Cause

drawBox only checked whether its bounds overlapped the current scissor. Its transparent-border fast path then wrote directly into the buffer, bypassing the point-level scissor validation used by normal cell writes. A tall bordered child could therefore paint through its scroll viewport and into later UI such as a composer.

Verification

  • high-level regression fails on origin/main and passes with this change
  • bun test src/tests/scrollbox.test.ts — 47 passed
  • bun run test:native — 1,877 passed, 5 skipped
  • bun run fmt:check
  • bun run lint
  • full repository build
  • verified against the original OpenCode long-message + scroll-to-top reproduction

Requested by: @kommander (Sebastian via Slack)

@simonklee

Copy link
Copy Markdown
Member

#1352 already fixes the same border clipping issue. This change can also move
box titles when a box is clipped. Please continue this work in #1352.

@simonklee simonklee closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants