Skip to content

perf(ui): avoid polling already-ready folder-panel controls - #262

Merged
johnny4young merged 4 commits into
mainfrom
perf/documentation-folder-panel
Oct 9, 2026
Merged

johnny4young merged 4 commits into
mainfrom
perf/documentation-folder-panel

Conversation

@johnny4young

@johnny4young johnny4young commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Check each native folder-panel control's current exists/isHittable state before starting XCTest's polling wait in DocumentationExportUITests. An already-ready control skips the wait call; a delayed or missing control reaches the same five-second wait and the same failing assertion.

The change is limited to the UI test and docs/DOCUMENTATION-UI-PROFILING.md. No production code, workflow, matrix, time budget or threshold changes; the real Export click, Go to Folder keyboard entry, native dialog and scoped OK-button click all remain.

Measurement status

This is a candidate optimization, not a proven one. The first single-run timing samples per OS were slower than the historical #261 baseline, and XCTest's waits also evaluate readiness when they start, so any gain may be small. Use the eight-phase markers and matched-run protocol in the profiling doc before claiming savings.

Review follow-ups

  • Merged origin/main (which now contains test(ui): profile documentation export phases without reducing coverage #261) and resolved the add/add conflicts by keeping main's summarizer, Makefile and test file, then re-applying only this PR's change.
  • 5c0b102 refactor(ui): inline folder-panel readiness checks. Replaced the readyOrWait helper with direct || short-circuits, removed the synthetic control test that only exercised ||, attached app.debugDescription to the hittability assertion, and corrected the doc paragraph.

Deferred

  • Nothing confirms Go to Folder finished navigating, or that the OK button is enabled, before the click. This predates the PR; worth a separate change.

Validation

  • summarize-documentation-ui.py --self-test, hygiene, golden, test-lane, screenshot-tour, sanitizer and changelog checks pass locally; Swift parse plus swift-format lint --strict pass in a Swift 6 container.
  • CI on 5c0b102: all six checks green, including both UI test lanes.

Generated by Claude Code

Base automatically changed from test/documentation-ui-profiling-oct07 to main October 8, 2026 19:59
claude added 2 commits October 9, 2026 15:29
…lder-panel

# Conflicts:
#	Makefile
#	UITests/DocumentationExportUITests.swift
#	docs/DOCUMENTATION-UI-PROFILING.md
#	scripts/summarize-documentation-ui.py
- Replace the readyOrWait helper with direct short-circuiting checks
- Drop the synthetic control test that only exercised the || operator
- Attach the accessibility tree to the OK-button hittability assertion
- Describe the change and its measurement limits accurately in the profiling doc
@johnny4young
johnny4young marked this pull request as ready for review October 9, 2026 16:21
@johnny4young
johnny4young merged commit fe792fc into main Oct 9, 2026
6 checks passed
@johnny4young
johnny4young deleted the perf/documentation-folder-panel branch October 9, 2026 16:22
johnny4young added a commit that referenced this pull request Oct 13, 2026
Check each native folder-panel control's current readiness before starting XCTest's polling wait; delayed or missing controls keep the same bounded waits and assertions. Candidate optimization only: its timing effect still needs matched runs.
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