Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
- Last reviewed commit: c2cda9990ca31c01b6a6fb3d47fde3384aef1c3a
- Latest commit, not reviewed: 736248ede0feed2096f156034dc1b9c7a9d6a216
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- Resume reviews
- Trigger review
No actionable comments were generated in the recent review.
Walkthrough
-
Draft clears now increment a reset generation that reaches the iOS native editor. The editor applies newer generations despite stale event counts, ends active composition, and tags native events with their generation. React and Swift tests cover clears, stale events, composition, and later typing.
Changes: Composer reset handling
Layer / File(s) Summary Track and pass draft reset generations
apps/mobile/src/state/use-composer-drafts.ts,apps/mobile/src/native/T3ComposerEditor.types.ts,apps/mobile/src/components/ComposerEditor.tsx,apps/mobile/src/native/T3ComposerEditor.tsxDraft clear operations increment a per-draft reset generation. ComposerEditorpasses a reader for that generation through the native editor interface.Apply and acknowledge generation-aware updates
apps/mobile/src/native/composerEditorRevision.ts,apps/mobile/src/native/T3ComposerEditor.ios.tsx,apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swiftControlled documents and native events carry reset generations. The native editor applies documents with newer generations despite stale event counts, and the JavaScript editor rejects events from older generations. Test reset and stale-event behavior
apps/mobile/src/components/ComposerEditor.ios.test.tsx,apps/mobile/modules/t3-composer-editor/tests/ios/main.swift,apps/mobile/modules/t3-composer-editor/tests/run-ios.sh,apps/mobile/vite.config.tsReact and Swift tests cover clears, stale event counts, draft switching, IME composition, and subsequent typing. The iOS test runner compiles and runs the Swift tests. Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related issues
- pingdotgg/t3code#7390 — Describes stale controlled text after a thread change or send clear; this change allows a newer reset generation through the native revision check.
- pingdotgg/t3code#17422 — Describes native events rejected by the revision handshake; this change adds generation-aware event acknowledgment.
- pingdotgg/t3code#20982 — Reports stale composer text after Send; this change addresses stale native text after a draft clear.
- pingdotgg/t3code#15129 — Describes stale native or draft snapshots after manual edits; this change updates event handling for reset generations but retains a limitation before native autocorrection applies.
Suggested reviewers:
juliusmarminge
Merge Risk: External image Minimal · up to c2cda
-
No merge-blocking issue is established. Physical-device behavior remains unverified by the supplied test results.
Pre-merge checks: Passed 2 · Failed 2
-
Failed Failed checks: 2 warnings
Check name Status Explanation Resolution Out of Scope Changes check Warning The incremental change in apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift adds a new branch in ComposerTextView.paste. When the pasteboard has exactly one item and T3ComposerClip… Remove the thread-link paste-routing branch from ComposerTextView.paste in apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift from this pull request. If the paste behavior is required, move it to a separate pull request t… Description check Warning The description covers the problem, the change, and verification in detail. It describes the iOS autocorrection race that restores a cleared draft, the reset-generation fix, the native-echo follow-up,… Add a "Scope and approval" section, or fill the existing one if it is missing. Link the triaged bug issues ( #30167and#31210) and state whether a maintainer approved the direction and scope, with the approval comment link. The PR is a bug …Passed Passed checks: 2 passed
-
Check name Status Explanation Title check Passed The title clearly identifies the iOS composer bug and the intended fix: keeping the composer empty after sending an autocorrected word. Linked Issues check Passed Issue #30167requires that a send right after a final-word autocorrection clears the composer, and that the corrected text does not reappear. The previous assessment found this met by the reset-genera…Full details: Linked Issues check
-
Explanation
Issue
#30167requires that a send right after a final-word autocorrection clears the composer, and that the corrected text does not reappear. The previous assessment found this met by the reset-generation logic. The incremental diff from previous reviewed head a80dbed8 to c2cda999 shows no change in composerEditorRevision.ts. In T3ComposerEditorView.swift, the only incremental hunk changes paste routing. It does not touch the reset, marked-text, or stale-event paths that implement the objective. The React and Swift harnesses that cover these paths are unchanged in the inspected evidence. Other incremental paths (for example T3ComposerEditor.ios.tsx and use-composer-drafts.ts) were not inspected because the diff output was limited. The prior conclusion is preserved for those paths on the basis of the unchanged reset-path evidence.
-
Full details: Out of Scope Changes check
-
Explanation
The incremental change in apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift adds a new branch in ComposerTextView.paste. When the pasteboard has exactly one item and T3ComposerClipboard.hasThreadLink matches its text, the branch calls onPasteContext instead of super.paste. The inline comment describes multi-item pasteboard handling for thread links. Issue
#30167concerns autocorrection and composer clearing after send. The PR description and PR objectives do not mention paste routing or thread-link clipboard handling. The branch changes user-visible paste behavior without a connection to the linked objective. No paste-routing test is described in the PR summary. The diff for the other incremental paths was not inspected, so further out-of-scope changes cannot be excluded.Resolution
Remove the thread-link paste-routing branch from ComposerTextView.paste in apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swift from this pull request. If the paste behavior is required, move it to a separate pull request that links its own issue and includes its own harness coverage. Then confirm that the incremental diff contains only composer reset and echo changes.
Full details: Description check
-
Explanation
The description covers the problem, the change, and verification in detail. It describes the iOS autocorrection race that restores a cleared draft, the reset-generation fix, the native-echo follow-up, and the draft-identity keying. The Verification section lists focused tests, a UIKit harness run, a check:changed summary, device evidence with before/after recordings, and a list of what remains unverified. It states the physical iPhone and Android behavior is not verified. Two gaps remain. First, the Scope and approval section is missing. The template asks for a linked triaged issue or maintainer-approved discussion. The description links issues
#30167and#31210in the header, but it does not state whether they are triaged or cite a maintainer approval comment. Second, the description is long and mixes in CI run links, fingerprints, and audit notes. Those details do not follow the template's request for a focused account, and they make the required sections harder to find. The author did include a model and harness note at the end, which the template requests.Resolution
Add a "Scope and approval" section, or fill the existing one if it is missing. Link the triaged bug issues (
#30167and#31210) and state whether a maintainer approved the direction and scope, with the approval comment link. The PR is a bug fix, so explain briefly why it qualifies under the fix rules. Keep the Problem, Change, and Verification sections focused. Move long audit trails, fingerprints, and CI details into a short summary or a linked comment, so reviewers can find the required sections quickly.
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: bb4afa5
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2717f4e7-6738-45a0-b9a0-0238150fbe8c
External image Commits
-
Reviewing files that changed from the base of the PR and between a80dbed8b78bb78f92c5823a8ad461e2a646556e and c2cda9990ca31c01b6a6fb3d47fde3384aef1c3a.
External image Files selected for processing: 3
-
apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swiftapps/mobile/modules/t3-composer-editor/tests/run-ios.shapps/mobile/vite.config.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
External image Recent review info
-
External image Run configuration
-
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: bb4afa5
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
2717f4e7-6738-45a0-b9a0-0238150fbe8c
External image Commits
-
Reviewing files that changed from the base of the PR and between a80dbed8b78bb78f92c5823a8ad461e2a646556e and c2cda9990ca31c01b6a6fb3d47fde3384aef1c3a.
External image Files selected for processing: 3
-
apps/mobile/modules/t3-composer-editor/ios/T3ComposerEditorView.swiftapps/mobile/modules/t3-composer-editor/tests/run-ios.shapps/mobile/vite.config.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
-