Skip to content

Refine pending input cards across ADE surfaces#603

Merged
arul28 merged 6 commits into
mainfrom
ade/plan-start-context-skill-wanna-0f369574
Jun 17, 2026
Merged

Refine pending input cards across ADE surfaces#603
arul28 merged 6 commits into
mainfrom
ade/plan-start-context-skill-wanna-0f369574

Conversation

@arul28

@arul28 arul28 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • add shared pending-input provider/header labels and apply them to desktop chat cards, composer banners, TUI approval prompts, and iOS Work chat cards
  • distinguish exact chat pending-input counts from broader runtime awaiting-input state in lane/session summaries
  • align Droid ask-user payload shaping, docs, tests, and iOS provider accents/accessibility around the inline pending-input flow

Validation

  • npm --prefix apps/desktop run typecheck
  • npm --prefix apps/desktop run lint (0 errors; existing warnings remain)
  • npm --prefix apps/desktop run build
  • npm run test:desktop:sharded
  • npm --prefix apps/ade-cli run typecheck
  • npm --prefix apps/ade-cli run test
  • npm --prefix apps/ade-cli run build
  • node scripts/validate-docs.mjs
  • xcrun swiftc -parse apps/ios/ADE/Views/Components/ADEDesignSystem.swift apps/ios/ADE/Views/Work/WorkModels.swift apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift apps/ios/ADE/Views/Work/WorkChatRichCardViews.swift apps/ios/ADETests/ADETests.swift
  • XcodeBuildMCP test_sim: ADETests/testPendingInputHeaderVerbUsesFallbackProviderWhenSourceIsMissing, ADETests/testWorkPreviewIsWireframeMatchesDesktopIndentationHeuristic
  • git diff --check HEAD --

Summary by CodeRabbit

Release Notes

  • New Features

    • Added provider-branded headers and accent colors for pending input prompts.
    • Implemented keyboard shortcuts for structured questions: number keys select options, arrow keys navigate, Enter submits.
    • Added "Compare mode" for option previews (view up to two side-by-side).
    • Auto-detect and render ASCII art previews in monospace format.
    • Display "Awaiting you" indicators on lane tabs and session cards when input is needed.
    • Added haptic feedback when new blocking inputs arrive (iOS).
  • Bug Fixes

    • Fixed duplicate context text in approval prompts.
    • Improved option preview layout to preserve multi-line formatting.
  • Tests

    • Added coverage for keyboard interactions with structured questions.
    • Added wireframe detection tests.

Greptile Summary

  • Adds shared pending-input provider labels, header wording, and accents across desktop, TUI, and iOS surfaces.
  • Updates pending-input chat cards with richer option previews, keyboard interactions, compare mode, and provider-aware presentation.
  • Separates exact chat pending-input counts from broader awaiting-input state in lane and session summaries.
  • Aligns Droid ask-user payload shaping, related tests, and documentation with the inline pending-input flow.

Confidence Score: 4/5

Merge should wait for the pending-input answer preservation issues to be addressed, since both can silently alter user-provided content before it reaches the backend or SDK.

The changed surfaces are broad but the issues are localized to answer shaping paths, with focused evidence confirming the Droid whitespace-loss behavior and the iOS behavior isolated to a specific payload-construction branch.

apps/desktop/src/main/services/chat/agentChatService.ts and apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift

T-Rex T-Rex Logs

What T-Rex did

  • Reproduced Droid whitespace preservation behavior using a focused Node harness that mirrors the real requestChatInput normalization and Droid SDK join path for a single Droid option with value ' yes '.
  • Observed that the harness returned the option value as 'yes' (the whitespace-preservation assertion failed with actual 'yes' and expected ' yes ').
  • A focused Vitest attempt was captured, but desktop test dependencies were unavailable because vitest was not installed.
  • Attempted a focused iOS/Swift runtime check, but the container does not have the Swift or Xcode toolchain installed.
  • Compared before/after test runs for TUI labels and Droid flows, noting changes in test counts and that Vitest startup failure persisted in desktop paths.

View all artifacts

T-Rex Ran code and verified through T-Rex

Comments Outside Diff (3)

  1. apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx, line 1831-1834 (link)

    P1 Preserve optional response

    This branch immediately accepts a single-select answer and sends only the option value. The card still renders an optional freeform field for option questions, so when someone types extra context and then clicks an option, that typed response is silently dropped instead of being included like the submit() path does. Please either keep this as a selection-only action when freeform is allowed, or include the current draft in the submitted answer.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx
    Line: 1831-1834
    
    Comment:
    **Preserve optional response**
    
    This branch immediately accepts a single-select answer and sends only the option value. The card still renders an optional freeform field for option questions, so when someone types extra context and then clicks an option, that typed response is silently dropped instead of being included like the `submit()` path does. Please either keep this as a selection-only action when freeform is allowed, or include the current draft in the submitted answer.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

  2. apps/desktop/src/main/services/lanes/laneListSnapshotService.ts, line 201-208 (link)

    P2 Avoid stale pending counts

    This sets pendingInputWaiting: true for any chat summary with awaitingInput, even when pendingInputItemId is missing. agentChatService can derive that flag from persisted awaitingInput, so after a restart or stale persisted state the lane can show the new “Awaiting you” badge and increment pendingInputCount without an actionable pending card. Since this count is meant to represent exact chat pending inputs, it should only increment when an actual pending input item id is available, or the summary needs a separate field for generic awaiting state.

    Artifacts

    Repro: focused stale pending count script

    • Contains supporting evidence from the run (text/javascript; charset=utf-8).

    Stack trace captured during the T-Rex run

    • Keeps the raw stack trace available without making the summary code-heavy.

    View artifacts

    T-Rex Ran code and verified through T-Rex

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/main/services/lanes/laneListSnapshotService.ts
    Line: 201-208
    
    Comment:
    **Avoid stale pending counts**
    
    This sets `pendingInputWaiting: true` for any chat summary with `awaitingInput`, even when `pendingInputItemId` is missing. `agentChatService` can derive that flag from persisted `awaitingInput`, so after a restart or stale persisted state the lane can show the new “Awaiting you” badge and increment `pendingInputCount` without an actionable pending card. Since this count is meant to represent exact chat pending inputs, it should only increment when an actual pending input item id is available, or the summary needs a separate field for generic awaiting state.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

  3. apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift, line 1185-1191 (link)

    P1 Preserve optional replies

    When a single-choice question also allows freeform text, this branch records only the selected option and then skips the draft text. The caller sends the draft separately as responseText, but the backend ignores responseText once answers[questionId] already exists, so an iOS user who selects an option and types optional context silently loses that context. The option and non-empty freeform text need to be submitted together in the answer value for this question.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift
    Line: 1185-1191
    
    Comment:
    **Preserve optional replies**
    
    When a single-choice question also allows freeform text, this branch records only the selected option and then skips the draft text. The caller sends the draft separately as `responseText`, but the backend ignores `responseText` once `answers[questionId]` already exists, so an iOS user who selects an option and types optional context silently loses that context. The option and non-empty freeform text need to be submitted together in the answer value for this question.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

Fix All in Claude Code

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

---

### Issue 1 of 1
apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift:1185-1191
**Preserve optional replies**

When a single-choice question also allows freeform text, this branch records only the selected option and then skips the draft text. The caller sends the draft separately as `responseText`, but the backend ignores `responseText` once `answers[questionId]` already exists, so an iOS user who selects an option and types optional context silently loses that context. The option and non-empty freeform text need to be submitted together in the answer value for this question.

Reviews (2): Last reviewed commit: "Preserve pending input option answers" | Re-trigger Greptile

@vercel

vercel Bot commented Jun 17, 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 17, 2026 11:43pm

@arul28 arul28 changed the title Plan Start Context Skill Wanna Refine pending input cards across ADE surfaces Jun 17, 2026
@arul28

arul28 commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@arul28, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 17 minutes and 2 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: ccdd025d-67de-428f-92ec-703b5a0cd10c

📥 Commits

Reviewing files that changed from the base of the PR and between 0b2cb51 and ca58d38.

⛔ Files ignored due to path filters (8)
  • apps/ade-cli/src/tuiClient/__tests__/pendingInput.test.ts is excluded by none and included by none
  • apps/ade-cli/src/tuiClient/app.tsx is excluded by none and included by none
  • apps/ade-cli/src/tuiClient/components/ApprovalPrompt.tsx is excluded by none and included by none
  • apps/ade-cli/src/tuiClient/pendingInput.ts is excluded by none and included by none
  • apps/ios/ADE/Views/Work/WorkChatSessionView+Timeline.swift is excluded by none and included by none
  • apps/ios/ADE/Views/Work/WorkErrorAndMessageHelpers.swift is excluded by none and included by none
  • apps/ios/ADE/Views/Work/WorkSessionDestinationView+Actions.swift is excluded by none and included by none
  • apps/ios/ADETests/ADETests.swift is excluded by none and included by none
📒 Files selected for processing (9)
  • apps/desktop/src/main/services/adeActions/registry.test.ts
  • apps/desktop/src/main/services/chat/droidSdkAskUser.test.ts
  • apps/desktop/src/main/services/chat/droidSdkAskUser.ts
  • apps/desktop/src/main/services/lanes/laneListSnapshotService.test.ts
  • apps/desktop/src/main/services/lanes/laneListSnapshotService.ts
  • apps/desktop/src/renderer/components/chat/AgentChatMessageList.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx
  • apps/desktop/src/renderer/components/chat/pendingInput.test.ts
  • apps/desktop/src/renderer/components/chat/pendingInput.ts
📝 Walkthrough

Walkthrough

Adds provider-branded pending input UX across Desktop (React), iOS (SwiftUI), and the ADE CLI. Introduces shared providerDisplayName/pendingInputHeaderLabel utilities, a pendingInputCount metric in lane runtime summaries, provider-accented card headers with ProviderLogo, wireframe preview detection, and keyboard-first interaction for question/plan-approval cards. Extracts summarizeDroidAskUser from the Droid SDK worker into its own module.

Changes

Provider-branded pending input UX

Layer / File(s) Summary
Shared pending input label utilities and LaneRuntimeSummary extension
apps/desktop/src/shared/pendingInputLabels.ts, apps/desktop/src/shared/pendingInputLabels.test.ts, apps/desktop/src/shared/types/lanes.ts, apps/desktop/src/renderer/components/shared/ProviderLogos.tsx
providerDisplayName and pendingInputHeaderLabel are added as shared utilities; LaneRuntimeSummary gains optional pendingInputCount; ProviderLogo gains explicit claude and codex switch cases.
summarizeDroidAskUser extraction from Droid SDK worker
apps/desktop/src/main/services/chat/droidSdkAskUser.ts, apps/desktop/src/main/services/chat/droidSdkAskUser.test.ts, apps/desktop/src/main/services/chat/droidSdkProtocol.ts, apps/desktop/src/main/services/chat/droidSdkWorker.ts
The local ask-user summarizer is extracted to summarizeDroidAskUser with topic/option normalization and tool-call ID generation; the worker delegates to it; protocol JSDoc is expanded; a unit test covers label trimming and value preservation.
pendingInputCount tracking in lane runtime service
apps/desktop/src/main/services/lanes/laneListSnapshotService.ts, apps/desktop/src/main/services/lanes/laneListSnapshotService.test.ts, apps/desktop/src/main/services/adeActions/registry.test.ts, apps/desktop/src/renderer/browserMock.ts
summarizeLaneRuntime accumulates pendingInputCount for awaiting-input chat sessions; enrichSessionsForLaneList sets pendingInputWaiting: true; snapshot service and registry tests and the browser mock are updated to match.
iOS provider attribution on WorkPendingQuestionModel and header verb helpers
apps/ios/ADE/Views/Work/WorkModels.swift, apps/ios/ADE/Views/Work/WorkErrorAndMessageHelpers.swift
WorkPendingQuestionModel gains a source field; workChatSurfaceProviderName and workChatPendingInputHeaderVerb are added as free functions; providerHeaderVerb computed properties/methods are added to both WorkPendingQuestionModel and WorkPendingPlanApprovalModel; parsing helpers populate body and source.
iOS provider accent color and wireframe detection
apps/ios/ADE/Views/Components/ADEDesignSystem.swift, apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift, apps/ios/ADETests/ADETests.swift
ADEColor.providerChatAccent(for:) is added as a convenience wrapper; workPreviewIsWireframe is introduced for box-drawing/indentation detection; iOS unit tests cover header verb fallback and wireframe heuristic.
iOS WorkStructuredQuestionCard and WorkPlanReviewCard provider theming
apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift, apps/ios/ADE/Views/Work/WorkChatRichCardViews.swift, apps/ios/ADE/Views/Work/WorkChatSessionView+Timeline.swift
WorkStructuredQuestionCard gains fallbackProvider, resolvedProvider, providerAccent, reworked header (logo + verb), wireframe preview branching, and accent-driven selection/VoiceOver. WorkPlanReviewCard gains per-provider accent, provider-verb header, and passes accent to WorkPlanCopyButton. Timeline view wires fallbackProvider to both cards.
iOS WorkChatSessionView blocking pending input scroll and haptic
apps/ios/ADE/Views/Work/WorkChatSessionView.swift
Adds blockingPendingInputId, blockingPendingScrollAnchor, and handleBlockingPendingInputChange to scroll the blocking card into view with a one-time light haptic per new blocking gate; seeds lastBlockingPendingInputId on first appearance.
Desktop AgentChatComposer pending header refactor
apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx, apps/desktop/src/renderer/components/chat/AgentChatComposer.test.tsx
Replaces local pendingHeaderLabel and status glyph with ProviderLogo and pendingInputHeaderLabel; removes pendingQuestionCount computation; adjusts hint styling; composer tests updated for new banner text.
Desktop ChatProposedPlanCard provider theming
apps/desktop/src/renderer/components/chat/ChatProposedPlanCard.tsx
Derives headerLabel via pendingInputHeaderLabel, shows ProviderLogo, applies --chat-accent to the Implement button, removing hardcoded emerald/status-glyph visuals.
Desktop InlineQuestionRequestCard keyboard UX, accent theming, and wireframe previews
apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx, apps/desktop/src/renderer/components/chat/AgentChatMessageList.test.tsx
Introduces looksLikeWireframe, QuestionOptionPreview, accent CSS fragments, one-time focus/entered tracking, compare-mode, a keyboard handler (digit/arrow/enter/page), provider-accented header with ProviderLogo, extraContext deduplication, ARIA semantics, a motion.div wrapper, and lifecycleKey wiring; tests cover keyboard selection, hover-preview, wireframe rendering, and looksLikeWireframe unit cases.
Desktop LanesPage and SessionCard awaiting-input UI
apps/desktop/src/renderer/components/lanes/LanesPage.tsx, apps/desktop/src/renderer/components/terminals/SessionCard.tsx, apps/desktop/src/renderer/components/terminals/SessionCard.test.tsx
LanesPage renders an "Awaiting you" pill in lane tabs when pendingInputCount > 0; SessionCard derives awaitingUser via sessionNeedsChatTabHighlight and renders a matching pill; tests verify chat and CLI label presence/absence.
ADE CLI ApprovalPrompt provider accent and multiline preview
apps/ade-cli/src/tuiClient/components/ApprovalPrompt.tsx
Derives accent/glyph/title from request source via pendingInputAccent and pendingInputHeaderLabel; introduces previewLines for terminal-safe multi-line option previews; adds extraContext deduplication rendering.

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Possibly related PRs

  • arul28/ADE#218: Modifies the same iOS components (WorkChatComposerAndInputViews.swift, WorkChatSessionView+Timeline.swift) for pending-question UX logic including wireframe-preview and scroll-to behaviors.
  • arul28/ADE#240: Overlaps with AgentChatComposer.tsx pending-input gating/locking changes that intersect the composer header and inline hint rendering refactored in this PR.

Suggested labels

desktop, ios

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.32% 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
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main focus of the PR—refining pending input card UI and behavior across multiple platforms (desktop, CLI, iOS). It directly reflects the central theme without being overly vague or unrelated to the actual changes.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ade/plan-start-context-skill-wanna-0f369574

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 and usage tips.

@mintlify

mintlify Bot commented Jun 17, 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 17, 2026, 10:36 PM

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

Comment thread apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx Outdated
Comment thread apps/desktop/src/main/services/chat/droidSdkWorker.ts Outdated
@arul28

arul28 commented Jun 17, 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: 0b2cb51cb6

ℹ️ 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/ios/ADE/Views/Work/WorkChatSessionView.swift
Comment thread apps/ios/ADE/Views/Work/WorkErrorAndMessageHelpers.swift Outdated

@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: 3

Caution

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

⚠️ Outside diff range comments (2)
apps/ios/ADE/Views/Work/WorkChatSessionView+Timeline.swift (1)

111-128: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Missing scroll anchor id on pending plan approval card breaks blocking-gate auto-scroll

WorkChatSessionView computes a plan-approval anchor as "pending-question-\(plan.id)", but this view branch never sets that .id(...), so proxy.scrollTo(...) cannot target it. Add the same id pattern here to keep haptic+scroll behavior consistent for plan approvals.

Suggested patch
     case .pendingPlanApproval(let plan):
       WorkPlanReviewCard(
         plan: plan,
         busy: actionInFlight || !isLive,
         onDecision: { decision, feedback in
           await runSessionAction {
             // Approve: send "accept" decision directly.
             // Reject: send "decline"; if the user typed feedback, also
             // queue it as a follow-up steer message so the agent sees the
             // revision notes in the next turn.
             await onApproveRequest(plan.id, decision)
             if decision == .decline, let feedback, !feedback.isEmpty {
               _ = await onSend(feedback)
             }
           }
         },
         fallbackProvider: chatSummary?.provider
       )
+      .id("pending-question-\(plan.id)")
🤖 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/ios/ADE/Views/Work/WorkChatSessionView`+Timeline.swift around lines 111
- 128, The WorkPlanReviewCard in the .pendingPlanApproval case is missing the
scroll anchor id modifier, which breaks the auto-scroll functionality for
blocking-gate approval cards. Add a .id() modifier to the WorkPlanReviewCard
using the pattern "pending-question-\(plan.id)" to match the anchor that
WorkChatSessionView computes and uses with proxy.scrollTo(), ensuring the haptic
and scroll behavior remains consistent across all plan approval interactions.
apps/desktop/src/main/services/adeActions/registry.test.ts (1)

955-962: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Snapshot fixture asserts an exact pending count without a pending item id.

The mocked awaiting chat lacks pendingInputItemId, but Line 1010 expects pendingInputCount: 1. For the “exact pending input requests” contract, add a concrete pendingInputItemId in the fixture (or expect 0).

Suggested fixture adjustment
       agentChatService: {
         listSessions: vi.fn(async () => [
           {
             sessionId: "awaiting-chat",
             status: "active",
             awaitingInput: true,
+            pendingInputItemId: "pending-1",
             identityKey: null,
           },
         ]),
       },

Also applies to: 1006-1011

🤖 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/adeActions/registry.test.ts` around lines 955
- 962, The mocked listSessions function in the test fixture is missing the
pendingInputItemId property in the session object, but the assertion expects
pendingInputCount to be 1. To fix this, either add a concrete pendingInputItemId
value to the mock session object within the listSessions mock function
definition, or update the corresponding assertion to expect pendingInputCount: 0
to align with a fixture that lacks a pending input item identifier.
🧹 Nitpick comments (2)
apps/ade-cli/src/tuiClient/components/ApprovalPrompt.tsx (1)

34-47: ⚡ Quick win

Centralize provider-accent eligibility to prevent cross-surface drift.

PROVIDER_ACCENT_SOURCES duplicates provider knowledge that is already modeled elsewhere (shared label/type paths). This can drift and produce mixed UX (provider-specific header label but fallback violet accent) when a provider is added in one place but not this set. Prefer a single shared resolver for source normalization + accent mapping used by Desktop/CLI/iOS-facing layers.

🤖 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/ApprovalPrompt.tsx` around lines 34 -
47, The PROVIDER_ACCENT_SOURCES set in the pendingInputAccent function
duplicates provider knowledge that already exists in the AdeCodeProvider type
definition, creating a maintenance risk where providers could be added to the
type but not to this set. Replace the hardcoded PROVIDER_ACCENT_SOURCES set with
a call to a shared provider validation function (or create one if it doesn't
exist) that checks whether a given provider should receive custom accent
styling. This shared function should be located in a common utilities or
constants file and used consistently across all UI surfaces to ensure a single
source of truth for provider-specific behavior. Update the pendingInputAccent
function to use this centralized resolver instead of directly checking
membership in PROVIDER_ACCENT_SOURCES.
apps/desktop/src/main/services/lanes/laneListSnapshotService.test.ts (1)

51-87: ⚡ Quick win

Add a stale-state regression case for exact pending counts.

The new test only covers awaitingInput with pendingInputItemId present. Please add a companion case where awaitingInput: true and pendingInputItemId is missing, and assert pendingInputCount: 0 to lock in the exact-actionable contract.

🤖 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/lanes/laneListSnapshotService.test.ts` around
lines 51 - 87, The test "counts chat pending input separately from CLI attention
heuristics" only covers the case where awaitingInput is true with
pendingInputItemId present. Add a companion test case that sets awaitingInput to
true in the agentChatService mock but omits the pendingInputItemId (or sets it
to undefined), then assert that the resulting snapshot runtime has
pendingInputCount: 0 to ensure the exact contract is maintained when pending
input ID is missing.
🤖 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/main/services/chat/droidSdkAskUser.ts`:
- Around line 13-16: The filter condition in the filter method only checks if
the option has a length greater than zero, but this allows whitespace-only
strings like "   " to pass through and render as blank options downstream.
Modify the filter condition to check that option.trim().length is greater than
zero instead of just option.length, while keeping the map method's label
assignment as is so that meaningful strings are properly preserved with their
trimmed values.

In `@apps/desktop/src/main/services/lanes/laneListSnapshotService.ts`:
- Around line 131-134: The pendingInputCount is being incremented whenever
session.pendingInputWaiting is true, even when session.pendingInputItemId is
null, causing stale pending counts. In the bucket === "awaiting-input"
condition, change the logic so that pendingInputCount is only incremented when
there is an actual actionable pendingInputItemId present, not just when
pendingInputWaiting is true. Replace the condition that currently checks
"session.pendingInputWaiting || session.pendingInputItemId" with a check that
only counts items when pendingInputItemId exists.

In `@apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx`:
- Around line 1831-1836: In the handleOption function, the fast-path condition
that checks for submitSingle, non-multiSelect questions, and single question
count does not account for freeform input. When allowsFreeform is true on the
question object, the condition should skip this fast-path to prevent discarding
any draft text the user may have typed in the freeform input. Add an additional
check to the condition to exclude the fast-path when question.allowsFreeform is
true, allowing the normal flow to handle combining the freeform draft text with
the selected option value.

---

Outside diff comments:
In `@apps/desktop/src/main/services/adeActions/registry.test.ts`:
- Around line 955-962: The mocked listSessions function in the test fixture is
missing the pendingInputItemId property in the session object, but the assertion
expects pendingInputCount to be 1. To fix this, either add a concrete
pendingInputItemId value to the mock session object within the listSessions mock
function definition, or update the corresponding assertion to expect
pendingInputCount: 0 to align with a fixture that lacks a pending input item
identifier.

In `@apps/ios/ADE/Views/Work/WorkChatSessionView`+Timeline.swift:
- Around line 111-128: The WorkPlanReviewCard in the .pendingPlanApproval case
is missing the scroll anchor id modifier, which breaks the auto-scroll
functionality for blocking-gate approval cards. Add a .id() modifier to the
WorkPlanReviewCard using the pattern "pending-question-\(plan.id)" to match the
anchor that WorkChatSessionView computes and uses with proxy.scrollTo(),
ensuring the haptic and scroll behavior remains consistent across all plan
approval interactions.

---

Nitpick comments:
In `@apps/ade-cli/src/tuiClient/components/ApprovalPrompt.tsx`:
- Around line 34-47: The PROVIDER_ACCENT_SOURCES set in the pendingInputAccent
function duplicates provider knowledge that already exists in the
AdeCodeProvider type definition, creating a maintenance risk where providers
could be added to the type but not to this set. Replace the hardcoded
PROVIDER_ACCENT_SOURCES set with a call to a shared provider validation function
(or create one if it doesn't exist) that checks whether a given provider should
receive custom accent styling. This shared function should be located in a
common utilities or constants file and used consistently across all UI surfaces
to ensure a single source of truth for provider-specific behavior. Update the
pendingInputAccent function to use this centralized resolver instead of directly
checking membership in PROVIDER_ACCENT_SOURCES.

In `@apps/desktop/src/main/services/lanes/laneListSnapshotService.test.ts`:
- Around line 51-87: The test "counts chat pending input separately from CLI
attention heuristics" only covers the case where awaitingInput is true with
pendingInputItemId present. Add a companion test case that sets awaitingInput to
true in the agentChatService mock but omits the pendingInputItemId (or sets it
to undefined), then assert that the resulting snapshot runtime has
pendingInputCount: 0 to ensure the exact contract is maintained when pending
input ID is missing.
🪄 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: 37a5ede1-82fb-4044-b584-8661930334ec

📥 Commits

Reviewing files that changed from the base of the PR and between e7e545f and 0b2cb51.

⛔ Files ignored due to path filters (2)
  • docs/features/chat/README.md is excluded by !docs/**
  • docs/features/chat/composer-and-ui.md is excluded by !docs/**
📒 Files selected for processing (29)
  • apps/ade-cli/src/tuiClient/components/ApprovalPrompt.tsx
  • apps/desktop/src/main/services/adeActions/registry.test.ts
  • apps/desktop/src/main/services/chat/droidSdkAskUser.test.ts
  • apps/desktop/src/main/services/chat/droidSdkAskUser.ts
  • apps/desktop/src/main/services/chat/droidSdkProtocol.ts
  • apps/desktop/src/main/services/chat/droidSdkWorker.ts
  • apps/desktop/src/main/services/lanes/laneListSnapshotService.test.ts
  • apps/desktop/src/main/services/lanes/laneListSnapshotService.ts
  • apps/desktop/src/renderer/browserMock.ts
  • apps/desktop/src/renderer/components/chat/AgentChatComposer.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatMessageList.test.tsx
  • apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx
  • apps/desktop/src/renderer/components/chat/ChatProposedPlanCard.tsx
  • apps/desktop/src/renderer/components/lanes/LanesPage.tsx
  • apps/desktop/src/renderer/components/shared/ProviderLogos.tsx
  • apps/desktop/src/renderer/components/terminals/SessionCard.test.tsx
  • apps/desktop/src/renderer/components/terminals/SessionCard.tsx
  • apps/desktop/src/shared/pendingInputLabels.test.ts
  • apps/desktop/src/shared/pendingInputLabels.ts
  • apps/desktop/src/shared/types/lanes.ts
  • apps/ios/ADE/Views/Components/ADEDesignSystem.swift
  • apps/ios/ADE/Views/Work/WorkChatComposerAndInputViews.swift
  • apps/ios/ADE/Views/Work/WorkChatRichCardViews.swift
  • apps/ios/ADE/Views/Work/WorkChatSessionView+Timeline.swift
  • apps/ios/ADE/Views/Work/WorkChatSessionView.swift
  • apps/ios/ADE/Views/Work/WorkErrorAndMessageHelpers.swift
  • apps/ios/ADE/Views/Work/WorkModels.swift
  • apps/ios/ADETests/ADETests.swift

Comment thread apps/desktop/src/main/services/chat/droidSdkAskUser.ts Outdated
Comment thread apps/desktop/src/main/services/lanes/laneListSnapshotService.ts
Comment thread apps/desktop/src/renderer/components/chat/AgentChatMessageList.tsx
@arul28

arul28 commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@arul28

arul28 commented Jun 17, 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: b7db76caf6

ℹ️ 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/AgentChatMessageList.tsx
@arul28

arul28 commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 97f0ddd3f1

ℹ️ 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 commented Jun 17, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@arul28 arul28 merged commit fd04444 into main Jun 17, 2026
27 checks passed

@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: ca58d389d6

ℹ️ 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 on lines +148 to +151
const awaitingUser = sessionNeedsChatTabHighlight({
runtimeState: session.runtimeState,
toolType: session.toolType,
pendingInputItemId: session.pendingInputItemId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require a real pending item before showing Awaiting you

When a chat summary has stale awaitingInput state but no pendingInputItemId (for example after restart, because summaries derive awaitingInput from persisted state even when latestPendingInputItemIdForSession returns null), IPC projects the session as runtimeState: "waiting-input". This new badge then labels that row “Awaiting your input” even though there is no actionable question/plan card to answer; the lane tab logic added here already avoids this by counting only sessions with a pending item id, so this badge should use the same stricter condition.

Useful? React with 👍 / 👎.

@arul28 arul28 deleted the ade/plan-start-context-skill-wanna-0f369574 branch June 18, 2026 01:09
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