Skip to content

feat(swift-ios): keep failed source control output visible with accessible Retry - #7371

Open
saphid wants to merge 5 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:feat/issue87-tool-error-recovery
Open

feat(swift-ios): keep failed source control output visible with accessible Retry#7371
saphid wants to merge 5 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:feat/issue87-tool-error-recovery

Conversation

@saphid

@saphid saphid commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

What Changed

Keep a failed Source Control operation visible above the existing repository state and provide an accessible Retry action. If a Git operation succeeds but the following refresh fails, Retry reloads status instead of repeating the operation.

Why

A transient error could disappear, and a failed status refresh could be mistaken for a failed commit or push. Separate operation and refresh recovery prevents that accidental replay.

Verification and remaining proof

Candidate: 87ce6873a729a3c8e2d330f0cd056f3225c665e5. This PR targets t3code/rebuild-mobile-app-swift; its historical integration base is 22b22f1463b83963d851bd0574a36a20f224a28d. The current native parent inspected in the readiness review is b99405468a6b2be1e0f67d551ece824b1627e35c. Merging this child does not by itself deliver the native app to upstream main.

The hosted native build/test job passed on the candidate. The earlier report records 20 FeatureToolRecoveryTests at this head against target 22b22f1. The earlier 374-test bundle predates that integration and was not rerun afterwards. No local build, test or client session was run for this description update; full historical local invocations were not recovered here.

Refresh against the current native parent and capture retained errors, repeated failure, successful retry and VoiceOver focus. Keep mutation-success/refresh-failure verification in the focused suite. This PR is not evidence-complete for human merge review against the current native parent.

Earlier visual evidence

These retained captures/reports belong to the revisions and conditions stated below. They were not recaptured, visually inspected or revalidated for current-parent integration in this pass. Historical access/playback statements describe the original check, not a new one.

Earlier captures and their original conditions

The following media was captured on pre-merge head 47389c712. It remains useful for historical comparison but is not current-head proof.

Before, healthy repository in light appearance

Healthy source-control state in light appearance

Before, healthy repository in dark appearance

Healthy source-control state in dark appearance

After, retained failure and Retry in light appearance

Retained source-control failure with Retry in light appearance

After, retained failure and Retry in dark appearance

Retained source-control failure with Retry in dark appearance

Interaction video

Source-control failure, Retry, and recovery

Play or download the MP4.

Tracking: native work item #87.

Automated summaries of the candidate

[!NOTE]

Add persistent failure banner with accessible Retry to source control UI

  • Replaces transient alert-based error messaging in FeatureSourceControlView with a retained failure banner that shows a scroll-limited message and an accessible Retry button that replays the exact failed operation (including commit messages)
  • Adds a reusable recovery infrastructure in FeatureToolRecovery.swift: FeatureToolFailureState manages cancellation-aware failure state with one-time recovery announcements, FeatureToolRunState prevents overlapping operations via single-flight, and FeatureRecoverableOperation protocol models retryable operations
  • Shifts accessibility focus to failure content on error and back to content on recovery, announcing success exactly once
  • Changes performSourceControlAction on FeatureClient protocol and NativeFeatureClient to return Void instead of FeatureSourceControlStatus; callers now refresh status themselves after mutations
  • Behavioral Change: conformers of FeatureClient.performSourceControlAction must drop the return value; the source control view now performs an explicit post-action status refresh rather than relying on the method's return value

Macroscope summarized 87ce687.

Description and evidence audit: GPT-6 in Codex, using prepare-proof-media from #9926.

@github-actions github-actions Bot added the vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. label Aug 18, 2026
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f68ddd95-d8eb-4430-b3d9-f721e3989029

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Aug 18, 2026
Comment thread apps/swift-ios/Features/Shared/FeatureToolRecovery.swift Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This introduces a new production recovery workflow for source-control operations, including persistent failure UI, accessibility focus management, single-flight state, and Retry for side-effectful actions. It also changes the mutation and status-refresh boundary, so the scope and runtime behavior warrant human review.

You can add or adjust custom eligibility rules. Learn more.

@t3dotgg
t3dotgg force-pushed the t3code/rebuild-mobile-app-swift branch from 1f39d72 to fce7740 Compare August 18, 2026 21:35
…sible Retry

Recoverable source-control failures were invisible whenever a repository
status had already loaded: the error string only ever reached the
ContentUnavailableView fallback, so a failed commit, push, pull, or pull
request silently did nothing. There was also no way to retry the exact
failed operation and no accessibility focus handling.

Retain the failure content in a banner that survives its own retry, keep a
stable "Retry <operation>" accessibility label, replay the failed operation
with its commit message, move VoiceOver focus to the retained failure and
back to the refreshed repository status on recovery, and stop treating
cancellation as a failure.
@saphid
saphid force-pushed the feat/issue87-tool-error-recovery branch from 73a4932 to 27a897e Compare August 18, 2026 22:23
@github-actions github-actions Bot added size:XL 500-999 changed lines (additions + deletions). and removed size:L 100-499 changed lines (additions + deletions). labels Aug 21, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 42696d5. Configure here.

Comment thread apps/swift-ios/Features/Shared/FeatureToolRecovery.swift
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant