Mobile: restore auto-lane AI naming as background rename (desktop pattern)#698
Conversation
…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>
|
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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
|
@copilot review but do not make fixes |
📝 WalkthroughWalkthroughSyncService's ChangesScoped Lane Naming
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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 (
startBackgroundLaneNaminginAgentChatPane): 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 vialanes.renameonly 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, passingtargetProjectId/targetProjectRootPaththrough so foreign-project launches route via the command envelope likechat.create.SyncService.swift— thin plumbing only: optional scope params on the existingsuggestLaneName(previously dead code) andrenameLanewrappers; doc comments updated to the background pattern. Keeps the 10s non-disconnecting timeout budget.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.suggestNamestays non-queueable so an offline phone fails fast to the deterministic name. No new UX, settings, or host logic — the host command already honorstitleGenerationEnabledand clamps names.Validation
xcodebuildDebug/simulator build green (per repo norm, not XcodeBuildMCP).lanes.suggestNamehost tests and iOS deterministic-naming tests still cover the contracts.🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Greptile Summary
This PR changes mobile auto-created lane naming to run after session startup. The main changes are:
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.
What T-Rex did
Important Files Changed
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%%{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 endReviews (1): Last reviewed commit: "Mobile: restore auto-lane AI naming as b..." | Re-trigger Greptile