Skip to content

Auto Lane Chat Recovery#650

Merged
arul28 merged 6 commits into
mainfrom
ade/ok-so-if-launch-chat-3c9db1de
Jun 25, 2026
Merged

Auto Lane Chat Recovery#650
arul28 merged 6 commits into
mainfrom
ade/ok-so-if-launch-chat-3c9db1de

Conversation

@arul28

@arul28 arul28 commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

ADE   Open in ADE  ·  ade/ok-so-if-launch-chat-3c9db1de branch  ·  PR #650

Summary by CodeRabbit

  • New Features
    • Draft launches and chat actions now remain bound to the originating project through the whole flow, including project switches mid-launch.
    • Lane names are generated more consistently from the prompt across desktop and iOS, with improved handling of login/auth-related prompts and UI-control wording.
  • Bug Fixes
    • Improved reliability when switching projects during in-progress launches.
    • Restoring failed draft launches is more robust, with clearer “Restore” behavior.
    • PTY, Git, and project configuration actions now use the correct project context when available.
  • Tests
    • Added/expanded coverage for pinned-project behavior and deterministic lane-name rules.

Greptile Summary

This PR changes the mid-launch project-switch handling from "abort and surface a Restorable failure" to "keep running against the originating project's runtime via a captured OpenProjectBinding pin." The pin is threaded through all mutating IPC calls (lane create/rename, chat create/send, orchestration bundle allocation, git fetch/listBranches, PTY create/sendToSession/dispose, and project-config get), with callPinnedRuntimeAction routing to the correct runtime regardless of which project is currently active in the UI. UI mutations (session refresh, lane refresh, autoOpen) are gated on canRefreshPinnedProject so they only fire when the active project still matches the originating one.

  • Desktop & iOS lane naming — Adds priorityNamingWords / workPriorityLaneNamingWords to produce deterministic slugs for the "claude auth login button" pattern. The guards require (auth OR login) AND (login OR UI control), but words always starts with [provider, \"auth\"] regardless of whether mentionsAuth is true, injecting "auth" into names for prompts that only mention "login" (e.g. "Fix the claude login page" → \"claude-auth-login\" instead of something reflecting the actual words).
  • PTY pin lifecycle — A new module-level workPtyLaunchPinsById map in cliLaunch.ts stores the binding across component unmounts so continueCliSession and closePtySession can route through the correct runtime; entries are cleaned up via forgetWorkPtyLaunchPin after dispose.
  • restoreDraftLaunchJob — Extracts the restore+dismiss+clearError logic into a callback and adds a "Restore" button to the error banner when the banner's error matches a failed launch job, providing a second restore entry point alongside the job strip button.

Confidence Score: 4/5

Safe to merge after fixing the lane-name auth injection; the pinning and project-routing changes are well-tested and the logic is sound.

The priorityNamingWords function in both TypeScript and Swift starts words with [provider, "auth"] regardless of whether the prompt actually mentions an auth-related word. A prompt like "Fix the claude login page" has no auth mention, passes both guards (because mentionsLogin=true), and currently produces "claude-auth-login" — silently inserting a word the user never typed. This affects the deterministic lane name that shows immediately in the UI before the AI rename completes, and the Swift port carries the same issue, so the bug ships on both platforms.

apps/desktop/src/shared/laneNameFallback.ts and apps/ios/ADE/Views/Work/WorkNewChatScreen.swift need the words initialisation fixed to conditionally include auth; the corresponding tests should add a case that catches the login-without-auth scenario.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/components/chat/AgentChatPane.tsx Core launch pinning logic: draft launches now carry the originating binding as a pin and route all IPC (lane/session/PTY/git) through it instead of aborting on project switch; assertLaunchActive now only aborts for legacy/unpinned launches; UI mutation guards (canRefreshPinnedProject) added throughout.
apps/desktop/src/shared/laneNameFallback.ts Adds priorityNamingWords for the claude auth login button pattern. Expands stopwords and filler-phrase regex. words always starts with [provider, auth] regardless of whether mentionsAuth is true, injecting auth into names for login-only prompts like Fix the claude login page.
apps/ios/ADE/Views/Work/WorkNewChatScreen.swift Ports the desktop lane-naming logic to Swift. Carries the same unconditional auth injection bug from the TypeScript source.
apps/desktop/src/renderer/components/terminals/cliLaunch.ts Adds workPtyLaunchPinsById module-level map and three helpers for associating PTY sessions with their originating project binding across component unmounts.
apps/desktop/src/preload/preload.ts Propagates the optional pin through lanes.create/rename, agentChat.create/send/suggestLaneName, orchestration.runCreate, git.fetch/listBranches, pty.create/sendToSession, and projectConfig.get, routing pinned calls through callPinnedRuntimeAction.
apps/desktop/src/renderer/lib/projectConfigCache.ts Cache is now keyed by rootKey::pin:<binding.key> when a pin is present, preventing pinned and unpinned reads from sharing stale entries; invalidateProjectConfigCache correctly evicts all pinned entries for a given root.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[User submits draft launch] --> B{projectBinding present?}
    B -- yes --> C[Capture launchBinding = projectBinding]
    B -- no --> D[launchProjectRoot only]
    C --> E[Start detached launch chain]
    D --> E
    E --> F[assertLaunchActive: timeout?]
    F -- launchTimedOut --> G[Abort: timeout error]
    F -- ok, launchBinding present --> H[Pass pin to all IPC calls]
    F -- ok, no binding --> I{Project root drifted?}
    I -- yes --> J[Abort: LAUNCH_PROJECT_CHANGED_MESSAGE]
    I -- no --> H
    H --> K[git.fetch / listBranches with pin]
    K --> L[lanes.create with pin]
    L --> M[agentChat.create with pin]
    M --> N[orchestration.runCreate with pin]
    N --> O[agentChat.send with pin]
    O --> P{canRefreshPinnedProject?}
    P -- pin.key === current binding --> Q[Refresh UI, autoOpen, notify]
    P -- project switched away --> R[Skip UI mutations, set autoOpen=false]
    Q --> S[Job status: ready]
    R --> S
    S --> T[User opens from job strip or error banner Restore]
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"}}}%%
flowchart TD
    A[User submits draft launch] --> B{projectBinding present?}
    B -- yes --> C[Capture launchBinding = projectBinding]
    B -- no --> D[launchProjectRoot only]
    C --> E[Start detached launch chain]
    D --> E
    E --> F[assertLaunchActive: timeout?]
    F -- launchTimedOut --> G[Abort: timeout error]
    F -- ok, launchBinding present --> H[Pass pin to all IPC calls]
    F -- ok, no binding --> I{Project root drifted?}
    I -- yes --> J[Abort: LAUNCH_PROJECT_CHANGED_MESSAGE]
    I -- no --> H
    H --> K[git.fetch / listBranches with pin]
    K --> L[lanes.create with pin]
    L --> M[agentChat.create with pin]
    M --> N[orchestration.runCreate with pin]
    N --> O[agentChat.send with pin]
    O --> P{canRefreshPinnedProject?}
    P -- pin.key === current binding --> Q[Refresh UI, autoOpen, notify]
    P -- project switched away --> R[Skip UI mutations, set autoOpen=false]
    Q --> S[Job status: ready]
    R --> S
    S --> T[User opens from job strip or error banner Restore]
Loading

Comments Outside Diff (1)

  1. apps/ios/ADE/Views/Work/WorkNewChatScreen.swift, line 1370-1383 (link)

    P2 NSRegularExpression compiled on every call

    workRegexContains and workRegexMatches both call try? NSRegularExpression(pattern:) on every invocation. workPriorityLaneNamingWords calls workRegexContains up to five times per naming run (one provider scan per candidate, then auth, login, and button checks), and workCleanPromptForNaming invokes workReplacingRegexMatches which also compiles fresh. Since NSRegularExpression compilation is non-trivial, these should be compiled once at file scope (or lazily via a static dictionary) and reused.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
    Line: 1370-1383
    
    Comment:
    **NSRegularExpression compiled on every call**
    
    `workRegexContains` and `workRegexMatches` both call `try? NSRegularExpression(pattern:)` on every invocation. `workPriorityLaneNamingWords` calls `workRegexContains` up to five times per naming run (one provider scan per candidate, then auth, login, and button checks), and `workCleanPromptForNaming` invokes `workReplacingRegexMatches` which also compiles fresh. Since `NSRegularExpression` compilation is non-trivial, these should be compiled once at file scope (or lazily via a static dictionary) and reused.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

Reviews (6): Last reviewed commit: "Guard stale pinned chat notifications" | Re-trigger Greptile

@vercel

vercel Bot commented Jun 25, 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 Preview Jun 25, 2026 9:16am

@arul28

arul28 commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds optional project-binding pins across desktop bridge and launch flows, updates draft-launch and PTY session handling to use those pins, and replaces lane auto-name generation on desktop and iOS with deterministic prompt-derived naming. Related tests and prompt instructions were updated.

Changes

Pinned desktop runtime flows

Layer / File(s) Summary
Bridge contracts and pinned dispatch
apps/desktop/src/preload/global.d.ts, apps/desktop/src/preload/orchestrationBridge.ts, apps/desktop/src/preload/preload.ts, apps/desktop/src/preload/preload.test.ts, apps/desktop/src/renderer/components/terminals/cliLaunch.ts
Desktop bridge signatures and preload dispatchers accept optional pin values and route lane, chat, orchestration, git, PTY, and project config calls through pinned runtime actions.
Pinned project config cache
apps/desktop/src/renderer/lib/projectConfigCache.ts, apps/desktop/src/renderer/lib/projectConfigCache.test.ts
Project config cache keys and invalidation distinguish pinned reads from unpinned reads, and the cache calls window.ade.projectConfig.get with the optional pin.
Pinned draft setup and auto-create
apps/desktop/src/renderer/components/chat/AgentChatPane.tsx, apps/desktop/src/renderer/components/chat/AgentChatPane.test.tsx, apps/desktop/src/renderer/lib/draftLaunchJobs.ts
AgentChatPane pins orchestrator draft setup, background lane naming, auto-created lane resolution, and project config or branch lookups to the originating binding.
Draft launch lifecycle and restore UI
apps/desktop/src/renderer/components/chat/AgentChatPane.tsx, apps/desktop/src/renderer/components/chat/AgentChatPane.test.tsx
Draft launch checks, chat send, CLI startup, completion cleanup, and restore handling compare against the launch binding and surface restore controls for failed draft jobs.
PTY launch pinning
apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts, apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.test.ts, apps/desktop/src/renderer/components/terminals/useWorkSessions.ts, apps/desktop/src/renderer/components/terminals/useWorkSessions.test.ts
CLI launch arguments and PTY session helpers forward optional pins into PTY creation, send, and dispose paths for lane work sessions and terminal work sessions.

Deterministic lane naming

Layer / File(s) Summary
Desktop prompt rules and fallback names
apps/desktop/src/main/services/chat/agentChatService.ts, apps/desktop/src/shared/laneNameFallback.ts, apps/desktop/src/shared/laneNameFallback.test.ts, apps/desktop/src/renderer/components/chat/AgentChatPane.test.tsx
Prompt instructions and shared lane-name fallback rules now strip more filler text, prioritize provider or auth terms, and update the expected fallback lane names in tests.
iOS deterministic lane names
apps/ios/ADE/Views/Work/WorkNewChatScreen.swift, apps/ios/ADETests/ADETests.swift
The iOS work chat screen now derives auto-created lane names from cleaned prompts, priority words, slug extraction, and a generic suffix fallback, with XCTest coverage for the deterministic outputs.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • arul28/ADE#513: Shares the same draft-launch UX/state machinery in apps/desktop/src/renderer/components/chat/AgentChatPane.tsx and related draft job handling.
  • arul28/ADE#536: Shares the PTY session lifecycle code in useWorkSessions.ts and useLaneWorkSessions.ts.
  • arul28/ADE#591: Shares the deterministic lane auto-naming logic updated in deriveDeterministicLaneNameFromPrompt and the matching fallback tests.

Suggested labels

desktop, ios

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.33% 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 name Status Explanation
Title check ✅ Passed The title matches the PR’s main theme: auto lane chat recovery with pinned project launch behavior.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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/ok-so-if-launch-chat-3c9db1de

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.

@mintlify

mintlify Bot commented Jun 25, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
ade-ac1c6011 🟢 Ready View Preview Jun 25, 2026, 7:14 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@coderabbitai coderabbitai Bot 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/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts`:
- Around line 698-700: `pty.create` already receives `args.pin`, but the same
pin is not being carried into `closePtySession` and `continueCliSession` in
`useLaneWorkSessions`, which causes pinned/remote PTYs to be resolved against
the default project root. Update the hook to store the pin alongside the created
session and pass it through the `pty.dispose` call in `closePtySession` and the
session-resume path in `continueCliSession`, using the existing
`args.pin`/`createArgs` flow as the source of truth.
🪄 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: 49c1eced-7834-4f8d-a3b4-7240ec8b2b41

📥 Commits

Reviewing files that changed from the base of the PR and between aac0a96 and 838802d.

⛔ Files ignored due to path filters (3)
  • docs/ARCHITECTURE.md is excluded by !docs/**
  • docs/features/chat/README.md is excluded by !docs/**
  • docs/features/chat/composer-and-ui.md is excluded by !docs/**
📒 Files selected for processing (15)
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/preload/global.d.ts
  • apps/desktop/src/preload/orchestrationBridge.ts
  • apps/desktop/src/preload/preload.ts
  • apps/desktop/src/renderer/components/chat/AgentChatPane.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
  • apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts
  • apps/desktop/src/renderer/components/terminals/cliLaunch.ts
  • apps/desktop/src/renderer/components/terminals/useWorkSessions.ts
  • apps/desktop/src/renderer/lib/draftLaunchJobs.ts
  • apps/desktop/src/renderer/lib/projectConfigCache.ts
  • apps/desktop/src/shared/laneNameFallback.test.ts
  • apps/desktop/src/shared/laneNameFallback.ts
  • apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
  • apps/ios/ADETests/ADETests.swift

Comment thread apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts
Comment thread apps/desktop/src/main/services/chat/agentChatService.ts Outdated
Comment thread apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
@arul28

arul28 commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

if (shouldAutoOpen && paneMountedRef.current) {

P2 Badge Prevent auto-opening after a project switch

When a foreground draft launch is pinned and the user switches projects before it completes, shouldAutoOpen still stays true because project switches no longer abort the launch. Warm project surfaces remain mounted, so this stale pane can still call openLaunchedDraftSession and navigate the currently active project to a lane/session that belongs to the previous project; gate the auto-open on the active binding still matching launchBinding and leave the job as a ready/restorable launch otherwise.

ℹ️ 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".

Comment thread apps/desktop/src/renderer/lib/projectConfigCache.ts
@arul28

arul28 commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ea28dfc415

ℹ️ 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".

Comment thread apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
Comment thread apps/desktop/src/renderer/components/terminals/useWorkSessions.ts
@arul28

arul28 commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7b808354dd

ℹ️ 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".

Comment thread apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts

@coderabbitai coderabbitai Bot 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

🧹 Nitpick comments (1)
apps/desktop/src/renderer/components/terminals/cliLaunch.ts (1)

44-68: 🩺 Stability & Availability | 🔵 Trivial | 💤 Low value

workPtyLaunchPinsById can accumulate stale entries.

Pins are only removed via forgetWorkPtyLaunchPin on the dispose paths. Two leak vectors exist: (1) sessions that end without going through closePtySession/stopRuntime (e.g. external onExit) never clear their entry, and (2) continueCliSession resume returns a new ptyId, so rememberWorkPtyLaunchPin(result, pin) writes the new key while the previous ptyId key lingers. Entries are small, so this is a slow leak rather than a correctness bug, but a reused ptyId could theoretically resolve a stale pin.

Consider forgetting the prior key on resume, or pruning on pty.onExit.

🤖 Prompt for 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.

In `@apps/desktop/src/renderer/components/terminals/cliLaunch.ts` around lines 44
- 68, `workPtyLaunchPinsById` is retaining stale pin entries across terminal
lifecycle changes. Update `rememberWorkPtyLaunchPin`, `workPtyLaunchPinFor`, and
`forgetWorkPtyLaunchPin` so a resumed session from `continueCliSession` clears
any previous `ptyId`/session mapping before storing the new one, and add cleanup
on `pty.onExit` for paths that do not reach `closePtySession` or `stopRuntime`.
Keep the map keyed consistently by `WorkPtyPinLookup` identifiers and ensure the
old key is removed whenever a new pin is remembered for the same session.
🤖 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/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts`:
- Around line 701-704: The lane PTY launch flow in useLaneWorkSessions currently
updates UI state after create without checking whether the pinned project is
still current. Add the same canMutatePinnedProjectUi guard used in
useWorkSessions around the post-launch side effects in the pinned PTY path, so
selectLane and focusSession only run when the project context has not gone
stale. Use the launch/result handling in useLaneWorkSessions as the place to
insert the guard before mutating lane state.

---

Nitpick comments:
In `@apps/desktop/src/renderer/components/terminals/cliLaunch.ts`:
- Around line 44-68: `workPtyLaunchPinsById` is retaining stale pin entries
across terminal lifecycle changes. Update `rememberWorkPtyLaunchPin`,
`workPtyLaunchPinFor`, and `forgetWorkPtyLaunchPin` so a resumed session from
`continueCliSession` clears any previous `ptyId`/session mapping before storing
the new one, and add cleanup on `pty.onExit` for paths that do not reach
`closePtySession` or `stopRuntime`. Keep the map keyed consistently by
`WorkPtyPinLookup` identifiers and ensure the old key is removed whenever a new
pin is remembered for the same session.
🪄 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: f2abd951-7289-4315-b51c-02a29b4bfc3c

📥 Commits

Reviewing files that changed from the base of the PR and between 838802d and 7b80835.

📒 Files selected for processing (17)
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/preload/global.d.ts
  • apps/desktop/src/preload/preload.test.ts
  • apps/desktop/src/preload/preload.ts
  • apps/desktop/src/renderer/components/chat/AgentChatPane.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
  • apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.test.ts
  • apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts
  • apps/desktop/src/renderer/components/terminals/cliLaunch.ts
  • apps/desktop/src/renderer/components/terminals/useWorkSessions.test.ts
  • apps/desktop/src/renderer/components/terminals/useWorkSessions.ts
  • apps/desktop/src/renderer/lib/projectConfigCache.test.ts
  • apps/desktop/src/renderer/lib/projectConfigCache.ts
  • apps/desktop/src/shared/laneNameFallback.test.ts
  • apps/desktop/src/shared/laneNameFallback.ts
  • apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
  • apps/ios/ADETests/ADETests.swift
🚧 Files skipped from review as they are similar to previous changes (6)
  • apps/ios/ADETests/ADETests.swift
  • apps/desktop/src/shared/laneNameFallback.ts
  • apps/desktop/src/preload/global.d.ts
  • apps/desktop/src/renderer/components/chat/AgentChatPane.test.tsx
  • apps/ios/ADE/Views/Work/WorkNewChatScreen.swift
  • apps/desktop/src/renderer/components/chat/AgentChatPane.tsx

Comment thread apps/desktop/src/renderer/components/lanes/useLaneWorkSessions.ts
@arul28

arul28 commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc397fe431

ℹ️ 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".

Comment thread apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
@arul28

arul28 commented Jun 25, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

if (jobStillVisible && paneMountedRef.current) {
setError(message);

P2 Badge Gate launch errors by the pinned project

When a pinned draft launch fails after the user has switched projects, this path now avoids refreshing the old project but still calls setError as long as the originating job exists. In the Work tab the pane can remain mounted across projectBinding changes, so a failure from the old project can show an error banner in the newly active project with no matching Restore job. Apply the same canRefreshPinnedProject(launchBinding)/current-project guard before mutating the pane error state so failures stay scoped to the originating draft job.

ℹ️ 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 668e7fd into main Jun 25, 2026
27 checks passed
@arul28 arul28 deleted the ade/ok-so-if-launch-chat-3c9db1de branch June 25, 2026 09:43
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