Repository navigation
Conversation
Register `qodercli` (@qoder-ai/qodercli) in the desktop and mobile agent catalogs, following the same integration pattern as recent CLI additions (Trae, Ante), plus managed hooks for rich status. Registration: - types.ts, tui-agent-config.ts: register 'qodercli' with detectCmdAliases ['qoderclicn'] for the China build, which ships the identical CLI under its own binary name. promptInjectionMode is 'flag-prompt-interactive' — `qodercli -i <text>` runs the prompt and stays in the TUI. A bare positional also stays interactive, but prints a migration banner and rides on a default the CLI has already changed once. - tui-agent-permissions.ts: YOLO via the public `--dangerously-skip-permissions`; the CLI's `--yolo` alias is hidden and not a contract to depend on. - qodercli-headless-command.ts: recognize `-p`/`--print`/`--output-format json|stream-json` as one-shot headless runs, plus qodercli's own `-o` alias and `--input-format stream-json`, so they are not mistaken for a live interactive pane. - agent-kind, telemetry-events, agent-status-types, agent-type-label, tui-agent-display-names, tui-agent-selection, skills-cli-agent-keys: standard per-agent registrations. - agent-catalog.tsx, agent-favicon-assets.ts, mobile catalogs: entries and a bundled 64x64 icon. - i18n: "Qoder CLI" added to all five locale catalogs. Terminal-title collision with Gemini: qodercli is a gemini-cli fork (fork point carries Google's Apache-2.0 headers) and kept Gemini's status glyphs, so Orca's glyph matcher claimed its panes as Gemini. The two are separated structurally, not by status wording — qodercli emits `<glyph> <title> | <status>` (one space, trailing pipe segment) where upstream emits `<glyph> <Status> (context)` (two spaces, parenthesized, no pipe). Status words are deliberately not matched: that vocabulary changed twice in three weeks upstream, and Orca must identify binaries users already have installed. The matcher lives in agent-title-core.ts as the single source of truth, and both copies of isGeminiTerminalTitle / getAgentLabel are guarded — the agent-detection barrel routes every external consumer to the core pair. A guard alone is not enough: normalizeTerminalTitle rewrites titles before storage and the tab-agent resolvers read the stored value, so it gets its own collapse branch, and the collapsed `<glyph> Qoder CLI` label is itself re-matched to keep re-normalization idempotent. Per-caller handling, since a bare `false` is wrong for each: - title-agent-identity: a qodercli title does carry explicit identity. - terminal-renderer-policy: qodercli renders on the same gemini-cli/Ink stack and needs the same DOM compat fallback, which it previously got by accident via the glyph match. - detectAgentStatusFromTitle: qodercli uses U+25B2 where Gemini uses the raised hand; anchored to the leading glyph because U+25B2 is ordinary text and an unanchored test turned any title containing it into a spurious permission state. - agent-title-decoration: strip the same glyph from displayed titles. Managed hooks: qodercli implements every event in CLAUDE_EVENTS, including PermissionRequest, and reads the same settings shape, so it reuses the already-parameterized ClaudeHookService rather than carrying its own installer. The composite covers ~/.qoder and additionally ~/.qoder-cn only when that root already exists, so a global-only install never gets a stray config dir; disagreement between roots reports 'partial'. installRemote is registered in REMOTE_MANAGED_HOOK_INSTALLERS so SSH workspaces are not silently skipped. Known limitation: launchCmd is fixed to `qodercli`, and detection discards which alias matched, so a CN-only install detects but needs the per-agent command override to launch. Same asymmetry mistral-vibe already carries. Verified with pnpm typecheck (node + cli + web), pnpm lint including the localization verifiers, pnpm test, and mobile typecheck + tests. The title-collision behavior was additionally exercised end-to-end against the real modules for the normalize -> resolve round trip, idempotence, status detection, and Gemini/OpenCode non-regression.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (43)
🚧 Files skipped from review as they are similar to previous changes (43)
📝 WalkthroughWalkthroughAdds Qoder CLI support across shared agent types, process and terminal-title detection, TUI startup, permissions, telemetry, and headless command handling. Adds global and China hook services with managed and remote installation support. Adds renderer, mobile, localization, catalog, favicon, and status mappings. Adds tests for process recognition, terminal titles, startup commands, hook aggregation, installation registration, and agent display behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
src/main/claude/hook-settings.ts (1)
30-32: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCondense the Qoder CLI explanatory comments.
Keep only the non-obvious constraint in each comment. Prefer one line.
src/main/claude/hook-settings.ts#L30-L32: reduce the service-reuse explanation to one constraint.src/main/claude/hook-settings.ts#L38-L39: reduce the CN-root condition to one line.src/main/qodercli/hook-service.ts#L9-L13: reduce the dual-root rationale to one line.src/main/qodercli/hook-service.ts#L42-L44: reduce the aggregation rationale to one line.src/main/qodercli/hook-service.ts#L79-L84: retain only the remote CN-root constraint.src/main/qodercli/hook-service.test.ts#L1-L4: remove the test-scope explanation or reduce it to one line.As per coding guidelines, comments must be concise, limited to non-obvious information, and preferably one line.
Source: Coding guidelines
src/shared/agent-title-core.ts (1)
26-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueCondense the Qoder title-format rationale.
Keep one concise comment that states Qoder’s structural title format must be checked before Gemini’s glyph rule. Move version-history and extended format comparisons to tests or commit context.
As per coding guidelines, “Comments must be concise, limited to non-obvious information, and preferably one line.”
Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 75ef0775-fe24-4bcd-88b5-4b034ad3e867
⛔ Files ignored due to path filters (1)
src/shared/agent-icons/qodercli.pngis excluded by!**/*.png
📒 Files selected for processing (43)
config/tsconfig.cli.jsonmobile/src/components/mobile-agent-icon-assets.tsmobile/src/tasks/mobile-tui-agents.tssrc/main/agent-hooks/managed-agent-hook-registry.tssrc/main/agent-hooks/managed-hook-local-filesystem.test.tssrc/main/agent-hooks/remote-hook-service-installers.test.tssrc/main/agent-hooks/remote-managed-hook-installers.tssrc/main/claude/hook-settings.tssrc/main/qodercli/hook-service.test.tssrc/main/qodercli/hook-service.tssrc/renderer/src/components/terminal-pane/terminal-renderer-policy.tssrc/renderer/src/components/terminal-pane/title-agent-identity.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-favicon-assets.tssrc/renderer/src/lib/agent-status.test.tssrc/renderer/src/lib/agent-status.tssrc/renderer/src/lib/tui-agent-startup.test.tssrc/shared/agent-detection.tssrc/shared/agent-headless-command.tssrc/shared/agent-hook-types.tssrc/shared/agent-kind.tssrc/shared/agent-process-recognition.test.tssrc/shared/agent-status-types.tssrc/shared/agent-title-core.tssrc/shared/agent-title-decoration.tssrc/shared/agent-title-identity.tssrc/shared/agent-title-status.tssrc/shared/agent-type-label.tssrc/shared/qodercli-headless-command.tssrc/shared/skills-cli-agent-keys.tssrc/shared/telemetry-events.tssrc/shared/terminal-title-agent-type.test.tssrc/shared/terminal-title-agent-type.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-display-names.tssrc/shared/tui-agent-permissions.tssrc/shared/tui-agent-selection.tssrc/shared/types.ts
| installRemote: (sftp: SFTPWrapper, remoteHome: string): Promise<AgentHookInstallStatus> => | ||
| globalService.installRemote(sftp, remoteHome) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
Install hooks for remote Qoder CLI CN roots.
Line 85 always installs into the global .qoder root. A remote host that uses only .qoder-cn does not receive hooks for its active Qoder CLI configuration. Probe the remote CN root through SFTP, install cnService when it exists, aggregate the results, and add a CN-only remote test.
…upport # Conflicts: # src/shared/agent-detection.ts # src/shared/terminal-title-agent-type.ts
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
…upport Conflicts were all "both branches registered a new TUI agent" — main added `prime-agent`, this branch added `qodercli`. Kept both in every registry (TuiAgent union, headless-command matcher table, favicon/mobile icon maps, five locale catalogs) and kept both sides' tests.
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Cross-reviewed this proposal while consolidating Qoder support in #23581. The consolidated change adapts the structural title/headless detection and uses your icon asset. Cross-review also caught and added the Your contribution is credited with a |
feat: add first-class Qoder CLI support Integrate Qoder launch, identity, canonical hook status, trust and resume. Verify with captured Qoder 1.1.64 transcripts and hidden Electron sidebar checks. Builds on and cross-reviews #7502, #8611, #9655, #12910, #13311 and #15291. Co-authored-by: dalveytech-vincent <[email protected]> Co-authored-by: Eridanus117 <[email protected]> Co-authored-by: xingqingzzp-gif <[email protected]> Co-authored-by: jyang2004 <[email protected]> Co-authored-by: yunqian <[email protected]> Co-authored-by: huzhening.hzn <[email protected]>
|
Superseded by merged #23581, which consolidates Qoder support with launch, canonical sidebar status, trust, and resume integration. Cross-reviewed this proposal and preserved its author in the squash commit co-author credits. Thank you for the contribution. Verification details and remaining live-Qoder limitations are documented in #23581. |
Summary
Adds Qoder CLI (
@qoder-ai/qodercli, binaryqodercli) as a supported TUI agent, with managed hooks for rich status. Follows the integration pattern of recent CLI additions (Trae, Ante).qodercli, plusqoderclicnfor the China build, which ships the identical CLI under its own binary name.flag-prompt-interactive—qodercli -i <text>runs the prompt and stays in the TUI. A bare positional also stays interactive, but prints a migration banner and rides on a default the CLI has already changed once.--dangerously-skip-permissions; the CLI's--yoloalias is.hideHelp()and not a contract to depend on.-p/--print/--output-format json|stream-json, plus qodercli's own-oalias and--input-format stream-json) are recognized so they aren't mistaken for a live interactive pane.Terminal-title collision with Gemini — the substantive part
qodercli is a gemini-cli fork (its fork-point commit still carries Google's Apache-2.0 headers) and kept Gemini's
✦/◇status glyphs, so Orca's glyph matcher claimed its panes as Gemini.They're separated structurally, not by status wording:
<glyph> <session title> | <status>— one space, trailing pipe segment<glyph>␣␣<Status> (context)— two spaces, parenthesized, no pipeStatus words are deliberately not matched: that vocabulary changed twice in three weeks upstream (arbitrary thought text, then back to three fixed words), and Orca has to identify binaries users already have installed, not just the newest build.
A guard alone was not enough.
normalizeTerminalTitlerewrites titles before storage, and the tab-agent resolvers read the stored value — so it needed its own collapse branch, and the collapsed<glyph> Qoder CLIlabel is itself re-matched to keep re-normalization idempotent (same trapGROK_COLLAPSED_WORKING_TITLE_REexists for). The matcher lives inagent-title-core.tsas a single source of truth, and both copies ofisGeminiTerminalTitle/getAgentLabelare guarded, since theagent-detectionbarrel routes external consumers to the core pair.Three callers each needed something other than a bare
false:title-agent-identity— a qodercli title does carry explicit identity.terminal-renderer-policy— qodercli renders on the same gemini-cli/Ink stack and needs the same DOM compat fallback, which it previously received by accident via the glyph match; the guard would have silently opted it into WebGL.detectAgentStatusFromTitle— qodercli uses▲where Gemini uses✋. Anchored to the leading glyph, because▲is ordinary text (deploy output, charts, log markers) and an unanchored check turned any title containing it into a spurious permission state.Managed hooks
qodercli implements every event in
CLAUDE_EVENTS(includingPermissionRequest) and reads the same settings shape, so it reuses the already-parameterizedClaudeHookServicerather than carrying its own installer. The composite manages~/.qoder, and additionally~/.qoder-cnonly when that root already exists, so a global-only install never gets a stray config dir. Disagreement between roots reports'partial'.installRemoteis registered inREMOTE_MANAGED_HOOK_INSTALLERSso SSH workspaces aren't silently skipped (the issue #7253 bug class).Screenshots
Not included — please flag if this blocks review.
This adds an agent row + icon to the picker, and changes the tab label for qodercli panes, so it is changed UI by the template's definition. I verified the behavior by executing the real title modules end-to-end rather than by running the app, so I have no honest screenshot to attach. The specific things a reviewer would want to see:
◇idle,✦working,▲awaiting confirmation.Happy to add these on request.
Testing
pnpm lint— exit 0, including all three localization verifierspnpm typecheck— exit 0 (node + cli + web)pnpm test— 47,374 passed. 6 pre-existing failures, none related:codex-app-server-client(×2, hung-server timeouts),worktree-base-directory-poller(macOS watcher),posix-command-path-lookup(zsh/Volta shim). Confirmed reproducing on a clean checkout.pnpm build— exit 0tsc --noEmitexit 0; 3390 tests passed (434 files), including the catalog-ordering and offline-icon invariantsNew coverage, focused on what would actually regress: the Gemini collision (raw + 80-char padded + collapsed forms), the storage path through
normalizeTerminalTitle, idempotent re-normalization,▲anchoring,clearWorkingIndicatorsidentity retention, headless-command recognition, process recognition for both binaries, launch-command shape, and the hook-status combination matrix.AI Review Report
This went through four rounds of adversarial review with a second agent. It found four substantive issues, three of them in code that had already been reported as verified:
isGeminiTerminalTitleandgetAgentLabel; every external consumer reaches theagent-title-core/agent-title-identitypair via theagent-detectionbarrel. The patched copy's only caller was itself.normalizeTerminalTitlebypassed the fix entirely. It rewrites titles before storage, so raw-string tests passed while the app would still have displayed Gemini. This is why the tests now assert on the stored value.▲substring test would have turned any agent's title containing▲into a spurious attention badge, feeding the sidebar count and status-tracker transitions.clearWorkingIndicatorsasymmetry — stripping✦left a bareQoder CLIthat matched nothing, losing identity where Gemini's equivalent survived via its name token.Also caught during the review: a
config/tsconfig.cli.jsonomission (that file enumerates every source file explicitly, and the newhook-service.tswasn't listed) which broke the cli typecheck, and hardcoded managed-agent counts that the newAGENT_HOOK_TARGETSentry shifted.Cross-platform: no new platform branches. Hook config paths use
homedir()+path.join; the Windows/POSIX script split isClaudeHookService's existing, already-shipped logic. Title matching is byte-identical across platforms. The remote/SSH path is explicitly covered byinstallRemote. Not exercised on Windows or Linux — the reasoning is that no new platform-specific code was introduced, not that it was tested there.Security Audit
--prompt-interactiveand quoted by the existingquoteStartupArg, so a prompt beginning with-or resembling a subcommand can't be reinterpreted as flags. No new shell interpolation.--dangerously-skip-permissionsis only ever contributed through the existing opt-in YOLO setting; the default remains manual approval.homedir()+join, never string concatenation.~/.qoder-cnis written only when it already exists — no directory is created for a CLI the user doesn't have.ClaudeHookServiceones. Worth naming: that service hardcodes its endpoint as/hook/claude, so a qodercli instance reports sourceclaude— pre-existing and shared with OpenClaude, not introduced here.Notes
launchCmdis fixed toqodercli, and detection discards which alias matched, so a CN-only install (qoderclicnpresent,qodercliabsent) is detected but needs the per-agent command override to launch. This is the same latent asymmetrymistral-vibealready carries. Threading the matched alias through detection would touch the detection result type, IPC payloads, and persisted settings — disproportionate for this shape; happy to do it if you'd prefer.qwen-codeandantigravityare also gemini-cli-lineage CLIs that Orca currently claims by the same glyph match. This PR proves the|structure is absent from qodercli's fork point; it says nothing about those two at their current versions. Neither binary was available to capture a fixture from, so the same collision may exist for them.installRemotecovers the global~/.qoderroot only. CN gating relies on a localexistsSync, which says nothing about a remote host, and it must never create~/.qoder-cnremotely. A CN-only remote host is an accepted gap.