Skip to content

Stabilize Host App file context menus - #87

Merged
jacklv-coder merged 5 commits into
mainfrom
codex/stabilize-host-file-context-menu
Aug 4, 2026
Merged

Stabilize Host App file context menus#87
jacklv-coder merged 5 commits into
mainfrom
codex/stabilize-host-file-context-menu

Conversation

@jacklv-coder

Copy link
Copy Markdown
Owner

Summary

  • wait for the expected file-entry context action before tapping it
  • retry one bounded synthesized press with freshly validated frames
  • fail closed with frame diagnostics and refresh release-composition evidence

Why

Post-merge main CI exposed an iPhone UI race: testSystemFileImportAndShareExportRoundTrip pressed an imported file and immediately tapped Share / Export before the context menu entered the accessibility tree.

Verification

  • Host App UI test target build-for-testing
  • ruby Tests/Scripts/ReleaseComplianceTests.rb (71 runs, 635 assertions)
  • bash Tests/Scripts/RuntimeSmokeScriptTests.sh
  • ruby Scripts/generate-release-compliance.rb --check
  • Codex CR: no actionable findings / no P1-P2 findings

@jacklv-coder

Copy link
Copy Markdown
Owner Author

Controlled rerun evidence from post-merge main CI confirms the same context-menu race family on the unchanged code:

  • attempt 1: testSystemFileImportAndShareExportRoundTrip failed by immediately tapping missing Share / Export
  • attempt 2: the same test failed by immediately tapping missing Delete
  • both attempts passed the other four Files/Workspace tests; neither matched the infrastructure-retry signature
  • Host App iPad passed on attempt 2

Run: https://github.com/jacklv-coder/PocketRoot/actions/runs/30868795931

This PR routes every file/directory rename, delete, and share context action through the same bounded wait/retry helper.

@jacklv-coder

Copy link
Copy Markdown
Owner Author

PR CI first attempt exposed a second deterministic UI race in testFilesCreateAndDelete: the system keyboard onboarding could still cover the Create action, leaving the alert open and causing cascading missing-entry/disclosure failures.

This update now:

  • dismisses keyboard onboarding before Create/Rename submission;
  • submits through a newly validated app/element frame with one bounded retry;
  • waits 35 seconds, preserving the file-browser 30-second mutation contract plus accessibility refresh allowance;
  • guards expected files/folders/disclosures so a failed creation cannot cascade;
  • refreshes generated compliance evidence and static smoke assertions.

Local gates: 71 release-compliance tests / 635 assertions, runtime smoke script tests, compliance reproducibility, Swift parse, Host UI target build-for-testing, and Codex CR all pass. The CR-raised P2 timeout mismatch was fixed before this push.

@jacklv-coder

Copy link
Copy Markdown
Owner Author

Third stabilization pass pushed as f7e93b9.

Evidence from the previous run (30875009247):

  • 6/7 jobs were green, including Host App iPad.
  • testFilesCreateAndDelete passed, confirming the keyboard-onboarding/create fix.
  • The remaining iPhone failures were false negatives: the integrated command produced the exact file preview despite delayed SwiftTerm accessibility text, and Browse had already restored PocketRoot Host while the test was still waiting on a disappearing local-location row.

This pass:

  • writes unique per-run guest contents and verifies the exact Files preview as the authoritative integration result;
  • rechecks the restored Host destination before interacting with a stale document-picker row;
  • adds static smoke coverage for both guards.

Validation: compliance reproducibility check, runtime smoke tests, 71 release-compliance tests / 635 assertions, Swift parse, generic simulator Host App build-for-testing, diff check, and Codex CR all pass with no P1/P2 findings.

@jacklv-coder

Copy link
Copy Markdown
Owner Author

Fourth stabilization pass pushed as 80b26ce.

Run 30877483954 provided two precise iPhone-only failures while 5 other gates passed or were still finishing:

  • Quick Start failed after keyboard onboarding disappeared but the test immediately required a hide-keyboard element during the keyboard window transition.
  • Host failed because the system Continue button became invalid during XCTest interruption handling.

The same run confirmed the prior pass worked: Host Integrated Workspace, PTY-to-Files, system file import/share export, and Workspace session persistence all passed.

This pass captures validated UI frames and taps through application coordinates, then gives the keyboard/onboarding a bounded disappearance window. Functional file/preview/terminal assertions remain unchanged and fail-closed.

Validation: reproducible compliance evidence; Runtime smoke; 71 release-compliance tests / 635 assertions; both UI test sources parsed and strict-concurrency typechecked; Host and Quick Start generic simulator build-for-testing; diff check; Codex CR with no actionable findings.

@jacklv-coder

Copy link
Copy Markdown
Owner Author

Added a bounded recovery for the remaining external-consumer failure observed in run 30879405409. The downloaded xcresult showed XCTest infrastructure failure before any test method ran: Timed out waiting for AX loaded notification; phase.txt confirmed no retry occurred.

The shared runner now classifies that exact initialization signature, restarts only a runner-owned temporary Simulator, and retries once. Caller-owned devices, assertions, test-method timeouts, and any second failure still fail closed. Added a mocked regression, updated bilingual testing/troubleshooting docs, regenerated compliance evidence, and passed two Codex CR reviews.

Local validation:

  • bash Scripts/check-docs.sh
  • bash Tests/Scripts/RuntimeSmokeScriptTests.sh
  • ruby Scripts/generate-release-compliance.rb --check
  • ruby Tests/Scripts/ReleaseComplianceTests.rb (71 runs, 635 assertions)
  • git diff --check

@jacklv-coder
jacklv-coder marked this pull request as ready for review August 4, 2026 06:18
@jacklv-coder

Copy link
Copy Markdown
Owner Author

Final merge gate complete: all 7 required CI jobs are green on head 827ee5e, the final Codex CR found no actionable defects, there are no unresolved review threads, and the PR remains cleanly mergeable against unchanged main.

@jacklv-coder
jacklv-coder merged commit d4974d4 into main Aug 4, 2026
7 checks passed
@jacklv-coder
jacklv-coder deleted the codex/stabilize-host-file-context-menu branch August 4, 2026 06:26
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