Skip to content

test: replace fixed waits with observable readiness - #694

Merged
benvinegar merged 1 commit into
mainfrom
test/remove-fixed-test-waits
Aug 9, 2026
Merged

test: replace fixed waits with observable readiness#694
benvinegar merged 1 commit into
mainfrom
test/remove-fixed-test-waits

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

  • replace fixed broker, scrollbar, sticky-header, viewport-selection, session CLI, and TTY waits with observable readiness or narrowly configurable timing seams
  • drive real util-linux script sessions through controlled stdin and require clean process exits
  • strengthen scrollbar tests around visibility, auto-hide renewal, dragging, track paging, and edge geometry
  • register terminal-only coverage as skipped when the required script interface is unavailable

Performance

  • focused affected suite: 31.1s → 17.1s (45% faster)
  • TTY smoke suite: 26.3s → approximately 6.5s (75% faster)
  • broker conflict test: 5.0s → approximately 0.2s
  • sticky-header handoff test: 2.0s → approximately 0.2s

Validation

  • bun run format:check
  • bun run lint
  • bun run typecheck
  • bun test ./src ./packages ./scripts ./test/cli ./test/session (1,946 passed, 9 skipped, 7,159 assertions)
  • affected files with --rerun-each=10 (1,560/1,560 passed, 6,730 assertions)
  • TTY smoke with --rerun-each=10 (90/90 passed, 310 assertions)
  • bun run test:integration (97/97 passed, 372 assertions)

This PR description was generated by Pi using gpt-5.6-sol

@vercel

vercel Bot commented Aug 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hunk-web Ready Ready Preview Aug 8, 2026 9:04pm

Request Review

@greptile-apps

greptile-apps Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR replaces fixed test delays with observable readiness checks and configurable timing seams, while strengthening terminal-session and scrollbar interaction coverage.

  • Makes broker startup awaitable and adds injectable daemon/reconnect timing for focused tests.
  • Adds a configurable scrollbar auto-hide delay and verifies visibility, renewal, dragging, paging, and edge geometry directly.
  • Drives util-linux script sessions through controlled stdin, waits on rendered transcript state, verifies clean exits, and explicitly skips unsupported terminal environments.
  • Removes broad settling delays from viewport-selection and sticky-header interaction tests.

Confidence Score: 5/5

The PR appears safe to merge with no concrete blocking or non-blocking defects identified.

Production defaults and lifecycle guards remain intact, while the revised tests use bounded observable readiness, explicit cleanup, and functional terminal capability detection.

Important Files Changed

Filename Overview
src/session/broker/brokerClient.ts Returns the deduplicated startup promise and injects startup/reconnect timings without changing production defaults.
src/ui/components/scrollbar/VerticalScrollbar.tsx Makes the auto-hide delay configurable while preserving timer reset, drag, and unmount cleanup behavior.
test/session/cli.test.ts Replaces shell-timed termination with readiness polling, controlled terminal input, bounded teardown, and clean-exit validation.
test/smoke/tty.test.ts Introduces a reusable observable TTY interaction driver and registers unsupported terminal coverage as skipped.
src/ui/components/scrollbar/VerticalScrollbar.test.tsx Reworks scrollbar tests to assert painted visibility and concrete scroll positions rather than merely successful rendering.
src/ui/AppHost.interactions.test.tsx Moves final selection readiness checks outside repeated input loops and reduces oversized fixtures and iteration bounds.

Reviews (1): Last reviewed commit: "test: replace fixed waits with observabl..." | Re-trigger Greptile

@benvinegar
benvinegar merged commit 893759e into main Aug 9, 2026
13 checks passed
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.

1 participant