Skip to content

Tui Perf And Fucntilnaity Pass#325

Merged
arul28 merged 2 commits into
mainfrom
ade/tui-perf-and-fucntilnaity-pass-241a6c0b
May 21, 2026
Merged

Tui Perf And Fucntilnaity Pass#325
arul28 merged 2 commits into
mainfrom
ade/tui-perf-and-fucntilnaity-pass-241a6c0b

Conversation

@arul28
Copy link
Copy Markdown
Owner

@arul28 arul28 commented May 20, 2026

Summary

Describe the change.

What Changed

Key files and behaviors.

Validation

How you tested.

Risks

Anything to watch.

Summary by CodeRabbit

  • New Features

    • Added lane deletion capability with scope and force controls in the TUI.
    • Added reasoning effort parameter support for Claude terminal sessions.
    • Enabled keyboard navigation for chat image attachments (arrow keys, delete).
  • Improvements

    • Enhanced terminal output filtering to remove UI artifacts for cleaner display.
    • Added draft configuration persistence across chat session creation.
    • Improved subagent and background task categorization and visibility.
    • Enhanced model picker provider authentication status display.

Review Change Stack

Greptile Summary

This PR delivers a TUI performance and functionality pass: responsive drawer width, lane-deletion with scope/force controls, draft config persistence across chat sessions, Claude terminal output filtering, and subagent/background-task categorization with visual refresh.

  • TUI: Responsive drawer pane (32–48 cols), lane-delete form with scope/force field routing, isTerminalSessionWorking for smarter spin-tick gating, and compactClosedTerminalTranscript to strip Claude UI chrome from closed terminal previews.
  • Desktop chat: LastLaunchConfig persisted to localStorage so composer settings survive session creation; notifySessionCreated made synchronous to fix a new-chat-not-visible race; keyboard nav added to image attachment chips.
  • Subagents/ModelPicker: taskType/workflowName propagated through the full task lifecycle; Cursor catalog staleness fixed (provider only marked fresh when models are actually returned); discovery-empty empty-state mode for authed-but-empty providers.

Confidence Score: 5/5

Safe to merge — changes are well-scoped UI and service logic with no data-loss paths; the noted issues are minor correctness and heuristic edge cases.

All functional logic (task lifecycle, config persistence, keyboard nav, terminal filtering) is guarded and tested. The missing lastLaunchConfigStorageKey dependency would only misbehave if projectRoot/surfaceProfile/workDraftKind change while the component is mounted, which is not a typical lifecycle transition. The process.kill in the render body and the 4-letter word filter are quality concerns, not correctness blockers.

AgentChatPane.tsx (stale closure in launchShellForDraftLane) and TerminalPane.tsx (isShortClaudeSpinnerResidue over-broad filter) are worth a second look before the next iteration.

Important Files Changed

Filename Overview
apps/ade-cli/src/tuiClient/app.tsx Major refactor: responsive drawer width, lane-delete form support, mouse-hit helpers, isTerminalSessionWorking (uses process.kill in render path), and resolveModelPickerEscape. Spin-tick logic simplified to only animate when drawer is open.
apps/ade-cli/src/tuiClient/components/TerminalPane.tsx Adds compactClosedTerminalTranscript to strip Claude UI chrome from closed terminal previews. The isShortClaudeSpinnerResidue heuristic can false-positive on 1–4 letter real output words when 4+ appear.
apps/desktop/src/renderer/components/chat/AgentChatPane.tsx Adds LastLaunchConfig persistence to localStorage so draft composer settings survive session creation; notifySessionCreated changed from microtask-deferred to synchronous to fix race condition. Missing lastLaunchConfigStorageKey dep in launchShellForDraftLane.
apps/desktop/src/main/services/chat/agentChatService.ts Adds task_type/workflow_name propagation through task lifecycle events; suppresses ambient skip_transcript tasks; fixes Cursor catalog staleness by requiring the catalog to actually contain Cursor models before marking the provider fresh.
apps/desktop/src/renderer/components/chat/ChatAttachmentTray.tsx Converts to forwardRef, adds keyboard navigation (arrow keys, Delete/Backspace) for image attachments, and propagates onFocusPrompt callback through all image chip variants.
apps/desktop/src/renderer/components/chat/ChatSubagentsPanel.tsx Visual refresh: larger glyphs (12→14 px), category-tinted running rows (cyan for background, accent for subagents), MinusCircle for stopped state, section dot indicators, and workflowName display.
apps/desktop/src/shared/chatSubagents.ts Adds taskType and workflowName fields to SubagentSnapshot with normalization helpers; both fields are merged from incoming events over existing state.
apps/desktop/src/renderer/components/shared/ModelPicker/ModelPickerContent.tsx Passes providerAuthStatus to EmptyState and fires onProviderRailSelect when re-clicking the currently selected rail, enabling a discovery-empty state when a provider is authed but returns no models.
apps/desktop/src/renderer/components/shared/ModelPicker/runtimeCatalogCache.ts Adds shouldMarkRefreshProviderFresh guard so a Cursor catalog refresh is only marked fresh when the resulting catalog actually contains Cursor models, preventing premature cache hits.
apps/ade-cli/src/tuiClient/components/Drawer.tsx Accepts a width prop for responsive sizing (capped at DRAWER_WIDTH_MAX = 48), adjusts visibleDrawerLaneCount formula to use 5 rows/card instead of 4.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Session Created / Session Selected] --> B{Has session?}
    B -- No --> C{readLastLaunchConfig from localStorage}
    C -- found --> D[applyLaunchConfigToComposer]
    C -- not found --> E[Use initialNativeControls defaults]
    B -- Yes --> F[syncComposerToSession: load session settings]
    F --> D

    G[launchShellForDraftLane] --> H[createChatSession API]
    H --> I[buildLastLaunchConfig]
    I --> J[writeLastLaunchConfig to localStorage]
    J --> K[notifySessionCreated - synchronous]

    subgraph TUI spin-tick
        L[activeTerminalSession != null] --> M{isTerminalSessionWorking}
        M -- process.kill pid 0 --> N[spinTickActive = true]
        M -- pid dead / idle --> O[spinTickActive = false]
        P[drawerOpen && sessions animating] --> N
    end
Loading

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 3
apps/desktop/src/renderer/components/chat/AgentChatPane.tsx:4687
`lastLaunchConfigStorageKey` is read at line 4654 inside this callback but is not listed as a dependency. The key is derived from `projectRoot`, `laneId`, `surfaceProfile`, and `workDraftKind`. Only `laneId` is in the deps array, so if `projectRoot`, `surfaceProfile`, or `workDraftKind` change while this component is mounted the stale closure will write the launch config to the wrong localStorage key.

```suggestion
  }, [buildNativeControlPayload, codexFastMode, currentNativeControls, executionMode, initialNativeControls, iosSimulatorOpen, laneId, lastLaunchConfigStorageKey, modelId, notifySessionCreated, reasoningEffort, refreshSessions, touchSession]);
```

### Issue 2 of 3
apps/ade-cli/src/tuiClient/app.tsx:2812-2816
**`process.kill(pid, 0)` syscall called on every render**

`isTerminalSessionWorking``isProcessLikelyAlive``process.kill(pid!, 0)` is invoked unconditionally in the render body whenever `activeTerminalSession` is non-null. In Ink, renders can fire on every keyboard event, network tick, and timer callback, so this is a raw syscall per render frame. Consider wrapping the result in a `useMemo` keyed to `activeTerminalSession?.pid` and a polling timestamp, or computing it outside the render phase, to avoid the repeated context-switch overhead.

### Issue 3 of 3
apps/ade-cli/src/tuiClient/components/TerminalPane.tsx:141-151
**Over-broad 1–4 letter word filter can suppress real terminal output**

The condition `letters.length <= 4 && /^[a-z]+$/.test(letters)` at line 149 classifies any pure-alphabetic word of 1–4 characters as spinner residue. Common terminal outputs such as `done`, `fail`, `err`, `pass`, `none`, `exit` all match this predicate. When 4 or more such lines appear in the compacted transcript, every one of them is stripped entirely. A transcript that legitimately outputs four status words would result in an empty preview. Consider tightening the guard to only match lines that also contain a known spinner glyph, or expand the explicit exemption list to include words that carry real meaning.

Reviews (2): Last reviewed commit: "fix: address pr loop feedback" | Re-trigger Greptile

@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ade Ignored Ignored Preview May 20, 2026 11:47pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 20, 2026

📝 Walkthrough

Walkthrough

This PR establishes a side-channel JSON-RPC bridge from the CLI runtime daemon to the Electron desktop app for browser control, extends the TUI with new forms and commands for lane management and reasoning effort selection, refines the chat composer with attachment keyboard navigation and session configuration persistence, and propagates Claude task metadata through subagent events while adding PTY output replay to the web terminal.

Changes

Desktop Bridge Infrastructure

Layer / File(s) Summary
Bridge client and server types
apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.ts, apps/desktop/src/main/services/builtInBrowser/desktopBridgeServer.ts
New BuiltInBrowserDesktopBridgeClient interface with lazy socket connection and method proxying; BuiltInBrowserDesktopBridgeServer type that exposes allowlisted built_in_browser.* JSON-RPC methods.
Bridge client socket and RPC mechanics
apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.ts
Implements per-call timeouts, automatic reconnection on failure, socket path validation, and error propagation with connection-drop logging.
Bridge client test suite
apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.test.ts
Comprehensive tests for method forwarding, no-arg handling, missing socket detection, error propagation, and retry/reconnect recovery.
Bridge server socket and RPC dispatch
apps/desktop/src/main/services/builtInBrowser/desktopBridgeServer.ts
Implements socket preparation, net server creation with per-connection JSON-RPC, method validation and allowlisting, dynamic dispatch, and cleanup/disposal.
Machine layout socket path resolution
apps/ade-cli/src/services/projects/machineLayout.ts, apps/desktop/src/main/services/runtime/machineStateMigration.ts
Extends MachineAdeLayout with desktopBridgeSocketPath; adds Windows pipe path helper; computes socket paths for both Windows and Unix platforms.
Layout socket path test coverage
apps/ade-cli/src/services/projects/machineLayout.test.ts, apps/ade-cli/src/services/projects/projectRegistry.test.ts, apps/ade-cli/src/services/projects/projectScope.test.ts
Tests for Darwin and Windows socket path derivation with default and channel-specific ADE homes; project registry configuration updates.
CLI bootstrap and Desktop main integration
apps/ade-cli/src/bootstrap.ts, apps/desktop/src/main/main.ts
Wires desktop bridge client into CLI AdeRuntime lifecycle with socket path resolution and disposal; starts bridge server in Desktop main with logger and cleanup.
Electron dev environment fix
apps/desktop/scripts/dev.cjs
Clears ELECTRON_RUN_AS_NODE environment variable to prevent child process Node-mode behavior.
Desktop bridge documentation
apps/desktop/resources/agent-skills/ade-browser/SKILL.md, apps/desktop/resources/agent-skills/ade-cli-control-plane/SKILL.md
Documents end-to-end control flow for ade browser through runtime daemon and desktop bridge, JSON-RPC proxy mechanism, and operational requirements.

TUI Application Features and Layout

Layer / File(s) Summary
Right pane output formatters
apps/ade-cli/src/tuiClient/rightPaneFormatters.ts, apps/ade-cli/src/tuiClient/__tests__/rightPaneFormatters.test.ts
New module with TUI-ready formatters for system details, PR metadata/checks/reviews/comments, memory search, and Linear status; infers fields from loosely structured inputs.
New slash commands and form infrastructure
apps/ade-cli/src/tuiClient/commands.ts, apps/ade-cli/src/tuiClient/types.ts
Adds /lane delete and /effort commands; extends RightPaneContent form variant with description and laneDelete metadata; updates CLI PR scalar action routing.
Lane delete form and actions
apps/ade-cli/src/tuiClient/components/RightPane.tsx, apps/ade-cli/src/tuiClient/app.tsx
Implements LaneDeleteFormPane with scope/remote/force/confirm UI; adds form field routing and prompt-input rules; wires lane-delete scope cycling and form submission.
Terminal transcript cleanup
apps/ade-cli/src/tuiClient/components/TerminalPane.tsx
Filters Claude spinner/chrome artifacts from closed transcripts with configurable removal of numeric/spinner residue based on frequency thresholds.
Terminal transcript filter tests
apps/ade-cli/src/tuiClient/__tests__/TerminalPane.test.tsx
Tests for filtering spinner symbols, numeric residue, input box chrome, startup chrome, and broader UI artifacts.
Slash command routing and handlers
apps/ade-cli/src/tuiClient/app.tsx
Updates command routing to use formatters for PR/Linear/system output; adds /effort reasoning picker; refactors /context for async loading; passes reasoningEffort to Claude terminal.
Right pane roster, details, and action rendering
apps/ade-cli/src/tuiClient/components/RightPane.tsx
Enhances chat roster with background-row counts and section headers; adds details-pane structured rendering; updates lane-detail actions with glyphs and intent metadata.
Drawer width resolution and layout
apps/ade-cli/src/tuiClient/components/Drawer.tsx, apps/ade-cli/src/tuiClient/app.tsx
Adds dynamic drawer width computation with min/max clamping; updates Drawer component with optional width prop; introduces resolveDrawerPaneWidth helper.
Lane card styling and diff display
apps/ade-cli/src/tuiClient/components/Drawer.tsx
Refactors lane rendering with bordered card containers; updates LaneCard border color derivation and chip visibility; changes diff display to selected-only third-line model.
AdeWordmark compact variants
apps/ade-cli/src/tuiClient/components/AdeWordmark.tsx, apps/ade-cli/src/tuiClient/components/ChatView.tsx
Adds full and compact ANSI-Shadow figlet wordmark row sets; updates boot hero logic to select variant based on usable width thresholds.
Model picker UI refinements
apps/ade-cli/src/tuiClient/components/ModelPicker/ModelPickerPane.tsx
Adjusts search bar truncation and bracket rendering; updates model rows to derive family branding, add "now"/"local" chips, and display active model summary.
Mouse interaction and hit-testing helpers
apps/ade-cli/src/tuiClient/app.tsx
Implements drawer mouse hit detection and helpers for lane-details action, setup-pane row, and form field targeting; adds prompt hit detection.
Keyboard input normalization and shortcuts
apps/ade-cli/src/tuiClient/app.tsx
Adds isCtrlInput helper for normalized Ctrl detection; extends keyboard handling with CTRL-based shortcuts; implements Esc behavior for model picker and form discard.
Drawer and right-pane navigation
apps/ade-cli/src/tuiClient/app.tsx
Adjusts drawer arrow navigation to prevent section popping; updates lane-card entry points; refines setup-pane model row surface selection.
Right pane context resolution
apps/ade-cli/src/tuiClient/app.tsx
Refactors and exports resolveContextDefault for draft/new-chat setup selection and lane defaults; adds setup selection and surface routing helpers.
Terminal session activity classifiers
apps/ade-cli/src/tuiClient/app.tsx
Adds helpers to classify terminal session working states using PID liveness checks for spinner animation and fast-poll polling.
TUI feature tests
apps/ade-cli/src/tuiClient/__tests__/*.tsx, apps/ade-cli/src/tuiClient/__tests__/*.ts
Comprehensive test suites for drawer layout, right-pane forms, terminal cleanup, slash-command routing, app input helpers, and model picker escape handling.

Chat Composer, Session Config, and Subagent Metadata

Layer / File(s) Summary
Image attachment keyboard navigation
apps/desktop/src/renderer/components/chat/ChatAttachmentTray.tsx, apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx
Converts ChatAttachmentTray to forwardRef component; adds keyboard focus handling with Left/Right navigation and Backspace/Delete removal; passes onFocusPrompt callback through attachment components.
Composer provider auth status integration
apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx, apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
Updates AgentChatComposer to accept providerAuthStatus prop; derives auth status from aiStatus in AgentChatPane using familiesFromStatus.
Composer attachment focus management
apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx
Adds focus helpers for composer input and last-image attachment; enhances keyboard handler so ArrowUp at prompt start focuses attachment instead of opening command menu.
Last launch configuration persistence
apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
Introduces LastLaunchConfig type; adds helpers to build, normalize, and persist config to localStorage; hydrates composer state from persisted or session-derived config.
Session launch config tests
apps/desktop/src/renderer/components/chat/AgentChatPane.submit.test.tsx, apps/desktop/src/renderer/components/chat/AgentChatComposer.test.tsx
Tests for draft hydration from localStorage and from newest session configuration; verifies restored model, reasoning effort, and codex-related fields.
Chat event schema for task metadata
apps/desktop/src/shared/types/chat.ts
Extends AgentChatEvent union variants with optional taskType and workflowName fields for subagent lifecycle events.
Subagent snapshot metadata tracking
apps/desktop/src/renderer/components/chat/chatExecutionSummary.ts, apps/desktop/src/shared/chatSubagents.ts
Updates ChatSubagentSnapshot and SubagentSnapshot types to include taskType and workflowName; propagates through snapshot derivation.
Agent chat service task metadata and filtering
apps/desktop/src/main/services/chat/agentChatService.ts
Extends task state with taskType, workflowName, and skipTranscript fields; adds normalization helpers; implements filtering to suppress events for ambient tasks.
Agent chat service subagent event tests
apps/desktop/src/main/services/chat/agentChatService.test.ts
Tests for background task type propagation and skip-transcript suppression of subagent lifecycle events.
Model catalog provider freshness gating
apps/desktop/src/renderer/components/shared/ModelPicker/runtimeCatalogCache.ts
Adds helpers to prevent marking cursor provider fresh unless catalog contains non-empty cursor group; updates freshness decision logic.
Model picker discovery-empty state
apps/desktop/src/renderer/components/shared/ModelPicker/ModelPickerContent.tsx, apps/desktop/src/renderer/components/shared/ModelPicker/providerEmptyState.tsx
Extends empty-state rendering to support discovery-empty mode for connected-but-empty providers; adds Cursor-specific empty copy.
Model picker and cursor catalog tests
apps/desktop/src/renderer/components/shared/ModelPicker/ModelPicker.test.tsx, apps/desktop/src/renderer/components/shared/ModelPicker/providerEmptyState.test.tsx
Tests for Cursor provider runtime-catalog freshness and discovery-empty state rendering.
Chat subagent panel UI updates
apps/desktop/src/renderer/components/chat/ChatSubagentsPanel.tsx
Refactors subagent panel rendering with category-based glyph tinting, section headers, workflow name display, and background-task section styling.
Chat subagent snapshot and panel tests
apps/desktop/src/renderer/components/chat/chatExecutionSummary.test.ts
Tests for subagent snapshot propagation of taskType and workflowName across subagent events.
Linear command and misc updates
apps/ade-cli/src/tuiClient/linearCommands.ts, apps/desktop/src/main/services/ai/tools/ctoOperatorTools.ts, apps/desktop/src/renderer/components/missions/MissionArtifactsTab.tsx
Updates buildLinearToolRequest to require group argument; makes ARTIFACT_GROUP_MODES readonly; clarifies tool documentation.
Mission chat and workflows
apps/desktop/src/renderer/components/missions/MissionChatV2.tsx
Updates jump-target handling to treat workers plural the same as singular; reformats effect blocks for clarity.

Web Terminal PTY Output and Messaging

Layer / File(s) Summary
PTY output replay buffering
scripts/tui-web.mjs
Implements bounded in-memory PTY output chunking (~2MB limit); provides functions to trim older chunks and replay stored output to newly connected browser clients.
WebSocket message parsing and routing
scripts/tui-web.mjs
Refactors browser WebSocket message handler to parse JSON control messages and PTY payloads; adds debug counter tracking; converts PTY broadcasting to UTF-8 JSON strings.
Web terminal grid sizing and refresh
scripts/tui-web.mjs
Adds column sizing constraints with PTY safety margins; adds writeTerminal helper for debug tracking; enhances rendering stability with refresh calls on visibility changes.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • arul28/ADE#243: Main PR extends the existing built-in browser integration by wiring AdeRuntime.builtInBrowserService through a new desktop-bridge JSON-RPC client/server (socket path + lifecycle dispose), building directly on the built-in browser service/action/IPC plumbing introduced in the retrieved PR.
  • arul28/ADE#116: Both PRs touch the desktop chat UI integration points—AgentChatComposer.tsx and AgentChatPane.tsx—by adding new props/state wiring for chat interactions (queued-steer handling in #116 vs. composer focus/provider-auth/related behavior in the main PR).

Suggested labels

desktop

✨ 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/tui-perf-and-fucntilnaity-pass-241a6c0b

@capy-ai
Copy link
Copy Markdown

capy-ai Bot commented May 20, 2026

Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews.

@arul28 arul28 force-pushed the ade/tui-perf-and-fucntilnaity-pass-241a6c0b branch from 20a666f to 5ae563a Compare May 20, 2026 23:12
@arul28
Copy link
Copy Markdown
Owner Author

arul28 commented May 20, 2026

@copilot review but do not make fixes

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

@copilot review but do not make fixes

Review-only pass completed on commit 5ae563a (no fixes made). I spot-checked the highest-risk additions (desktop bridge server/client wiring, runtime bootstrap integration, and TUI app changes) and didn’t find a clear blocking logic bug in those paths. Note: npm --prefix apps/ade-cli run typecheck failed in this sandbox because Node type defs are not installed (TS2688: Cannot find type definition file for 'node'), so I couldn’t fully re-validate with local typecheck.

Copilot finished work on behalf of arul28 May 20, 2026 23:14
Comment thread apps/ade-cli/src/tuiClient/components/RightPane.tsx
Comment thread apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.ts
Comment thread apps/ade-cli/src/tuiClient/components/RightPane.tsx
Comment thread apps/desktop/src/main/services/chat/agentChatService.ts Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 11

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
apps/desktop/src/shared/chatSubagents.ts (1)

235-250: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Validate taskType against allowed literal values before assigning to SubagentSnapshot.

incomingTaskType accepts any string without checking against the allowed literal values ("subagent" | "background" | "local_workflow" | "cron" | "other"), allowing invalid strings to be force-cast into the snapshot state.

Suggested fix
+const SUBAGENT_TASK_TYPES = new Set<NonNullable<SubagentSnapshot["taskType"]>>([
+  "subagent",
+  "background",
+  "local_workflow",
+  "cron",
+  "other",
+]);
@@
-const incomingTaskType = typeof event.taskType === "string" ? event.taskType : undefined;
+const incomingTaskType = (
+  typeof event.taskType === "string" && SUBAGENT_TASK_TYPES.has(event.taskType as NonNullable<SubagentSnapshot["taskType"]>)
+    ? event.taskType
+    : undefined
+) as SubagentSnapshot["taskType"] | undefined;
@@
 ...(incomingTaskType || existing?.taskType
-  ? { taskType: (incomingTaskType ?? existing?.taskType) as SubagentSnapshot["taskType"] }
+  ? { taskType: incomingTaskType ?? existing?.taskType }
   : {}),
🤖 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/shared/chatSubagents.ts` around lines 235 - 250,
incomingTaskType is currently any string and gets force-cast into
SubagentSnapshot.taskType; validate it against the allowed literals ("subagent"
| "background" | "local_workflow" | "cron" | "other") before assignment (e.g.,
implement an isValidTaskType(value) type guard or whitelist array) and only
include taskType in the base object if incomingTaskType passes that check (or
fall back to existing?.taskType if that is already valid); update the logic
around incomingTaskType, the base object construction, and any places using
taskType to rely on the validated value so invalid strings are never force-cast
into SubagentSnapshot.
apps/ade-cli/src/tuiClient/app.tsx (2)

6265-6274: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Background Claude launches are dropping the selected reasoning effort.

startClaudeTerminalForPrompt() includes reasoningEffort, but this background-launch path does not. New Claude chats started with background launch will silently ignore the current effort setting and diverge from the foreground path.

🛠️ Proposed fix
         await startClaudeTerminalSession({
           connection: conn,
           laneId,
           title: pendingNewChatTitleRef.current ?? "Claude Code",
           model: normalized.modelId ?? normalized.model,
+          reasoningEffort: normalized.reasoningEffort,
           permissionMode: normalized.permissionMode,
           initialInput: terminalPrompt.trim() ? terminalPrompt : null,
           cols,
           rows: terminalRows,
         });
🤖 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/ade-cli/src/tuiClient/app.tsx` around lines 6265 - 6274, The background
launch call to startClaudeTerminalSession is missing the reasoningEffort param
and thus drops the user's selected effort; update the call site in app.tsx (the
startClaudeTerminalSession invocation) to pass reasoningEffort:
normalized.reasoningEffort (or the appropriate field on normalized that holds
the current effort) — matching the foreground path used by
startClaudeTerminalForPrompt — so the background-launched Claude session
receives the same reasoningEffort value (use a fallback/default if needed).

7676-7731: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Keep non-text lane-delete controls out of the prompt buffer.

formFieldUsesPromptInput() explicitly opts scope and force out of prompt syncing, but this handler still writes those values into prompt when the user toggles or navigates onto them. That defeats the prompt/form split you added for this form and leaves misleading text in the composer.

🤖 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/ade-cli/src/tuiClient/app.tsx` around lines 7676 - 7731, When updating
lane-delete non-text controls, stop writing their values into the composer:
remove or replace setPrompt calls for the "scope" and "force" toggle handlers so
they do not set the prompt (e.g., call setPrompt("") or skip calling it). Also
change the field navigation logic that currently does
setPrompt(fields[nextIndex] ? nextValues[fields[nextIndex]!.name] ?? "" : "") to
only populate the prompt when formFieldUsesPromptInput(fields[nextIndex])
returns true; otherwise clear or leave the prompt empty. Update the handlers
referencing scope, force, setFormValues, currentFormValues, setFormFieldIndex
and the navigation code in the rightPane form block accordingly.
🧹 Nitpick comments (6)
apps/ade-cli/src/tuiClient/components/TerminalPane.tsx (1)

106-134: ⚡ Quick win

Rename the newly introduced constants to camelCase.

The new constant identifiers in this block violate the repository naming rule for TS/JS variables.

As per coding guidelines, **/*.{ts,tsx,js,jsx}: Use camelCase for variable names in TypeScript/JavaScript files.

🤖 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/ade-cli/src/tuiClient/components/TerminalPane.tsx` around lines 106 -
134, The new constants (CLAUDE_SPINNER_RE, CLAUDE_SPINNER_STATUS_WORDS,
CLAUDE_SPINNER_STATUS_RE, CLAUDE_USAGE_STATUS_RE, TERMINAL_BOX_CHROME_RE,
CLAUDE_INPUT_CHROME_RE, CLAUDE_PROMPT_CHROME_RE, CLAUDE_FOOTER_CHROME_RE,
CLAUDE_SESSION_CHROME_RE, CLAUDE_LOGO_RE) must be renamed to camelCase (e.g.,
claudeSpinnerRe, claudeSpinnerStatusWords, claudeSpinnerStatusRe,
claudeUsageStatusRe, terminalBoxChromeRe, claudeInputChromeRe,
claudePromptChromeRe, claudeFooterChromeRe, claudeSessionChromeRe, claudeLogoRe)
and all internal references updated accordingly; ensure TypeScript exports/usage
sites are adjusted and tests/other imports updated to the new identifiers to
avoid breakage.
apps/ade-cli/src/tuiClient/components/AdeWordmark.tsx (1)

9-10: ⚡ Quick win

Rename uppercase identifiers to camelCase to match repo TS/JS naming rule.

FACE_ROWS, COMPACT_ROWS, ADE_WORDMARK_FULL_WIDTH, and ADE_WORDMARK_COMPACT_WIDTH violate the naming convention configured for TS/JS variables in this repo.

Suggested rename
-const FACE_ROWS = [
+const faceRows = [
...
-const COMPACT_ROWS = [
+const compactRows = [
...
-export const ADE_WORDMARK_FULL_WIDTH = 36;
-export const ADE_WORDMARK_COMPACT_WIDTH = 26;
+export const adeWordmarkFullWidth = 36;
+export const adeWordmarkCompactWidth = 26;
...
-  const rows = compact ? COMPACT_ROWS : FACE_ROWS;
+  const rows = compact ? compactRows : faceRows;

As per coding guidelines, **/*.{ts,tsx,js,jsx}: Use camelCase for variable names in TypeScript/JavaScript files.

Also applies to: 28-29, 37-38, 41-41

🤖 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/ade-cli/src/tuiClient/components/AdeWordmark.tsx` around lines 9 - 10,
Rename the uppercase constants to camelCase to follow the repo naming rule:
change FACE_ROWS -> faceRows, COMPACT_ROWS -> compactRows,
ADE_WORDMARK_FULL_WIDTH -> adeWordmarkFullWidth, and ADE_WORDMARK_COMPACT_WIDTH
-> adeWordmarkCompactWidth; update all usages in AdeWordmark.tsx (and any
imports/exports) to the new names and run a quick search to replace any
remaining references to the old identifiers so TypeScript/JS builds remain
clean.
apps/desktop/src/main/services/builtInBrowser/desktopBridgeServer.ts (1)

109-111: 🏗️ Heavy lift

Startup errors on the bridge socket are only logged; await server.listen() to fail fast.

The server.listen() call on line 109 is asynchronous but not awaited. If binding fails (permission error, port conflict, etc.), the function returns successfully while the error handler only logs the failure. The daemon's lazy connection design (desktopBridgeClient.ts checks fs.existsSync() and retries on failure) masks this issue in practice, but the server implementation should properly expose startup errors rather than silently logging them.

Make startBuiltInBrowserDesktopBridgeServer() async and await the listen completion so bind failures propagate to the caller, enabling proper error handling at startup.

🤖 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/main/services/builtInBrowser/desktopBridgeServer.ts` around
lines 109 - 111, The startup currently calls server.listen(socketPath, ...)
without awaiting so bind errors are only logged; update
startBuiltInBrowserDesktopBridgeServer to be async and await server.listen by
wrapping it in a Promise that resolves on the server's "listening" event (where
you keep the logger.info("built_in_browser_bridge.listening", { socketPath }))
and rejects on the server's "error" event so bind failures propagate to the
caller; ensure the Promise cleans up listeners on resolve/reject and that the
function signature and callers are adjusted to await the async
startBuiltInBrowserDesktopBridgeServer.
apps/desktop/src/main/services/chat/agentChatService.ts (1)

20389-20400: 💤 Low value

Redundant conditional could be simplified.

The ternary on lines 20394-20396 evaluates to group.key === provider in both branches since when provider === "droid", checking group.key === "droid" is equivalent to group.key === provider.

♻️ Suggested simplification
 const modelCatalogContainsRefreshProvider = (
   catalog: AgentChatModelCatalog,
   provider: AgentChatModelCatalogRefreshProvider,
 ): boolean => {
   return (catalog.groups ?? []).some((group) => {
-    const groupMatches = provider === "droid"
-      ? group.key === "droid"
-      : group.key === provider;
-    if (!groupMatches) return false;
+    if (group.key !== provider) return false;
     return (group.providers ?? []).some((entry) => entry.modelCount > 0);
   });
 };
🤖 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/main/services/chat/agentChatService.ts` around lines 20389 -
20400, The function modelCatalogContainsRefreshProvider contains a redundant
ternary comparing provider === "droid" to decide between group.key === "droid"
and group.key === provider; simplify by directly comparing group.key ===
provider and remove the ternary. Update the closure inside the (catalog.groups
?? []).some call (referencing group.key, provider, group.providers and
entry.modelCount) so it only checks group.key === provider and then returns
(group.providers ?? []).some(entry => entry.modelCount > 0).
apps/ade-cli/src/tuiClient/components/ModelPicker/ModelPickerPane.tsx (1)

136-140: 💤 Low value

Magic number for subProvider indentation.

The marginLeft={6} creates visual indentation for the subProvider text, but the value is hard-coded and doesn't clearly relate to the layout calculation. Consider deriving it from the actual glyph and label indentation (e.g., 2 spaces + star + space + glyph + space = 6) or extracting it as a named constant for clarity.

🤖 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/ade-cli/src/tuiClient/components/ModelPicker/ModelPickerPane.tsx` around
lines 136 - 140, The hard-coded indentation marginLeft={6} in ModelPickerPane
(rendering entry.subProvider) is a magic number; replace it with a named
constant or compute it from the layout components (e.g., sum of "2 spaces + star
+ space + glyph + space") so the relationship to glyph/label spacing is
explicit, and update the JSX to use that constant (referencing ModelPickerPane
and entry.subProvider) so future changes to glyph/label widths remain consistent
and the intent is clear.
apps/ade-cli/src/tuiClient/components/RightPane.tsx (1)

154-166: ⚡ Quick win

Consider using intent field instead of label text matching.

The actionGlyphColor function relies on exact label string matches ("new chat", "delete lane", etc.) to determine glyph colors. If any label text changes in LANE_DETAIL_ACTIONS, the color mapping will silently break. Since you've already added an intent field (e.g., "rescue-unstaged"), consider using it as the primary discriminator for semantic coloring, with label matching as a fallback.

♻️ Refactored color selection using intent field
-function actionGlyphColor(label: string): string {
-  if (label === "new chat" || label === "stage all" || label === "commit" || label === "push") {
+function actionGlyphColor(action: { label: string; intent?: string }): string {
+  if (action.intent === "rescue-unstaged") return theme.color.attention;
+  if (action.label === "delete lane") return theme.color.error;
+  if (action.label === "new chat" || action.label === "stage all" || action.label === "commit" || action.label === "push") {
     return theme.color.running;
   }
-  if (label === "delete lane") return theme.color.error;
-  if (label === "move unstaged to new lane") return theme.color.attention;
-  // open/create PR, diff, reparent → navigational
   return theme.color.violet;
 }

Then update the call site:

 function ActionRow({
   k,
   label,
   detail,
   glyph,
+  intent,
   selected,
   width,
 }: {
   k: string;
   label: string;
   detail?: string;
   glyph?: string;
+  intent?: string;
   selected?: boolean;
   width: number;
 }) {
   const glyphChar = glyph ?? " ";
-  const glyphColor = actionGlyphColor(label);
+  const glyphColor = actionGlyphColor({ label, intent });
🤖 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/ade-cli/src/tuiClient/components/RightPane.tsx` around lines 154 - 166,
actionGlyphColor currently matches exact label strings which is brittle; change
it to prefer an action.intent field (e.g., "rescue-unstaged", "destructive",
"additive", "navigational") as the primary discriminator and fall back to the
existing label text checks only if intent is missing, update the function
signature (or add a thin wrapper) to accept the action object or an explicit
intent string, map intents to theme.color.running / theme.color.error /
theme.color.attention / theme.color.violet accordingly, and update all call
sites (where LANE_DETAIL_ACTIONS are used) to pass the action or its intent so
label-only matches remain a fallback.
🤖 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/ade-cli/src/services/builtInBrowser/desktopBridgeClient.ts`:
- Around line 75-87: In ensureClient(), prevent resurrecting a disposed client
by checking the disposed flag at the start of ensureClient() and again inside
the connect().then(...) callback before assigning to client; if disposed is
true, throw an error instead of returning/assigning; also move the connecting =
null reset into a .finally() on the connect() promise so connecting is cleared
regardless of success or failure. Ensure references to connecting, client,
disposed, connect(), and ensureClient() are used so the checks and throws are
applied in both the initial entry and inside the .then() handler.
- Around line 66-72: The timeout Promise used in both JsonRpcClient.connect (the
connection logic around JsonRpcClient.connect(socketPath)) and callBridge should
be refactored into a small helper (e.g., runWithTimeout or raceWithTimeout) that
creates the setTimeout, returns the raced Promise, and ensures the timeout is
cleared in a finally block; update the connect() usage and callBridge() usage to
call this helper instead of creating an unresolved timer Promise so that the
timeout ID is captured and clearTimeout(timeoutId) is called after the race
settles.

In `@apps/ade-cli/src/tuiClient/__tests__/RightPane.test.tsx`:
- Around line 186-187: The test currently asserts ordering via indexOf on the
string variable frame (expect(frame.indexOf("explore-code")).toBeLessThan(...))
but doesn't ensure the sections exist first; modify the assertions to first
verify presence (e.g., expect(frame).toContain("explore-code"),
expect(frame).toContain("background"), expect(frame).toContain("dev:desktop") or
check indexOf(...) !== -1) and only then assert ordering using
frame.indexOf("explore-code") < frame.indexOf("background") and
frame.indexOf("background") < frame.indexOf("dev:desktop") so the test fails
clearly if a section is missing; update the assertions in RightPane.test.tsx
around the frame index checks accordingly.

In `@apps/ade-cli/src/tuiClient/app.tsx`:
- Around line 3730-3796: The form-opening handlers (openMoveUnstagedForm and
openLaneDeleteForm) currently rely on activeLaneIdRef.current at submit time, so
capture the current lane into the form payload when opening the form and use
that captured identifier at submit; specifically, when calling openForm from
openMoveUnstagedForm add a stable identifier (e.g., laneId or branchRef and
lane.name) into the form descriptor so the submit path (commands
"new-lane-from-unstaged" and "lane-delete" / laneDelete payload) consumes that
captured value instead of re-reading activeLaneIdRef.current; update the
openForm payload fields for openLaneDeleteForm to include the immutable
laneId/branchRef and for openMoveUnstagedForm include laneId/branchRef so
downstream handlers use those stored values to operate on the intended lane.
- Around line 1770-1786: The promptHitLine function is being called with only
rows and promptRowCount, causing hit-testing to ignore the actual rendered
modelStatusRows/footerRows; update the click handler(s) that call promptHitLine
(and the other identical call sites referenced) to pass the current computed
modelStatusRows and footerRows values from the rendered layout (the same values
used to render the status/footer) instead of relying on defaults, or
alternatively change promptHitLine to accept the layout object and extract
promptRowCount, modelStatusRows, and footerRows from it; ensure you update every
call site (including the duplicated usage noted) so clicks near the bottom use
the live rendered row counts rather than defaults.
- Around line 1592-1596: The mouse-to-field index mapping for the "lane-delete"
branch in app.tsx returns indices in the wrong order (scope, remoteName, force,
confirm) causing inconsistency with keyboard navigation (scope, force,
remoteName, confirm); swap the return values for the y ranges so they match the
declared field order (scope => 0, force => 1, remoteName => 2, confirm => 3) by
changing the y 13-14 branch to return 1 and the y 16-17 branch to return 2, and
make the same change in the other "lane-delete" mapping block referenced (around
the other occurrence).

In `@apps/desktop/src/main/main.ts`:
- Around line 1088-1097: The call to startBuiltInBrowserDesktopBridgeServer can
throw and currently runs unguarded during app boot (using
builtInBrowserBridgeLogger and assigning builtInBrowserBridgeServer), so
surround the startup in a try/catch: call startBuiltInBrowserDesktopBridgeServer
inside a try block, assign its result to builtInBrowserBridgeServer on success,
and on error catch and log the failure via builtInBrowserBridgeLogger.error (or
process logger) and set builtInBrowserBridgeServer to null/undefined so the rest
of whenReady can continue without throwing; ensure any downstream code checks
the presence of builtInBrowserBridgeServer before using it.

In `@apps/desktop/src/renderer/components/chat/AgentChatPane.tsx`:
- Line 151: LAST_LAUNCH_CONFIG_KEY is currently a global key and
LastLaunchConfig payload is applied across contexts, allowing a launch config
with elevated permissions to be restored in the wrong project/lane/surface;
change the persistence so the key is scoped by context (for example append
projectId/laneId/surface to LAST_LAUNCH_CONFIG_KEY) or embed explicit scope
fields into LastLaunchConfig and validate them before applying in functions that
read/write this key (references: LAST_LAUNCH_CONFIG_KEY and LastLaunchConfig and
the read/write code paths around them); ensure writes include the current
context, reads verify the stored context matches current context, and refuse to
auto-apply if the scope does not match.
- Around line 3572-3577: The current logic incorrectly gives precedence to the
stored config from readLastLaunchConfig over the freshly built
latestSessionConfig; change the precedence so latestSessionConfig is used first:
compute latestSessionConfig via buildLastLaunchConfig(sessions[0],
initialNativeControls) and then set config to latestSessionConfig ??
readLastLaunchConfig(initialNativeControls) (or null if neither), then guard and
call applyLaunchConfigToComposer(config); update references to
latestSessionConfig, readLastLaunchConfig, buildLastLaunchConfig,
applyLaunchConfigToComposer, sessions, and initialNativeControls accordingly.

In `@apps/desktop/src/renderer/components/chat/ChatAttachmentTray.tsx`:
- Around line 281-303: The attachment chip currently uses tabIndex={-1} which
prevents keyboard users reaching the element to trigger onKeyDown handlers (see
ChatAttachmentPendingImage usage and handleImageAttachmentKeyDown invocation);
change the focus strategy so chips are keyboard reachable—either make the outer
element tabbable (tabIndex={0}) or replace/augment it with an inner semantic
control (e.g., a button or an element with role="button" and tabIndex={0}) and
wire the same onKeyDown/onClick handlers (ensure onRemove and onFocusPrompt are
preserved), so that arrow/delete key handling and focus management work for
keyboard-only users.

In `@scripts/tui-web.mjs`:
- Around line 504-511: In rememberPtyOutput, a single large chunk can exceed
ptyReplayLimitBytes because the loop only runs while ptyReplayChunks.length > 1;
change the logic to enforce a hard cap before or when enqueueing: compute
newChunkSize = Buffer.byteLength(text) and if newChunkSize >=
ptyReplayLimitBytes trim the chunk to the last ptyReplayLimitBytes bytes (or
split it) so its size never alone exceeds ptyReplayLimitBytes, then push and
update ptyReplayBytes; otherwise push and then remove oldest chunks in the while
loop until ptyReplayBytes <= ptyReplayLimitBytes (without requiring length > 1).
Ensure you update ptyReplayBytes consistently when trimming/splitting.

---

Outside diff comments:
In `@apps/ade-cli/src/tuiClient/app.tsx`:
- Around line 6265-6274: The background launch call to
startClaudeTerminalSession is missing the reasoningEffort param and thus drops
the user's selected effort; update the call site in app.tsx (the
startClaudeTerminalSession invocation) to pass reasoningEffort:
normalized.reasoningEffort (or the appropriate field on normalized that holds
the current effort) — matching the foreground path used by
startClaudeTerminalForPrompt — so the background-launched Claude session
receives the same reasoningEffort value (use a fallback/default if needed).
- Around line 7676-7731: When updating lane-delete non-text controls, stop
writing their values into the composer: remove or replace setPrompt calls for
the "scope" and "force" toggle handlers so they do not set the prompt (e.g.,
call setPrompt("") or skip calling it). Also change the field navigation logic
that currently does setPrompt(fields[nextIndex] ?
nextValues[fields[nextIndex]!.name] ?? "" : "") to only populate the prompt when
formFieldUsesPromptInput(fields[nextIndex]) returns true; otherwise clear or
leave the prompt empty. Update the handlers referencing scope, force,
setFormValues, currentFormValues, setFormFieldIndex and the navigation code in
the rightPane form block accordingly.

In `@apps/desktop/src/shared/chatSubagents.ts`:
- Around line 235-250: incomingTaskType is currently any string and gets
force-cast into SubagentSnapshot.taskType; validate it against the allowed
literals ("subagent" | "background" | "local_workflow" | "cron" | "other")
before assignment (e.g., implement an isValidTaskType(value) type guard or
whitelist array) and only include taskType in the base object if
incomingTaskType passes that check (or fall back to existing?.taskType if that
is already valid); update the logic around incomingTaskType, the base object
construction, and any places using taskType to rely on the validated value so
invalid strings are never force-cast into SubagentSnapshot.

---

Nitpick comments:
In `@apps/ade-cli/src/tuiClient/components/AdeWordmark.tsx`:
- Around line 9-10: Rename the uppercase constants to camelCase to follow the
repo naming rule: change FACE_ROWS -> faceRows, COMPACT_ROWS -> compactRows,
ADE_WORDMARK_FULL_WIDTH -> adeWordmarkFullWidth, and ADE_WORDMARK_COMPACT_WIDTH
-> adeWordmarkCompactWidth; update all usages in AdeWordmark.tsx (and any
imports/exports) to the new names and run a quick search to replace any
remaining references to the old identifiers so TypeScript/JS builds remain
clean.

In `@apps/ade-cli/src/tuiClient/components/ModelPicker/ModelPickerPane.tsx`:
- Around line 136-140: The hard-coded indentation marginLeft={6} in
ModelPickerPane (rendering entry.subProvider) is a magic number; replace it with
a named constant or compute it from the layout components (e.g., sum of "2
spaces + star + space + glyph + space") so the relationship to glyph/label
spacing is explicit, and update the JSX to use that constant (referencing
ModelPickerPane and entry.subProvider) so future changes to glyph/label widths
remain consistent and the intent is clear.

In `@apps/ade-cli/src/tuiClient/components/RightPane.tsx`:
- Around line 154-166: actionGlyphColor currently matches exact label strings
which is brittle; change it to prefer an action.intent field (e.g.,
"rescue-unstaged", "destructive", "additive", "navigational") as the primary
discriminator and fall back to the existing label text checks only if intent is
missing, update the function signature (or add a thin wrapper) to accept the
action object or an explicit intent string, map intents to theme.color.running /
theme.color.error / theme.color.attention / theme.color.violet accordingly, and
update all call sites (where LANE_DETAIL_ACTIONS are used) to pass the action or
its intent so label-only matches remain a fallback.

In `@apps/ade-cli/src/tuiClient/components/TerminalPane.tsx`:
- Around line 106-134: The new constants (CLAUDE_SPINNER_RE,
CLAUDE_SPINNER_STATUS_WORDS, CLAUDE_SPINNER_STATUS_RE, CLAUDE_USAGE_STATUS_RE,
TERMINAL_BOX_CHROME_RE, CLAUDE_INPUT_CHROME_RE, CLAUDE_PROMPT_CHROME_RE,
CLAUDE_FOOTER_CHROME_RE, CLAUDE_SESSION_CHROME_RE, CLAUDE_LOGO_RE) must be
renamed to camelCase (e.g., claudeSpinnerRe, claudeSpinnerStatusWords,
claudeSpinnerStatusRe, claudeUsageStatusRe, terminalBoxChromeRe,
claudeInputChromeRe, claudePromptChromeRe, claudeFooterChromeRe,
claudeSessionChromeRe, claudeLogoRe) and all internal references updated
accordingly; ensure TypeScript exports/usage sites are adjusted and tests/other
imports updated to the new identifiers to avoid breakage.

In `@apps/desktop/src/main/services/builtInBrowser/desktopBridgeServer.ts`:
- Around line 109-111: The startup currently calls server.listen(socketPath,
...) without awaiting so bind errors are only logged; update
startBuiltInBrowserDesktopBridgeServer to be async and await server.listen by
wrapping it in a Promise that resolves on the server's "listening" event (where
you keep the logger.info("built_in_browser_bridge.listening", { socketPath }))
and rejects on the server's "error" event so bind failures propagate to the
caller; ensure the Promise cleans up listeners on resolve/reject and that the
function signature and callers are adjusted to await the async
startBuiltInBrowserDesktopBridgeServer.

In `@apps/desktop/src/main/services/chat/agentChatService.ts`:
- Around line 20389-20400: The function modelCatalogContainsRefreshProvider
contains a redundant ternary comparing provider === "droid" to decide between
group.key === "droid" and group.key === provider; simplify by directly comparing
group.key === provider and remove the ternary. Update the closure inside the
(catalog.groups ?? []).some call (referencing group.key, provider,
group.providers and entry.modelCount) so it only checks group.key === provider
and then returns (group.providers ?? []).some(entry => entry.modelCount > 0).
🪄 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: 51114a14-d76b-485d-9adf-abaa32e76add

📥 Commits

Reviewing files that changed from the base of the PR and between ae3255a and 5ae563a.

⛔ Files ignored due to path filters (8)
  • README.md is excluded by !*.md
  • docs/ARCHITECTURE.md is excluded by !docs/**
  • docs/features/ade-code/README.md is excluded by !docs/**
  • docs/features/chat/transcript-and-turns.md is excluded by !docs/**
  • docs/features/lanes/README.md is excluded by !docs/**
  • docs/features/missions/README.md is excluded by !docs/**
  • docs/features/missions/orchestration.md is excluded by !docs/**
  • docs/features/pull-requests/README.md is excluded by !docs/**
📒 Files selected for processing (61)
  • apps/ade-cli/pnpm-workspace.yaml
  • apps/ade-cli/src/bootstrap.ts
  • apps/ade-cli/src/cli.ts
  • apps/ade-cli/src/multiProjectRpcServer.test.ts
  • apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.test.ts
  • apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.ts
  • apps/ade-cli/src/services/projects/machineLayout.test.ts
  • apps/ade-cli/src/services/projects/machineLayout.ts
  • apps/ade-cli/src/services/projects/projectRegistry.test.ts
  • apps/ade-cli/src/services/projects/projectScope.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/Drawer.test.tsx
  • apps/ade-cli/src/tuiClient/__tests__/RightPane.test.tsx
  • apps/ade-cli/src/tuiClient/__tests__/TerminalPane.test.tsx
  • apps/ade-cli/src/tuiClient/__tests__/adeApi.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/appInput.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/appPolling.test.tsx
  • apps/ade-cli/src/tuiClient/__tests__/commands.test.ts
  • apps/ade-cli/src/tuiClient/__tests__/rightPaneFormatters.test.ts
  • apps/ade-cli/src/tuiClient/adeApi.ts
  • apps/ade-cli/src/tuiClient/app.tsx
  • apps/ade-cli/src/tuiClient/commands.ts
  • apps/ade-cli/src/tuiClient/components/AdeWordmark.tsx
  • apps/ade-cli/src/tuiClient/components/ChatView.tsx
  • apps/ade-cli/src/tuiClient/components/Drawer.tsx
  • apps/ade-cli/src/tuiClient/components/ModelPicker/ModelPickerPane.tsx
  • apps/ade-cli/src/tuiClient/components/RightPane.tsx
  • apps/ade-cli/src/tuiClient/components/TerminalPane.tsx
  • apps/ade-cli/src/tuiClient/linearCommands.ts
  • apps/ade-cli/src/tuiClient/rightPaneFormatters.ts
  • apps/ade-cli/src/tuiClient/types.ts
  • apps/desktop/resources/agent-skills/ade-browser/SKILL.md
  • apps/desktop/resources/agent-skills/ade-cli-control-plane/SKILL.md
  • apps/desktop/scripts/dev.cjs
  • apps/desktop/src/main/main.ts
  • apps/desktop/src/main/services/ai/tools/ctoOperatorTools.ts
  • apps/desktop/src/main/services/builtInBrowser/desktopBridgeServer.ts
  • apps/desktop/src/main/services/chat/agentChatService.test.ts
  • apps/desktop/src/main/services/chat/agentChatService.ts
  • apps/desktop/src/main/services/remoteRuntime/remoteRuntime.offlineRpc.integration.test.ts
  • apps/desktop/src/main/services/runtime/machineStateMigration.test.ts
  • apps/desktop/src/main/services/runtime/machineStateMigration.ts
  • apps/desktop/src/renderer/components/chat/AgentChatComposer.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.submit.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatPane.tsx
  • apps/desktop/src/renderer/components/chat/ChatAttachmentTray.test.tsx
  • apps/desktop/src/renderer/components/chat/ChatAttachmentTray.tsx
  • apps/desktop/src/renderer/components/chat/ChatSubagentsPanel.tsx
  • apps/desktop/src/renderer/components/chat/chatExecutionSummary.test.ts
  • apps/desktop/src/renderer/components/chat/chatExecutionSummary.ts
  • apps/desktop/src/renderer/components/missions/MissionArtifactsTab.tsx
  • apps/desktop/src/renderer/components/missions/MissionChatV2.tsx
  • apps/desktop/src/renderer/components/prs/detail/PrDetailPane.test.tsx
  • apps/desktop/src/renderer/components/shared/ModelPicker/ModelPicker.test.tsx
  • apps/desktop/src/renderer/components/shared/ModelPicker/ModelPickerContent.tsx
  • apps/desktop/src/renderer/components/shared/ModelPicker/providerEmptyState.test.tsx
  • apps/desktop/src/renderer/components/shared/ModelPicker/providerEmptyState.tsx
  • apps/desktop/src/renderer/components/shared/ModelPicker/runtimeCatalogCache.ts
  • apps/desktop/src/shared/chatSubagents.ts
  • apps/desktop/src/shared/types/chat.ts
  • scripts/tui-web.mjs
💤 Files with no reviewable changes (1)
  • apps/ade-cli/src/cli.ts

Comment thread apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.ts Outdated
Comment thread apps/ade-cli/src/services/builtInBrowser/desktopBridgeClient.ts
Comment thread apps/ade-cli/src/tuiClient/__tests__/RightPane.test.tsx Outdated
Comment thread apps/ade-cli/src/tuiClient/app.tsx
Comment thread apps/ade-cli/src/tuiClient/app.tsx
Comment thread apps/desktop/src/main/main.ts Outdated
Comment thread apps/desktop/src/renderer/components/chat/AgentChatPane.tsx Outdated
Comment thread apps/desktop/src/renderer/components/chat/AgentChatPane.tsx Outdated
Comment thread apps/desktop/src/renderer/components/chat/ChatAttachmentTray.tsx
Comment thread scripts/tui-web.mjs
@arul28
Copy link
Copy Markdown
Owner Author

arul28 commented May 20, 2026

@copilot review but do not make fixes

Copy link
Copy Markdown
Contributor

Copilot AI commented May 20, 2026

@copilot review but do not make fixes

Review-only pass completed on 90622ca (no fixes made). I checked the latest CI runs: current runs for 90622ca are still in progress, and the last completed failing CI run (26195344338) failed in test-desktop (6) due ChatSubagentsPanel.test.tsx not finding “Background tasks”; ci-pass then failed as expected because a required job failed. I also spot-checked the latest touched risk areas (RightPane/TUI, desktop bridge client timeout handling, and chat service provider-match logic) and didn’t find a new blocking issue beyond that known test failure signal.

Copilot finished work on behalf of arul28 May 20, 2026 23:49
@arul28 arul28 merged commit a17e0d0 into main May 21, 2026
29 checks passed
@arul28 arul28 deleted the ade/tui-perf-and-fucntilnaity-pass-241a6c0b branch May 21, 2026 16:59
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.

2 participants