Skip to content

Mobile: restore auto-lane AI naming as background rename (desktop pattern)#698

Merged
arul28 merged 1 commit into
mainfrom
ade/mobile-auto-lane-naming-a9422124
Jul 4, 2026
Merged

Mobile: restore auto-lane AI naming as background rename (desktop pattern)#698
arul28 merged 1 commit into
mainfrom
ade/mobile-auto-lane-naming-a9422124

Conversation

@arul28

@arul28 arul28 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Restores mobile auto-lane AI naming, which died as collateral in #683's stability refactor (the commit never mentioned naming; #591 had added it as a blocking pre-create race). This brings it back using exactly the desktop pattern (startBackgroundLaneNaming in AgentChatPane): create the lane instantly with the deterministic name, launch the chat/CLI session undelayed, then a fire-and-forget task asks the host's naming model (lanes.suggestName) and applies the result via lanes.rename only when it differs from the deterministic fallback. No banner, no 10s pre-create race — the name just improves in place a few seconds later.

  • WorkNewChatScreen.swift — background naming after session launch for both Chat and CLI auto-create paths; refreshes the lane list after a successful rename.
  • HubComposerDrawer.swift — same background naming after the hub's auto-create, passing targetProjectId/targetProjectRootPath through so foreign-project launches route via the command envelope like chat.create.
  • SyncService.swift — thin plumbing only: optional scope params on the existing suggestLaneName (previously dead code) and renameLane wrappers; doc comments updated to the background pattern. Keeps the 10s non-disconnecting timeout budget.
  • Docs (lanes/README.md, remote-commands.md) updated to describe the background pattern instead of the removed pre-create race.

Naming can never block or fail creation/launch: all naming errors are swallowed, and lanes.suggestName stays non-queueable so an offline phone fails fast to the deterministic name. No new UX, settings, or host logic — the host command already honors titleGenerationEnabled and clamps names.

Validation

  • iOS: direct xcodebuild Debug/simulator build green (per repo norm, not XcodeBuildMCP).
  • No desktop/ade-cli TS touched; existing lanes.suggestName host tests and iOS deterministic-naming tests still cover the contracts.
  • /quality dual-review: 0 Blocker/High/Medium; 4 accepted Lows (benign edges documented in the review).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Auto-created lanes may now be renamed automatically after a session starts, giving them more relevant names without interrupting the flow.
    • Lane name suggestions can be applied even when working in a different project scope, not just the currently active one.
  • Bug Fixes

    • Improved lane naming consistency for newly created chats and work sessions.
    • Kept the existing fallback name in place if a suggested name can’t be used.

Greptile Summary

This PR changes mobile auto-created lane naming to run after session startup. The main changes are:

  • Create iOS auto lanes immediately with a deterministic fallback name.
  • Start chat or CLI sessions before asking the host for a suggested lane name.
  • Rename the lane in the background only when the host returns a different name.
  • Preserve selected-project routing for hub-created lanes.
  • Update lane and remote-command docs for the new background naming flow.

Confidence Score: 5/5

Safe to merge with minimal risk.

The changes are localized and keep lane naming failures non-blocking. Hub background naming preserves target-project routing. No correctness or security issues were identified in the changed paths.

No files require special attention.

T-Rex T-Rex Logs

What T-Rex did

  • Observed that the pre-change environment lacked iOS tooling support, as shown in auto-lane-naming-01-before.log.
  • Verified that the after-change log contains matching excerpts from the updated Swift/docs for the auto-lane naming flow.
  • Executed the Python repository check for the auto-lane naming flow and confirmed all targeted flow assertions passed with exit code 0.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ios/ADE/Services/SyncService.swift Adds optional target-project routing to lane name suggestion and rename commands.
apps/ios/ADE/Views/Hub/HubComposerDrawer.swift Adds fire-and-forget background naming for hub-created auto lanes with foreign-project routing preserved.
apps/ios/ADE/Views/Work/WorkNewChatScreen.swift Changes mobile auto-create to create deterministic lanes first, then asynchronously suggest and apply a better name.
docs/features/lanes/README.md Updates lane feature documentation to describe background mobile lane naming and hub project scoping.
docs/features/sync-and-multi-device/remote-commands.md Updates remote command documentation to describe fire-and-forget iOS lane naming behavior.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User
participant IOS as iOS composer
participant Sync as SyncService
participant Host as Desktop host

User->>IOS: Submit opener with auto-create lane
IOS->>Sync: lanes.create(deterministic fallback name)
Sync->>Host: Create lane
Host-->>Sync: LaneSummary
Sync-->>IOS: Lane id/name
IOS->>Sync: start chat or CLI session
Sync->>Host: Session command
Host-->>Sync: Session summary/id
Sync-->>IOS: Session started
IOS-->>User: Navigate/collapse and show created session
IOS-)Sync: lanes.suggestName(laneId, opener, fallback)
Sync-)Host: Best-effort naming request
Host--)Sync: Suggested or fallback name
alt suggestion differs from fallback
    IOS-)Sync: lanes.rename(suggested name)
    Sync-)Host: Rename lane
else suggestion equals fallback or request fails
    IOS-->>IOS: Keep deterministic lane name
end
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User
participant IOS as iOS composer
participant Sync as SyncService
participant Host as Desktop host

User->>IOS: Submit opener with auto-create lane
IOS->>Sync: lanes.create(deterministic fallback name)
Sync->>Host: Create lane
Host-->>Sync: LaneSummary
Sync-->>IOS: Lane id/name
IOS->>Sync: start chat or CLI session
Sync->>Host: Session command
Host-->>Sync: Session summary/id
Sync-->>IOS: Session started
IOS-->>User: Navigate/collapse and show created session
IOS-)Sync: lanes.suggestName(laneId, opener, fallback)
Sync-)Host: Best-effort naming request
Host--)Sync: Suggested or fallback name
alt suggestion differs from fallback
    IOS-)Sync: lanes.rename(suggested name)
    Sync-)Host: Rename lane
else suggestion equals fallback or request fails
    IOS-->>IOS: Keep deterministic lane name
end
Loading

Reviews (1): Last reviewed commit: "Mobile: restore auto-lane AI naming as b..." | Re-trigger Greptile

…tern)

PR #591 named auto-created lanes with the host naming model but blocked
creation behind a 10s pre-create race; PR #683's stability refactor
deleted that block as collateral, leaving mobile stuck with the
deterministic prompt-chop names and SyncService.suggestLaneName dead.

Bring naming back with desktop's startBackgroundLaneNaming semantics:
create the lane instantly with the deterministic name, launch the
chat/CLI session, then fire-and-forget lanes.suggestName and apply the
result via lanes.rename only when it differs from the fallback. Naming
never blocks or fails creation/launch; any failure keeps the
deterministic name. Covers WorkNewChatScreen (Chat + CLI) and the hub
composer, which passes targetProjectId/targetProjectRootPath through
new optional scope params on the suggestLaneName/renameLane wrappers so
foreign-project launches route via the command envelope.

Docs updated to describe the background pattern instead of the old
pre-create race.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Jul 4, 2026 1:20pm

@arul28 arul28 changed the title Mobile Auto Lane Naming Mobile: restore auto-lane AI naming as background rename (desktop pattern) Jul 4, 2026
@arul28

arul28 commented Jul 4, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

SyncService's suggestLaneName and renameLane methods gain optional targetProjectId/targetProjectRootPath parameters for scoped requests. HubComposerDrawer and WorkNewChatScreen capture deterministic fallback lane names and trigger fire-and-forget background lane suggestion/rename flows after auto-created lane sessions start.

Changes

Scoped Lane Naming

Layer / File(s) Summary
Scoped suggestLaneName/renameLane
apps/ios/ADE/Services/SyncService.swift
Both methods add optional targetProjectId/targetProjectRootPath parameters forwarded to the underlying command calls, allowing requests to target a non-active project scope.
Hub composer background rename
apps/ios/ADE/Views/Hub/HubComposerDrawer.swift
submit retains a fallback lane name for auto-created lanes; a new startBackgroundLaneNaming helper asynchronously suggests and conditionally renames the lane after session creation.
Work new chat background rename
apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
submit retains autoCreatedFallbackName; a new startBackgroundLaneNaming(laneId:opener:fallbackName:) helper suggests and renames the lane after CLI or chat session start, then refreshes lanes.

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

Possibly related PRs

  • arul28/ADE#591: Adds the lanes.suggestName RPC/handler with deterministic fallback that this PR's SyncService.suggestLaneName/renameLane and background naming flow consume.

Suggested labels: ios

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly captures the main change: restoring mobile auto-lane AI naming via a non-blocking background rename pattern.
✨ 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/mobile-auto-lane-naming-a9422124

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.

@arul28 arul28 merged commit 9a70900 into main Jul 4, 2026
29 of 30 checks passed
@arul28 arul28 deleted the ade/mobile-auto-lane-naming-a9422124 branch July 4, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant