Skip to content

Fix iOS chat keyboard dismissal - #787

Merged
arul28 merged 2 commits into
mainfrom
ade/start-skill-change-concerns-only-96d975f3
Jul 11, 2026
Merged

Fix iOS chat keyboard dismissal#787
arul28 merged 2 commits into
mainfrom
ade/start-skill-change-concerns-only-96d975f3

Conversation

@arul28

@arul28arul28 commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • dismiss the iOS keyboard and collapse the composer immediately after sending from every mobile chat surface
  • keep the Work new-chat activity carousel in scroll content so keyboard-driven composer growth no longer pushes it upward
  • document the mobile composer behavior

Validation

  • quality: clean after one synthesis/re-review pass
  • xcodebuild test -only-testing:ADETests/WorkComposerTriggerDetectorTests (18 tests passed)
  • node scripts/validate-docs.mjs

Summary by CodeRabbit

  • Bug Fixes

    • Composers now collapse and dismiss keyboard focus immediately when sending messages or creating chats.
    • Improved synchronization of text-field focus transitions to prevent inconsistent composer states.
    • Moved the usage activity carousel into the chat’s scrollable content for a more consistent layout.
  • Tests

    • Added coverage for clearing drafts, dismissing focus, and applying composer focus transitions.

Greptile Summary

This PR updates mobile chat composer behavior on iOS. The main changes are:

  • Chat composers dismiss keyboard focus after send or create actions.
  • Work chat draft state now tracks focus requests for its text view bridge.
  • Failed Work chat sends restore unsent text and attachments.
  • The Work new-chat usage carousel now lives inside the scroll content.
  • Tests and docs cover the new composer focus behavior.

Confidence Score: 5/5

This looks safe to merge.

No blocking issues found in the changed code.

No files need attention.

T-Rex T-Rex Logs

What T-Rex did

  • The environment was checked for iOS tooling, and xcodebuild, xcrun, and swift were all unavailable.
  • ADETests command execution is blocked by the missing native iOS tooling, as recorded in the work-composer log.
  • Docs validation completed successfully with exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

FilenameOverview
apps/ios/ADE/Views/Hub/HubComposerDrawer.swiftHub inline composer now collapses before clearing sent draft content.
apps/ios/ADE/Views/PersonalChats/PersonalChatsScreen.swiftPersonal new-chat creation now clears composer focus before starting work.
apps/ios/ADE/Views/Work/WorkChatSessionView.swiftWork chat draft state now coordinates text clearing, restore behavior, and focus requests.
apps/ios/ADE/Views/Work/WorkComposerTypedTriggers.swiftWork composer text view now applies requested focus changes and reports editing state.
apps/ios/ADE/Views/Work/WorkNewChatScreen.swiftWork new-chat layout now keeps the activity carousel in scroll content and clears composer focus on send.
apps/ios/ADETests/WorkComposerTriggerDetectorTests.swiftTests now cover draft focus state and requested focus transitions.
docs/features/sync-and-multi-device/ios-companion.mdDocs now describe mobile composer keyboard dismissal and carousel placement.

Reviews (2): Last reviewed commit: "ship: iteration 1 — restore focus after ..." | Re-trigger Greptile

@vercel

vercelBot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
ProjectDeploymentActionsUpdated (UTC)
adeIgnoredIgnoredPreviewJul 11, 2026 1:39am

@arul28arul28 changed the title mobile-chat-keyboard-dismissal -> PrimaryFix iOS chat keyboard dismissalJul 11, 2026
@arul28

Copy link
Copy Markdown
OwnerAuthor

@copilot review but do not make fixes

@coderabbitai

coderabbitaiBot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

iOS composer updates

Layer / File(s)Summary
Work composer focus synchronization
apps/ios/ADE/Views/Work/WorkChatSessionView.swift, apps/ios/ADE/Views/Work/WorkComposerTypedTriggers.swift, apps/ios/ADETests/WorkComposerTriggerDetectorTests.swift
Work chat draft state now owns focus state, synchronizes UIKit first-responder transitions, and validates focus changes and send-time clearing.
Send-time focus and collapse behavior
apps/ios/ADE/Views/Hub/HubComposerDrawer.swift, apps/ios/ADE/Views/PersonalChats/PersonalChatsScreen.swift, apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
Composer focus is dismissed or the composer is collapsed before chat submission begins.
Usage carousel placement
apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
The usage activity carousel now appears inside the main scroll view after the session action chips.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

  • arul28/ADE#703: Shares the Work chat composer and draft-state implementation.

Suggested labels:ios, docs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check nameStatusExplanationResolution
Docstring Coverage⚠️ WarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%.Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check nameStatusExplanation
Linked Issues check✅ PassedCheck skipped because no linked issues were found for this pull request.
Out of Scope Changes check✅ PassedCheck skipped because no linked issues were found for this pull request.
Description Check✅ PassedCheck skipped - CodeRabbit’s high-level summary is enabled.
Title check✅ PassedThe title clearly matches the main change: improving iOS chat dismissal behavior when sending messages.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/start-skill-change-concerns-only-96d975f3

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/ios/ADE/Views/Work/WorkChatSessionView.swift`:
- Around line 2075-2080: Restore composer focus when an attempted send fails:
update the failure branch or the restoreUnsentText(_:) method to set
draftState.isFocused to true after restoring the unsent text and attachments, so
the keyboard and composer are immediately available for editing or resend.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e2a46e07-3bc4-4c66-b853-cdc9e0ac2385

📥 Commits

Reviewing files that changed from the base of the PR and between 70c6e4e and 152e858.

⛔ Files ignored due to path filters (1)
  • docs/features/sync-and-multi-device/ios-companion.md is excluded by !docs/**
📒 Files selected for processing (6)
  • apps/ios/ADE/Views/Hub/HubComposerDrawer.swift
  • apps/ios/ADE/Views/PersonalChats/PersonalChatsScreen.swift
  • apps/ios/ADE/Views/Work/WorkChatSessionView.swift
  • apps/ios/ADE/Views/Work/WorkComposerTypedTriggers.swift
  • apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
  • apps/ios/ADETests/WorkComposerTriggerDetectorTests.swift

Comment threadapps/ios/ADE/Views/Work/WorkChatSessionView.swift
@arul28

Copy link
Copy Markdown
OwnerAuthor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit:0d2f49a6d0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@arul28
arul28 merged commit 8d61369 into mainJul 11, 2026
5 checks passed
@arul28
arul28 deleted the ade/start-skill-change-concerns-only-96d975f3 branch July 11, 2026 03:11
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@arul28