Skip to content

test: verify history footer painting at native window sizes - #63

Merged
johnnyhuy merged 1 commit into
mainfrom
agent/issue-62-native-history-captures
Nov 13, 2026
Merged

johnnyhuy merged 1 commit into
mainfrom
agent/issue-62-native-history-captures

Conversation

@johnnyhuy

@johnnyhuy johnnyhuy commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

History tool-preview tests now resize the native Electron window, honour the host display's size limits and verify that the renderer and screenshot use the same dimensions. Captures also check that the footer is below the tool card, receives pointer input and actually paints its label after expansion, collapse and a resize to 900 by 600 and back.

Part of #2 and #61.
Closes #62.

This is a test-harness slice. Nothing user-facing changed in the application.

Verification

  • bun install --frozen-lockfile passed.
  • mise exec -- bun run lint passed.
  • mise exec -- bun run typecheck passed.
  • mise exec -- bun run test:unit passed, 90 tests.
  • mise exec -- bun run test:integration passed, 77 tests.
  • mise run build passed, including lint, typechecking, unit and integration tests and the production bundle.
  • mise exec -- bun run test:e2e --reporter=verbose passed, 53 tests across seven Electron suites.
  • mise exec -- bun run test:e2e tests/e2e/tool-preview.test.ts --reporter=verbose passed with the final footer assertions.
  • git diff --check passed.

The two extended Electron regressions are bounds a long write line and keeps the footer painted through native window resizing and its edit equivalent. Full-input clipboard, truncation, keyboard expansion and horizontal-overflow coverage remain in both cases.

Proof

$ mise exec -- bun run test:unit
 Test Files  10 passed (10)
      Tests  90 passed (90)

$ mise exec -- bun run test:integration
 Test Files  13 passed (13)
      Tests  77 passed (77)

$ mise exec -- bun run test:e2e --reporter=verbose
 Test Files  7 passed (7)
      Tests  53 passed (53)

The previous test emulated a 1280 by 1100 renderer while the local native content area remained 1280 by 840. A temporary diagnostic rejected the known-bad hosted PNG linked in #61 with zero footer text pixels at the expected position, while the corresponding local capture had 94. This verifies that the new pixel check detects the recorded capture symptom; the original live overlap has not reproduced locally.

Native resizing now gives matching native, renderer and capture dimensions, including macOS display clamping. Local desktop proof measured 1280 by 948, a reachable footer and 71 matching text pixels; minimum-window proof measured 900 by 600, a reachable footer and 94 matching text pixels. Each PNG has a JSON sidecar containing the measured geometry, hit target, text-pixel count and dimensions. Proof is saved under .tmp/proof/ and test-results/tool-preview/ for the existing CI artefact upload. Scratch captures are excluded from the commit.

Playwright Electron capture succeeded locally and on hosted macOS. Direct inline attachment is blocked because browser discovery returned The browser access host is unavailable and the native Firefox fallback returned cgWindowNotFound.

Download the hosted PNGs and geometry sidecars. The artefact contains test-results/tool-preview/ with expanded, narrow, restored and collapsed footer captures for both write and edit cards. GitHub retains this artefact until 20 November 2026. The hosted PNGs were downloaded and visually reviewed.

Hosted native, renderer and capture sizes agree at 1280 by 677 for the desktop and 900 by 600 for the minimum window. The expanded desktop write and edit proofs contain 93 and 66 matching footer text pixels respectively, and both footer hit targets pass. The write minimum-window proof contains 91 matching text pixels. All eight expanded, resized, restored and collapsed footer checks passed. The shorter hosted display requires scrolling to show the footer, so the expanded captures show the bottom of the card; collapsed captures show the full card and footer together. The documented overlap is absent from these new hosted captures.

$ mise run test:e2e  # hosted macOS
 tests/e2e/tool-preview.test.ts (2 tests) passed
 Test Files  7 passed (7)
      Tests  53 passed (53)

This establishes reliable native-size proof and a guard against the recorded symptom. The underlying Chromium compositor behaviour has not been isolated beyond the viewport-size discrepancy. Keep #61 open until this child slice is merged; the remaining tool-card roadmap stays under #2.

Post-merge verification on 13 November 2026

Merged as 41d05c8 and rechecked on main in a fresh worktree. bun install --frozen-lockfile, mise exec -- bun run lint, mise exec -- bun run typecheck, mise exec -- bun run test:unit (90 passed), mise exec -- bun run test:integration (77 passed) and mise run build all passed. Use the pinned Node 22.23.0 through mise; the machine's unpinned Node 26 shell failed six settings tests because its localStorage API was unavailable.

mise exec -- bun run test:e2e --reporter=verbose was attempted once in the fresh worktree. Electron could not launch because its local framework was missing. All seven suites failed during setup and all 53 tests were skipped, so this run supplies no new local screenshot evidence. The hosted 53-test pass and PNG evidence linked above remain the behaviour proof for the merged commit. The hosted artefact was downloaded again and the collapsed write and expanded edit captures were visually checked; both place the footer below the tool card.

$ mise exec -- bun run test:unit
 Test Files  10 passed (10)
      Tests  90 passed (90)

$ mise exec -- bun run test:integration
 Test Files  13 passed (13)
      Tests  77 passed (77)

$ mise exec -- bun run test:e2e --reporter=verbose
 Library not loaded: @rpath/Electron Framework.framework/Electron Framework
 Test Files  7 failed (7)
      Tests  53 skipped (53)

Co-authored-by: OpenAI Codex <noreply@openai.com>
@johnnyhuy
johnnyhuy marked this pull request as ready for review November 13, 2026 11:43
@johnnyhuy
johnnyhuy merged commit 41d05c8 into main Nov 13, 2026
15 checks passed
@johnnyhuy
johnnyhuy deleted the agent/issue-62-native-history-captures branch November 13, 2026 15:30
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.

Verify history tool preview captures at native Electron window sizes

1 participant