Skip to content

feat(swift-ios): regenerate thread titles with request tracking - #8623

Open
saphid wants to merge 7 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:swiftui/pr-141-title-regeneration
Open

feat(swift-ios): regenerate thread titles with request tracking#8623
saphid wants to merge 7 commits into
pingdotgg:t3code/rebuild-mobile-app-swiftfrom
saphid:swiftui/pr-141-title-regeneration

Conversation

@saphid

@saphid saphid commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What Changed

Add title-regeneration actions to SwiftUI thread menus with visible progress and duplicate-request protection. Track request identity so stale responses do not replace a newer title, and show completion or failure feedback.

Why

The original native workflow offered no convenient way to request a better automatic title. Request tracking is needed to coordinate regeneration, manual rename and later server snapshots.

Verification and remaining proof

Candidate: ba8a1d2f5fab7108ced1cde7e35d99681e724ffd. This PR targets t3code/rebuild-mobile-app-swift; its historical integration base is b67837984e5650888b1eed0e1cd7fff83625f696. 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 description reports 205 cases across FeatureRootModelTests, ThreadTitleRegenerationMenuTests, HomeThreadSwipeActionTests and WireFixtureContractTests on the earlier base composition. Captures belong to an older accepted revision, not this current integration. No local build, test or client session was run for this description update; full historical local invocations were not recovered here.

The current parent already offers basic title regeneration. Reconcile the remaining request-identity and recovery protections with its current implementation, then repeat success, failure, duplicate, rename and stale-response proof. 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

Before (thread row menu without regeneration, light)

Before — thread row menu

After (regenerate action, in-progress state, duplicate suppressed)

After — authoritative success

After — duplicate action disabled

Interaction video (duplicate failure path)

Play the duplicate-failure video

Dark-mode captures and the full set are embedded in the tracking issue.

Tracking: native work item #141.

Automated summaries of the candidate

[!NOTE]
Medium Risk
Medium risk from a breaking FeatureClient signature change, non-trivial concurrency between regeneration, rename, shell vs detail metadata, and optimistic UI state that must stay aligned with server snapshots.

Overview
Adds end-to-end thread title regeneration on the Swift iOS client: users can trigger it from home and thread detail menus, see in-progress state on rows, and get VoiceOver announcements for start, success, and failure.

The FeatureClient API now takes a client-generated requestID and returns FeatureTitleRegenerationDispatchReceipt instead of firing-and-forgetting. NativeFeatureClient dispatches with that commandID, refreshes (including archived threads when needed), and classifies the outcome from snapshot sequence, server titleRegeneration metadata, and whether the title actually changed. Shell snapshots are treated as the authority for title and regeneration fields so stale detail loads cannot revert a new title.

FeatureRootModel adds FeatureTitleRegenerationTracker to block duplicate requests, reconcile against shell updates (including another client’s request ID), survive ambiguous timeouts, and expire with a bounded recovery timer. renameThread waits for an in-flight regeneration dispatch so server-side cancellation ordering stays correct.

Wire models gain ThreadTitleRegeneration and thread fields isRegeneratingTitle / titleRegenerationRequestID. Home and detail UIs use ThreadTitleRegenerationMenuState to hide, enable, or disable regeneration actions and show a small ProgressView on thread rows.

Reviewed by Cursor Bugbot for commit ba8a1d2. Bugbot is set up for automated code reviews on this repo. Configure here.

[!NOTE]

Add title regeneration tracking and UI progress to SwiftUI thread rows

  • Introduces FeatureTitleRegenerationTracker in FeatureRootModel.swift to track per-thread in-flight regenerations via request IDs, resolve them against server snapshots or a 60-second timeout, and emit VoiceOver announcements.
  • Updates regenerateThreadTitle on FeatureClient and NativeFeatureClient to accept a requestID and return a FeatureTitleRegenerationDispatchReceipt indicating regenerating, completed, failed, or refresh-unavailable status.
  • Adds a progress indicator and "Regenerating title" accessibility value to thread rows in HomeThreadCollectionView.swift and WorkspaceView.swift; context menus and accessibility actions disable the regenerate action while in progress.
  • Prevents stale detail frames from overwriting newer shell title/regeneration metadata via deferringToShellMetadata in FeatureRootModel.swift and emitCachedSnapshot in NativeFeatureClient.swift.
  • Risk: FeatureClient.regenerateThreadTitle now requires a requestID parameter and returns FeatureTitleRegenerationDispatchReceipt instead of Void; conformers outside the tree must update their implementation.

Macroscope summarized ba8a1d2.

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

Squash-merge of the accepted title-regeneration window
(22b22f1..b1ad17bbd) onto the current maintainer branch head.
@coderabbitai

coderabbitai Bot commented Aug 29, 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: dffbee65-5243-4f22-a76a-74ae832b700d

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 vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Aug 29, 2026
Comment thread apps/swift-ios/App/NativeFeatureClient.swift Outdated
Comment thread apps/swift-ios/Features/Root/FeatureRootModel.swift Outdated
Comment thread apps/swift-ios/Features/Workspace/HomeThreadCollectionView.swift
Comment thread apps/swift-ios/Features/Root/FeatureRootModel.swift Outdated
Comment thread apps/swift-ios/Features/Root/FeatureRootModel.swift
@macroscopeapp

macroscopeapp Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a user-facing title-regeneration workflow across the SwiftUI iOS client, including new concurrency/state tracking, server-backed request identity, refresh reconciliation, and a public client protocol change. The production scope is substantially more than a small UI adjustment, so the runtime and API interactions warrant human review.

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

@github-actions github-actions Bot added size:XXL 1,000+ changed lines (additions + deletions). and removed size:XL 500-999 changed lines (additions + deletions). labels Aug 29, 2026
Comment thread apps/swift-ios/App/NativeFeatureClient.swift Outdated
Comment thread apps/swift-ios/Features/Root/FeatureRootModel.swift

@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 030cc83. Configure here.

Comment thread apps/swift-ios/Tests/FeatureTests/FeatureRootModelTests.swift
Comment thread apps/swift-ios/Features/Root/FeatureRootModel.swift
@saphid saphid changed the title SwiftUI thread rows: regenerate a thread title feat(swift-ios): regenerate thread titles with request tracking Sep 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ 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