Skip to content

fix(ui): sometimes outlines get clipped#33846

Merged
Hona merged 5 commits into
devfrom
shell-subpixel
Jul 9, 2026
Merged

fix(ui): sometimes outlines get clipped#33846
Hona merged 5 commits into
devfrom
shell-subpixel

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • keep real 0.5px V2 card and content borders at their intended optical position, radius, token, and dimensions
  • give every measured framed timeline row a 0.5px paint allowance while excluding the fixed unpainted TurnGap spacer
  • cover Shell, Patch, non-tool AssistantPart, UserMessage, DiffSummary, and TurnGap scope with real virtual-timeline regressions

Root cause

The virtual timeline gives each row an explicit rounded measured height and overflow clipping. At fractional Electron/display zoom, the rounded allocation can end just inside a row's outer paint and remove its bottom device pixel. A 0.5px overflow clip margin matches the nearest-integer under-rounding bound without changing row measurement, starts, total scroll height, or layout.

Scope

An adversarial row audit found the measurement invariant is structural rather than tool-specific. Diff summaries, attachment-only user rows, and final Markdown borders can share the same geometry. Every timeline variant except TurnGap uses measured framed content, so the implementation now keys off the row model instead of mutable renderer/tool details.

The larger V2 focus-ring overflow is a separate accessibility issue: it is intrinsic 4.5px focus paint rather than subpixel measurement error and should not be addressed by weakening stale-content clipping in this PR.

Follow-up evidence

  • beta v0.0.0-beta-202607090154 was verified to contain the initial fix through beta apply commit 5f4f45c
  • real-beta screenshots showed a remaining missing edge on an apply_patch card, proving Bash-only targeting was incomplete
  • regressions fail the prior scopes and pass unchanged with the framed-row invariant

Validation

  • real Electron 42.3.3 app and virtualized timeline swept zoom factors from 1.0 through the effective 0.25 minimum
  • focused scope and edge regressions: 20/20 repeated runs passed
  • complete production timeline-stability suite: 44/44 browser cases passed
  • visual-stability analyzer: 23/23 passed
  • virtualizer and timeline measurement unit tests: 6/6 passed
  • app, E2E, and session-ui typechecks
  • target production V2 timeline benchmark retained identical geometry, zero bottom drift, zero blank samples, and no row replacement
  • formatting, diff checks, and final adversarial review

# Conflicts:
#	packages/session-ui/src/components/message-part.css
@opencode-agent opencode-agent Bot added the beta label Jul 8, 2026
@opencode-agent opencode-agent Bot marked this pull request as ready for review July 8, 2026 23:57
@Hona Hona changed the title fix(ui): stabilize shell output outline fix(ui): sometimes outlines get clipped Jul 9, 2026
@Hona Hona merged commit 13b9e55 into dev Jul 9, 2026
13 checks passed
@Hona Hona deleted the shell-subpixel branch July 9, 2026 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant