Skip to content

ADE-110: Polish CTO desktop and mobile experience#794

Merged
arul28 merged 3 commits into
mainfrom
ade-110-cto
Jul 12, 2026
Merged

ADE-110: Polish CTO desktop and mobile experience#794
arul28 merged 3 commits into
mainfrom
ade-110-cto

Conversation

@arul28

@arul28 arul28 commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Fixes ADE-110

Linked Linear issues

ADE   Open in ADE  ·  ade-110-cto branch  ·  PR #794

Summary by CodeRabbit

  • New Features

    • CTO settings now support live model selection and Fast mode on desktop and iOS.
    • CTO model settings are managed from the settings panel rather than the chat header.
    • iOS work sessions support a compact, single-line message composer.
    • CTO guidance now reflects the latest available ADE actions and skills.
  • Improvements

    • Model controls can be hidden when managed by an embedding surface.
    • iOS CTO identity editing is streamlined to focus on profile and behavior settings.
    • Chat input height and controls adapt more flexibly to compact layouts.
  • Bug Fixes

    • Preserved CTO full-access permissions when changing models across providers.

Greptile Summary

This PR polishes the CTO experience across desktop and iOS. The main changes are:

  • CTO model and Fast mode controls move into settings.
  • Embedded CTO chat hides duplicate model controls.
  • iOS CTO chat uses the compact Work composer.
  • CTO permissions are preserved when switching models across providers.
  • CTO prompt and docs now point to live ADE actions and bundled skills.

Confidence Score: 5/5

This looks safe to merge.

No blocking issues found in the changed code.

T-Rex T-Rex Logs

What T-Rex did

  • Ran the test suite and confirmed all tests passed: 91/91 focused tests succeeded with exit code 0.
  • Launched the Vite server and verified it was ready on localhost:5173; noted the 502 health proxy due to the optional live bridge being absent and that browser mock data was used.
  • Inspected the UI render proof by reviewing before- and after-state visuals and a capture video showing route changes between /work and /cto.

View all artifacts

T-Rex Ran code and verified through T-Rex

Important Files Changed

Filename Overview
apps/ios/ADE/Views/Work/WorkChatSessionView.swift Adds compact composer support while keeping suggestions, attachments, pasted images, dictation, and send controls available.
apps/ios/ADE/Views/Cto/CtoSessionDestinationView.swift Routes CTO sessions into the compact Work composer.
apps/desktop/src/renderer/components/cto/CtoPage.tsx Moves CTO model and Fast mode updates into settings and hides duplicate chat controls.
apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx Adds a prop for host-owned model, reasoning, and Fast mode controls.
apps/ios/ADE/Views/Cto/CtoSettingsScreen.swift Adds live CTO model selection and Fast mode updates in iOS settings.

Comments Outside Diff (1)

  1. apps/ios/ADE/Views/Work/WorkChatSessionView.swift, line 841-850 (link)

    P1 Compact Composer Drops Input Features

    When the CTO tab enables compactComposer, this branch renders the text field without the normal suggestion strip, attachment tray, or onPasteImages callback used by the non-compact composer. A CTO user can type trigger text or paste an image into the chat and the compact path no longer surfaces suggestions or stages pasted attachments, even though the same chat session still uses the Work chat pipeline.

    Artifacts

    Repro: executable source-structure harness for compact versus non-compact composer features

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

    Repro: harness output showing compact composer omissions and non-compact composer feature presence

    • Keeps the command output 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/ios/ADE/Views/Work/WorkChatSessionView.swift
    Line: 841-850
    
    Comment:
    **Compact Composer Drops Input Features**
    
    When the CTO tab enables `compactComposer`, this branch renders the text field without the normal suggestion strip, attachment tray, or `onPasteImages` callback used by the non-compact composer. A CTO user can type trigger text or paste an image into the chat and the compact path no longer surfaces suggestions or stages pasted attachments, even though the same chat session still uses the Work chat pipeline.
    
    How can I resolve this? If you propose a fix, please make it concise.

    Fix in Claude Code

Reviews (3): Last reviewed commit: "Refs ADE-110: ship: iteration 2 — preser..." | Re-trigger Greptile

@vercel

vercel Bot commented Jul 12, 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 Jul 12, 2026 4:12pm

@linear-code

linear-code Bot commented Jul 12, 2026

Copy link
Copy Markdown

ADE-110

@arul28 arul28 changed the title ADE-110 CTO -> Primary ADE-110: Polish CTO desktop and mobile experience Jul 12, 2026
@arul28

arul28 commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

@copilot review but do not make fixes

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Walkthrough

Changes

This change updates CTO model and fast-mode controls across desktop and iOS, preserves CTO permissions during provider changes, adds live ADE action guidance, introduces an iOS compact composer, and removes duplicate identity/model controls.

CTO controls and session experience

Layer / File(s) Summary
Desktop CTO permissions and guidance
apps/desktop/src/main/services/chat/...
CTO session updates preserve full-access permissions across provider changes, while generated guidance documents live ADE action discovery and execution.
Desktop composer control ownership
apps/desktop/src/renderer/components/chat/...
Chat panes and composers can hide model, reasoning, and fast-mode controls when the surrounding CTO surface owns them.
Desktop CTO model and fast-mode settings
apps/desktop/src/renderer/components/cto/...
CTO settings now control model and fast-mode updates, with model capability metadata and coverage for session update payloads.
iOS CTO identity and live model settings
apps/ios/ADE/Views/Cto/...
Identity editing no longer manages model fields; CTO settings adds live model selection and removes the personality top-bar label.
iOS compact CTO composer
apps/ios/ADE/Views/Work/...
CTO sessions use a compact single-line composer with shared send/interrupt controls and configurable text-field height.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

  • arul28/ADE#253: Modifies fast-mode controls in AgentChatComposer.
  • arul28/ADE#577: Refactors Codex fast-mode rendering in the same composer.
  • arul28/ADE#702: Overlaps with CTO model-switch lifecycle and state/prompt generation.

Suggested labels: desktop, ios, docs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 41.18% 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
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately reflects the main CTO desktop and mobile UX polish across the changeset.
✨ 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-110-cto

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
apps/desktop/src/renderer/components/cto/ctoUi.test.tsx (1)

140-165: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for fast-mode-off and non-supporting models.

The model-switch test uses objectContaining, so it doesn't assert fastMode is forwarded; dropping that field from handleModelChange would still pass. The fast-mode test only covers fastMode: true. Consider adding: (1) a toggle-off case asserting fastMode: false, and (2) a model switch to a non-supporting model (supportsFastMode: false) asserting fastMode: false is sent, which exercises the selection.supportsFastMode && currentFastMode guard.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/desktop/src/renderer/components/cto/ctoUi.test.tsx` around lines 140 -
165, The CTO UI tests need coverage for forwarding fastMode in both false-value
scenarios. Strengthen the model-switch assertion around the existing settings
model-switch test to require fastMode: false when the selected model has
supportsFastMode: false, and add a Fast mode toggle-off test that asserts
updateSession receives fastMode: false for the locked CTO session. Use the
existing CtoPage, model-picker, model-fast-toggle, and updateSession test
helpers.
apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx (1)

3998-4029: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Parallel-mode model/reasoning/fast-mode controls are not gated by hideModelControls.

Only the single-model row respects the new flag; the parallel-slot-configuring block still renders its own ModelPicker/ReasoningEffortPicker/ComposerFastModeButton regardless of hideModelControls. Likely harmless today (parallel mode isn't expected to be enabled on host-owned surfaces like the CTO page), but worth confirming that surfaces using hideModelControls also disable showParallelChatToggle/parallelChatMode.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx` around lines
3998 - 4029, Gate the parallel-slot controls in the `parallelChatMode &&
parallelConfiguringIndex != null && parallelModelSlots[...]` block with
`hideModelControls`, so `ModelPicker`, `ReasoningEffortPicker`, and
`ComposerFastModeButton` do not render when model controls are hidden. Preserve
the existing parallel configuration behavior when `hideModelControls` is false,
and ensure surfaces using the flag cannot expose parallel model controls.
🤖 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/agentChatService.test.ts`:
- Around line 5906-5931: Update the test around the service setup and assertions
in “keeps CTO full access when a model switch crosses providers” so db.close()
executes in a finally block, including when any assertion or awaited operation
fails. Keep the existing assertions and database cleanup behavior unchanged.

---

Nitpick comments:
In `@apps/desktop/src/renderer/components/chat/AgentChatComposer.tsx`:
- Around line 3998-4029: Gate the parallel-slot controls in the
`parallelChatMode && parallelConfiguringIndex != null &&
parallelModelSlots[...]` block with `hideModelControls`, so `ModelPicker`,
`ReasoningEffortPicker`, and `ComposerFastModeButton` do not render when model
controls are hidden. Preserve the existing parallel configuration behavior when
`hideModelControls` is false, and ensure surfaces using the flag cannot expose
parallel model controls.

In `@apps/desktop/src/renderer/components/cto/ctoUi.test.tsx`:
- Around line 140-165: The CTO UI tests need coverage for forwarding fastMode in
both false-value scenarios. Strengthen the model-switch assertion around the
existing settings model-switch test to require fastMode: false when the selected
model has supportsFastMode: false, and add a Fast mode toggle-off test that
asserts updateSession receives fastMode: false for the locked CTO session. Use
the existing CtoPage, model-picker, model-fast-toggle, and updateSession test
helpers.
🪄 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: 2629f83e-b8a2-43b7-8287-fa1ffd6fc2a8

📥 Commits

Reviewing files that changed from the base of the PR and between f934411 and d7baaf8.

⛔ Files ignored due to path filters (3)
  • docs/features/agents/identity-and-personas.md is excluded by !docs/**
  • docs/features/cto/README.md is excluded by !docs/**
  • docs/features/sync-and-multi-device/ios-companion.md is excluded by !docs/**
📒 Files selected for processing (17)
  • apps/desktop/src/main/services/chat/agentChatService.test.ts
  • apps/desktop/src/main/services/cto/ctoState.test.ts
  • apps/desktop/src/main/services/cto/ctoStateService.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.tsx
  • apps/desktop/src/renderer/components/cto/CtoPage.tsx
  • apps/desktop/src/renderer/components/cto/CtoSettingsPanel.tsx
  • apps/desktop/src/renderer/components/cto/ctoUi.test.tsx
  • apps/desktop/src/renderer/components/cto/useCtoModelOptions.ts
  • apps/ios/ADE/Views/Cto/CtoIdentityEditor.swift
  • apps/ios/ADE/Views/Cto/CtoRootScreen.swift
  • apps/ios/ADE/Views/Cto/CtoSessionDestinationView.swift
  • apps/ios/ADE/Views/Cto/CtoSettingsScreen.swift
  • apps/ios/ADE/Views/Work/WorkChatSessionView.swift
  • apps/ios/ADE/Views/Work/WorkComposerTypedTriggers.swift
  • apps/ios/ADE/Views/Work/WorkSessionDestinationView.swift
💤 Files with no reviewable changes (2)
  • apps/ios/ADE/Views/Cto/CtoRootScreen.swift
  • apps/ios/ADE/Views/Cto/CtoIdentityEditor.swift

Comment thread apps/desktop/src/main/services/chat/agentChatService.test.ts
@arul28

arul28 commented Jul 12, 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: 0c56631385

ℹ️ 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/WorkChatSessionView.swift
@arul28

arul28 commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: bb8ef897df

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@arul28
arul28 merged commit 015f80d into main Jul 12, 2026
33 checks passed
@arul28
arul28 deleted the ade-110-cto branch July 12, 2026 16:23
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