fix(ios): preserve PR drafts across related-file navigation - #446
Conversation
Scope UI-test return navigation to the related file navigation bar and verify original and edited title/body survive both round trips. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
🔵 Needs a closer look
Focused validation passed, but pinned-toolchain CI and broader acceptance remain unverified.
Pull request overview
Preserves iOS pull-request drafts when navigating to related files and returning to the review form.
Changes:
- Scopes related-file navigation to the correct navigation bar.
- Moves draft initialization to the enclosing navigation stack.
- Adds exact regression assertions for repeated navigation.
File summaries
| File | Description |
|---|---|
native/ios/PsycheApp/Tests/PsycheAppUITests/PsycheAppUITests.swift |
Verifies draft preservation across related-file navigation. |
native/ios/PsycheApp/Sources/PsycheApp/Views/ActionSheetView.swift |
Prevents draft resets when the form is recreated. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Independent final R3 review on exact head |
Scope
Related to #200 and #213; this narrow remediation does not close either outcome or mutate a managed mirror. Do not merge as part of this task.
Base:
2413314c787b0f592874fc6c1f5cfbe958925fc5Reviewed and validated head:
2a437b1b5b7ecf336410d87573e54e8246bd25aeBranch:
fix/ipad-pr-review-navigationTwo distinct problems were observed:
testPullRequestReviewSupportsEditingAndRelatedFileNavigationused the first button across all navigation bars. On regular-width iPad this did not return to the PR form. Scoping to the related file'sApp.swiftnavigation bar made the original test pass without production changes.onChange(initial: true)initialized drafts on the disappearing Form. Moving the existing request-ID observer to the enclosing NavigationStack preserves drafts across pushes/pops and retains initialization for new requests.The regression verifies exact original title/body after the first round trip and exact edited title/body after the second. Both idioms execute the same assertions without skips. No sleeps, raw hierarchy printing, new accessibility hooks, protocol changes, generated project edits, or weakened preservation assertions.
Reproduction and observed results
Local toolchain: Xcode 26.6, build 17F113, iOS Simulator 26.5. This is not the pinned Xcode 26.2 / build 17C52 / iOS 26.2 CI proof.
An initial combined two-destination invocation stalled before test output with both task simulators shut down. It was stopped, not counted as a pass. Explicitly booting the task-owned simulators and running one destination per invocation produced the results above.
Commands
All build/test commands ran from the reused clean checkout, on the branch above. The following are the exact build/test arguments; routine build output was filtered rather than published.
Task-owned simulator creation:
Allocated destinations were
F54851A5-F75E-43F3-A362-D0DF0C9AC6EF(iPad) andF9745C92-3C85-4231-81B8-1D1DB8CF2371(iPhone).Baseline and selector-isolation reproduction:
The final focused production-fix run used the identical arguments with
xcodebuild clean test.Final committed-head iPad run:
Final committed-head iPhone run:
Review, preservation, and proof gaps
Independent read-only code-review agent reviewed the exact commit against its parent and reported no significant issues. The parent completed the runtime checks above. Protected-branch review and required terminal exact-head CI checks remain separate merge gates; no merge is authorized here.
The author checkout and its debug-only patch were left untouched, with matching before/after file digests. Root dirty
.beads/interactions.jsonlalso has matching before/after digests. No Beads mutations. The existingfix/operator-acceptance-preflightandfix/ipad-regular-width-ui-testsrefs remain unchanged. No new worktree was created. The task checkout is clean.Both uniquely task-created simulators were shut down and deleted by exact UUID. Task-derived build/test artifacts were removed; no raw app hierarchy, screenshots, prompts, personal paths, or unrestricted logs are retained in this PR.
These results establish fixture-driven simulator navigation/draft preservation only. Pinned-toolchain CI, the full iOS UI suite, physical iPad/iPhone acceptance, live-host PR submission, signing, TestFlight, and distribution are not claimed. No project generation was needed because only existing Swift sources changed.
Rollback: revert
2a437b1b5b7ecf336410d87573e54e8246bd25aethrough a normal reviewed PR; no data migration, configuration, or protocol rollback is needed.