Repository navigation
perf(ui): avoid polling already-ready folder-panel controls - #262
Merged
Merged
Conversation
…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
marked this pull request as ready for review
October 9, 2026 16:21
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Check each native folder-panel control's current
exists/isHittablestate before starting XCTest's polling wait inDocumentationExportUITests. 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
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.5c0b102refactor(ui): inline folder-panel readiness checks. Replaced thereadyOrWaithelper with direct||short-circuits, removed the synthetic control test that only exercised||, attachedapp.debugDescriptionto the hittability assertion, and corrected the doc paragraph.Deferred
Validation
summarize-documentation-ui.py --self-test, hygiene, golden, test-lane, screenshot-tour, sanitizer and changelog checks pass locally; Swift parse plusswift-format lint --strictpass in a Swift 6 container.5c0b102: all six checks green, including both UI test lanes.Generated by Claude Code