Skip to content

Make the Skills library scroller-style test deterministic (#29) - #30

Merged
sarthakagrawal927 merged 1 commit into
mainfrom
agent/contextdaddy-issue-29
Oct 9, 2026
Merged

sarthakagrawal927 merged 1 commit into
mainfrom
agent/contextdaddy-issue-29

Conversation

@sarthakagrawal927

Copy link
Copy Markdown
Member

Fixes #29.

AppKit resolves NSScroller.preferredScrollerStyle on the first read in a process and caches it (confirmed with a standalone probe: setting AppleShowScrollBars after the first read has no effect). In a full run an earlier suite has already created AppKit views, so rendersLibraryAtSupportedWidthsWithoutLiveData asserted a style it couldn't control.

Change (test only):

  • Lay out against the style AppKit actually resolved.
  • New per-width checks: the hosted NSScrollView uses that same style (the view's width reservation reads the process style), and with legacy scrollers the clip view is narrower by the scroller width. The existing no-overflow and scroll-to-bottom checks are unchanged.
  • The strict requested-style check stays for explicit CONTEXTDADDY_TEST_SCROLLBARS runs (use --filter).

Verification (local Mac):

🤖 Generated with Claude Code

AppKit resolves NSScroller.preferredScrollerStyle once per process, so in a
full run the style was already fixed by an earlier suite and the test's
style assertion depended on suite order and the Mac's default. Lay out
against the resolved style, check the hosted scroll view uses that same
style and that legacy scrollers reserve their width, and keep the strict
requested-style check for explicit CONTEXTDADDY_TEST_SCROLLBARS runs.

Closes #29

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sarthakagrawal927
sarthakagrawal927 merged commit 06ac896 into main Oct 9, 2026
3 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.

Flaky test: SkillLibraryViewTests scroller-style expectation depends on suite order

1 participant