Skip to content

fix(native-chat): list the slash commands and skills a structured Claude session actually loaded - #19127

Merged
brennanb2025 merged 11 commits into
mainfrom
brennanb2025/ballyhoo
Sep 7, 2026
Merged

brennanb2025 merged 11 commits into
mainfrom
brennanb2025/ballyhoo

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​728 $\color{#cf222e}{\Huge{\mathbf{−}}}$​5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​723
Prod 24 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​394 $\color{#cf222e}{\Huge{\mathbf{−}}}$​58 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​336

The Claude Chat UI slash picker previously combined a curated command list with a disk skill scan, so it missed commands and skills loaded by the active session and could offer skills that session never loaded.

The picker now uses the session's reported catalog, including the initialization response available before the first prompt. Disk discovery enriches matching skills with descriptions and scope, and preserves their token-completion behavior when the provider has not yet classified an entry. Explicit provider classification takes precedence. An empty catalog is authoritative; an unavailable catalog preserves the existing fallback.

Idle reloads and reconnects update the mounted picker through optional metadata on the existing session stream. Reload parsing accepts the provider's command descriptors, reported terminal-only entries are excluded, and unchanged catalogs are omitted from ordinary output frames. This reuses existing initialization and subscription paths without additional command RPCs, polling, or stream opcodes.

Validation:

  • Focused provider, picker, Enter-handler, publication, reconnect, and mixed-version wire tests pass.
  • Real installed provider test confirms a project command is available before any prompt and unsupported help is absent.
  • Regression ablations reproduce the original failures when their fixes are removed.
  • Full typecheck and changed-code quality checks pass.

Grok validated hidden Electron on final commit d5a8f8f009: the real catalog contains the project command and skill before any prompt and excludes unsupported help. Enter on a selected skill completes the draft with zero history items; a second Enter invokes it successfully. Screenshots are attached in the review comments.

Final verification includes 111 integration tests, 13 real-release cross-version tests, full typecheck, changed-code quality, and 19 successful CI checks (9 skipped). The review and final readiness audit have no remaining proven in-scope findings.

Live SSH catalog QA was attempted but blocked by the dev build's missing Linux ARM64 relay package and the current local-only structured Chat launch gate. Empty-catalog and idle-reload behavior have automated coverage; native mobile/Windows/WSL and live mixed-version pairing were not exercised.

…ude session actually loaded

The chat composer's `/` menu was built from a curated five-command catalog plus a
host disk scan of skill roots. Neither is what the running session can do: the
session reports its own `/` surface, which carries this repo's `.claude/commands`,
the skills that only reach it through plugin roots, and a hide-list of commands
that mean nothing outside a terminal UI. On one local session the menu offered 6
commands and 17 skills where the session reported 62 commands and 33 skills.

Read that surface per session and let it drive the picker:

- A per-session catalog seeded from the frame that proves the session and kept
  current by every later report, exposed over a new `agentSession.commands` read.
- The report is the authority on WHICH skills exist; the disk scan stays the
  source of scope and description for the names both know about, so a skill the
  session never loaded is no longer offered and one it loaded from a root the
  scan cannot see now is.
- A host that predates the read answers `method_not_found` and the composer keeps
  its curated catalog, so mixed versions and the PTY lane are unchanged.
@coderabbitai

coderabbitai Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 68b43578-a95b-4a12-b414-70b0d2efb407

📥 Commits

Reviewing files that changed from the base of the PR and between b082dd5 and 1fa999a.

📒 Files selected for processing (11)
  • src/main/claude/claude-structured-dispatch.test.ts
  • src/main/claude/claude-structured-session-state.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-subscribers.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-subscribers.ts
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session.ts
  • src/shared/agent-session-wire.ts
  • src/shared/structured-agent-session-coalescer.ts
  • src/shared/structured-agent-session-reducer.test.ts
  • src/shared/structured-agent-session-reducer.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change replaces command revision tracking with session-reported command collections. Claude now parses and updates command catalogs, which flow through structured session events, reducer state, subscribers, RPC, and renderer state. Native chat uses reported commands and skills for autocomplete and picker construction. Empty reports remain authoritative, unknown commands remain selectable, terminal commands are filtered, and unsafe names are rejected. Tests cover catalog parsing, publication, wire propagation, renderer updates, RPC exposure, and picker behavior.

Merge Risk: ⚪ Minimal · up to 1fa99

The command catalog reaches the renderer correctly, and no actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 39 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the implementation and validation, but it does not follow the required template. It omits the required section headings, issue link, visual proof or explicit N/A, checklist co… Update the description to include all required template sections. Add a valid Linked Issue entry, provide visual proof or state N/A with a reason, complete the Testing checklist with tested platforms, provide the AI Disclosure, Review, Agen…
✅ Passed checks (3 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.
Title check ✅ Passed The title clearly and concisely describes the main change: showing the slash commands and skills loaded by a structured Claude session.
Full details: Description check

Explanation

The description explains the implementation and validation, but it does not follow the required template. It omits the required section headings, issue link, visual proof or explicit N/A, checklist confirmations, AI disclosure, boundary statement, and review notes.

Resolution

Update the description to include all required template sections. Add a valid Linked Issue entry, provide visual proof or state N/A with a reason, complete the Testing checklist with tested platforms, provide the AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections, and retain the existing implementation and validation details under the appropriate headings.

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: ac7bc37f-a285-436c-bd99-29207414af1b

📥 Commits

Reviewing files that changed from the base of the PR and between b8311d5 and d769b82.

📒 Files selected for processing (24)
  • src/main/claude/claude-slash-command-catalog.test.ts
  • src/main/claude/claude-slash-command-catalog.ts
  • src/main/claude/claude-structured-dispatch.test.ts
  • src/main/claude/claude-structured-options.test.ts
  • src/main/claude/claude-structured-session-adapter.ts
  • src/main/claude/claude-structured-session-publication.ts
  • src/main/claude/claude-structured-session-state.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter-router.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/runtime/rpc/methods/structured-agent-session.ts
  • src/main/runtime/runtime-rpc/runtime-rpc-mobile-method-allowlist.ts
  • src/renderer/src/components/native-chat/NativeChatComposer.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/native-chat-composer-state.test.ts
  • src/renderer/src/components/native-chat/native-chat-composer-state.ts
  • src/renderer/src/components/native-chat/native-chat-composer-types.ts
  • src/renderer/src/components/native-chat/native-chat-picker-items.ts
  • src/renderer/src/components/native-chat/use-native-chat-composer-catalog.ts
  • src/renderer/src/components/native-chat/use-native-chat-picker-state.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session.ts
  • src/shared/agent-session-wire.ts
  • src/shared/native-chat-slash-commands.test.ts
  • src/shared/native-chat-slash-commands.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 5 remain after this review.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Important

Adding the agentSession.commands RPC read breaks two surface-enumeration ratchets that CI runs, so this fails to merge as-is. Both are mechanical manifest updates — details in the inline comment.

Reviewed changes

  • Per-session command catalog — a ClaudeSlashCommandCatalog seeded from the system/init frame that proved the session and refreshed by later system/init / system/commands_changed frames, producing AgentSessionSlashCommand[].
  • New agentSession.commands read — wired through the RPC method → host → router → adapter (readCommands), mirroring agentSession.options, and added to the mobile RPC allowlist.
  • Renderer catalog switch — useNativeChatComposerCatalog drives the / menu from the session's own report when present, falling back to the curated catalog on an older host; the disk scan only enriches the skills the session actually loaded.
  • Picker merge — the report is authoritative on which skills exist: unreported scanned skills drop out, reported-but-unlocated skills render without a scope badge and sort last.
  • Tests — catalog parsing/change detection, picker merge, and suggestion merge.

Pullfrog  | Fix all ➔ | Fix 👍s ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

.filter((entry) => entry.kind === 'command')
.map((entry) => {
const description = described.get(entry.name)
return { name: entry.name, ...(description ? { description } : {}) }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Session-reported command names now flow through verbatim with no display-safety check. Skill names from the same report are gated by isTokenSafe (in mergeNativeChatSkills), but command names go straight into the picker and draft — and native-chat-picker-items.ts still says they're inserted verbatim because "the catalog is curated", which is no longer true for this path. A reported command from a plugin/.claude/commands with control or bidi characters would pass the main-side names() filter (whitespace + length only) and spoof a row. Consider routing reported command names through isTokenSafe (or isSafeDisplayCharacter) before mapping them into suggestions.

The structured method count, the mobile allowlist, and the cross-version call
table each enumerate the agentSession surface on purpose, so an additive method
has to be declared in all three rather than counted around.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues in this incremental delta — the surface-ratchet registration is complete and correct.

Reviewed changes

  • Registered agentSession.commands on all three surface ratchets — src/main/runtime/mobile-rpc-allowlist.test.ts ("exposes only the mobile structured agent-session surface"), src/main/runtime/rpc/methods/structured-agent-session.test.ts (toHaveLength(19 → 20)), and tests/e2e/cross-version-wire/cross-version-agent-session-wire.unit.test.ts (STRUCTURED_CALLS entry plus structuredHostStub().readCommands). This closes out the CI breakage from the prior review.
  • Verified mobile-rpc-allowlist.test.ts and structured-agent-session.test.ts green locally; the cross-version harness can't execute here (shallow clone carries no release tags), but the manifest entry mirrors the source method exactly.

The command-name display-sanitization concern raised on the prior review remains open and is unchanged by this commit, which is why this delta is not approved.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog

pullfrog Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

the model provider had a temporary upstream failure.

The provider refused or dropped the request mid-run — nothing in your repo or your credentials is at fault. Re-trigger Pullfrog; if it keeps happening, check the provider's status page.

provider error: {"code":502,"message":"Network connection lost.","metadata":{"error_type":"provider_unavailable"}}

Pullfrog  | Rerun failed job ➔ | View workflow run | via Pullfrog | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: dd808b8b-03b3-4ed2-ae1e-ae95560c7942

📥 Commits

Reviewing files that changed from the base of the PR and between 7911ff4 and b082dd5.

📒 Files selected for processing (19)
  • src/main/claude/claude-slash-command-catalog.test.ts
  • src/main/claude/claude-slash-command-catalog.ts
  • src/main/claude/claude-structured-session-adapter.ts
  • src/main/claude/claude-structured-session-commands.test.ts
  • src/main/claude/claude-structured-session-state.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-adapter.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-command-publication.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-host.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-subscribers.test.ts
  • src/main/native-chat/agent-session-wire/structured-agent-session-subscribers.ts
  • src/renderer/src/components/native-chat/native-chat-composer-state.test.ts
  • src/renderer/src/components/native-chat/native-chat-composer-types.ts
  • src/renderer/src/components/native-chat/use-native-chat-picker-state.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session.test.tsx
  • src/renderer/src/components/native-chat/use-structured-agent-session.ts
  • src/shared/agent-session-wire.ts
  • src/shared/structured-agent-session-coalescer.ts
  • src/shared/structured-agent-session-reducer.test.ts
  • src/shared/structured-agent-session-reducer.ts
💤 Files with no reviewable changes (1)
  • src/main/claude/claude-structured-session-state.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/renderer/src/components/native-chat/use-structured-agent-session.test.tsx
  • src/renderer/src/components/native-chat/native-chat-composer-types.ts
  • src/renderer/src/components/native-chat/use-native-chat-picker-state.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 0 remain after this review.

return replacePage(event.page, event.fence, event.handoff, event.backgroundTasks)
return {
...replacePage(event.page, event.fence, event.handoff, event.backgroundTasks),
commands: event.commands

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Preserve commands when a snapshot or reset omits the field.

The wire contract defines an omitted commands field as unchanged. This assignment replaces an existing catalog with undefined on such a frame. The picker can then leave the provider catalog and use its fallback after a snapshot or reset. Preserve state.commands when event.commands === undefined; only replace it for an array or null.

Proposed fix
-      commands: event.commands
+      commands: event.commands !== undefined ? event.commands : state.commands
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
commands: event.commands
commands: event.commands !== undefined ? event.commands : state.commands

@brennanb2025

Copy link
Copy Markdown
Contributor Author

QA evidence (Grok worker, read-only)

Head tested: b082dd574139de59c08a5b3107dc8395c107f822 (merge of catalog live-update). Identity: Orca: brennanb2025/ballyhoo on isolated profile, CDP 9333, hidden background launch. Claude CLI 2.1.261. Report: /tmp/orca-pr19127-qa.md.

Structured Claude Chat was created in a throwaway local repo. Until a completed turn, agentSession.commands had no commands property (unreported fallback). After ping/ping2, the host reported 63 entries (31 commands / 32 skills). Restarted app on this merge head then showed the same 63 rows in the real / picker.

/effort remains in the picker after the session report (CLI did not hide it). Its local description “Choose reasoning effort” is present only on the unreported fallback. Session-only skills such as /dataviz appear without a scope badge. No SSH structured-chat path (local-only launch gate). Windows/mobile UI not exercised.

Fallback (disk scan; not a catalog pass)

Project skill on disk scan

/effort with description while unreported

After session catalog

Session command list

Project skill badge + description

/dataviz no scope

/effort still listed, description gone

Clicked project command inserted

Focused unit tests: 6 files / 109 passed. Coordinator owns the final status comment. Not calling merge-safe: catalog is empty until the first completed turn, /effort loses its local description, Plugin badges never appeared, SSH structured chat was not live-tested.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

QA addendum (supersedes first-turn-gap wording)

Head: b082dd574139de59c08a5b3107dc8395c107f822. Identity: Orca: brennanb2025/ballyhoo, CDP 9333. Fresh structured Claude session; no restart between states. Report: /tmp/orca-pr19127-qa-final.md.

Pre-turn: agentSession.commands had no loaded catalog (n=0). The / picker was the usable fallback (24 rows): curated commands including /effort with “Choose reasoning effort”, planted /qa-project-slash with Project badge + description. Provider command /qa-project-cmd and scan-invisible /dataviz were absent. This is fallback-when-unreported, not a startup catalog pass.

After first hello turn, same process: RPC and picker both 63 entries. /qa-project-cmd and /dataviz appear; /qa-project-slash keeps Project enrichment; /doctor/vim stay hidden; /effort remains in the report. Unlocated session skills have no Plugin badge (intended). /reload-skills is listed, not invoked.

SSH structured launch is local-only (executionHostId === 'local'); no SSH rig. Coordinator owns the final status comment.

Pre-turn fallback

pre-turn slash

pre-turn project skill

pre-turn effort described

Post-turn catalog (no restart)

post-turn commands

post-turn project skill

post-turn dataviz

post-turn project command

post-turn effort

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Precision on pre-turn RPC: hasOwnProperty('commands') === true and Array.isArray(commands) === false means unavailable (undefined), not authoritative commands: []. The list length 0 in the probe was a local [] fallback. Source readCommands returns { commands: undefined } when unseeded; the visible 24-row picker is the documented unreported fallback. Post-turn catalog remains 63 matching rows without restart. Owned Electron/Claude/profile/demo cleaned up. /tmp/orca-pr19127-qa-final.md updated. Coordinator owns final status.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Source review and rendered QA completed at b082dd574139de59c08a5b3107dc8395c107f822.

  • Scoped fixes are pushed: authoritative empty reports no longer revive disk skills, session/runtime changes cannot retain another catalog, and idle catalog updates reach the picker through the existing session stream.
  • Same-model/effort source review loops and START/END source readiness audits found no remaining in-scope defects. No remaining proven in-scope code defects; performance checks cover unchanged-payload omission and zero catalog RPCs during transcript rerenders.
  • Final merged head: 207 focused tests passed, full typecheck and changed-code quality checks passed. CI is green, including eight test shards, wire compatibility, and Windows packaging.
  • Grok validated the hidden Electron app with a real Claude session: usable fallback before input, then the reported catalog appears without restarting; project metadata and insertion work, and terminal-only commands remain hidden. Screenshots and scenario evidence.

Provider limitation: Claude 2.1.261 supplies classified catalog metadata only when the first turn starts. Its early initialize descriptors include terminal-only commands without hide/type metadata, so the existing fallback remains until the classified report arrives. Pre-turn authoritative catalog availability is not claimed.

Live Windows/Linux/WSL/mobile and mixed-version pairing were not exercised. Direct SSH/WSL structured chat is currently gated to the PTY path; no SSH end-to-end pass is claimed. Idle reload is covered by automated tests rather than a separate provider reload demo.

Working tree is clean. PR left unmerged.

Review-session bookkeeping is incomplete: the local Orca orchestration runtime became unavailable after QA cleanup, so final QA/readiness worker settlement could not be confirmed. Reports and screenshot evidence are preserved; no worker exit is inferred from connection loss.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Resolved the conflicts with main and pushed 1fa999a5a2. Both session command catalogs and the incoming turn-activity metadata are preserved, including metadata-only publications and snapshot/reset handling; late-dispatch settlement is retained.

Independent conflict review was clean. All 96 focused tests, full typecheck, lint, formatting, and commit hooks passed. Working tree is clean; PR remains unmerged.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues in this incremental delta. The per-session slash-command catalog is now also published over the subscription stream (live updates), and that path is correct and well-covered. Approval is still held on the pre-existing sanitization-asymmetry thread on src/shared/native-chat-slash-commands.ts (session-reported command names flow verbatim while reported skill names are gated by isTokenSafe), which this delta does not touch.

Reviewed changes

  • Published the catalog over the subscription stream — AgentSessionSubscribers gained a readCommands hook and now attaches an additive commands field to snapshot/batch/reset events, detecting catalog changes by reference (ClaudeSlashCommandCatalog returns a stable array until it actually changes, so "omit when unchanged" holds).
  • Threaded commands through the reducer and coalescer — StructuredAgentSessionState.commands merges catalog-only checkpoints without disturbing transcript/submission identity, and mergeBatch preserves the field across coalesced frames.
  • Wired the adapter trigger — a message frame that changes the catalog calls session.events?.publish(), so subscribers emit the new commands even with no journal advance; the reconnect path re-sends the catalog on checkpoint.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues in this incremental delta. Seeding the catalog from the initialize control response and marking those names kindUnspecified is correct and well-covered, including a real-CLI handshake test. Approval is still held on the pre-existing sanitization-asymmetry thread on src/shared/native-chat-slash-commands.ts (session-reported command names flow verbatim while reported skill names are gated by isTokenSafe), which this delta does not touch.

Reviewed changes

  • Seeded the catalog before the first stream init — ClaudeSlashCommandCatalog now takes an initialization argument and populates commands from the SessionStart initialize response, so the picker is driven by real membership during the pre-init window instead of falling back to the curated list.
  • Added an unclassified membership state — AgentSessionSlashCommand and SlashCommandSuggestion gain an additive kindUnspecified?: true, set for control-seeded and descriptor-only reloads until a stream init with slash_commands supplies skill classification.
  • Resolved unclassified names against the disk scan — buildNativeChatPickerItems treats unclassified names that match a discovered skill as skills (with description/scope) and keeps the rest as commands, without re-reviving scanned skills the session never reported.
  • Republished classification becoming authoritative — observe now compares kindUnspecified too, so a name whose kind flips from unspecified to classified triggers a live update even when name and kind are otherwise unchanged.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

QA evidence (Grok, Electron CDP) — supersedes fallback-only report

Head tested (recorded at hidden rebuild): 4b7e13bbf54e8bb9bd35ca974076a3c115d61ac6 (pushed; production identical to 10a69b6b40 plus test-only follow-up). Identity: Orca: brennanb2025/ballyhoo-2, CDP 9342, ORCA_BACKGROUND_LAUNCH=1. Claude CLI 2.1.261. Report: /tmp/pr19127-grok-qa-final.md.

Restored the earlier unpublished session, closed it, and launched a fresh structured Claude Chat. No prompt yet: agentSession.commands was a 66-row array (kindUnspecified), including both fixture tokens pr19127-qa and pr19127-qa-skill. help was absent. Visible / picker filtered to /pr19127 showed the project command and the project skill (Project badge). This is the session catalog, not the curated fallback.

Selecting /pr19127-qa-skill and pressing Enter sent a chat/skill turn. Assistant replied PR19127_QA_SKILL_OK (not a chat-unavailable command refusal). After that turn, the same process reported 63 classified rows (31 command / 32 skill); pr19127-qa is a command and pr19127-qa-skill is a skill. Safe composer text Reply OK, do not use tools returned OK.

Before first turn

pre-turn picker

skill inserted

Skill Enter + safe text (same session)

skill enter

safe text OK

SSH (bounded attempt, not a remote catalog pass)

Throwaway Linux Docker brennan-test-ssh (linuxserver/openssh-server, 127.0.0.1:2222, demo repo with the same .claude command/skill). Host SSH login succeeded. Orca addTarget succeeded. connect failed: Relay package for linux-arm64 not found locally. Remote had no Node/Claude. Structured Chat is also gated to executionHostId === 'local'. No live remote catalog is claimed.

Not claimed: authoritative empty skill list, idle /reload-skills, mixed-version pairing, Windows/WSL/mobile UI. Original fallback evidence at b082dd5741 is preserved in the report and is superseded by this SHA.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Follow-up smoke (open-picker Enter completion)

Head: d5a8f8f009b79769a72d2160aa0b14a0a9fdcb28 (hidden rebuild). Fresh session claude_21bbc93b_f8fa_4af6_9283_0639f618a662. Pre-prompt catalog still 66 unspecified rows including both fixture tokens; help absent.

Typed /pr19127-qa-skill so the picker showed only the Project skill, then pressed Enter (keyboard, picker open, no row click). The picker closed, the composer kept /pr19127-qa-skill, and the chat stayed empty — token completion, not a command dispatch and not a sent turn.

skill highlighted

Enter completed token

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ℹ️ No new issues in this incremental delta. The merge of main into the branch is clean — the catalog implementation is byte-for-byte unchanged since the last review — and the only new change is a two-line test-fixture completion. Approval remains held on the pre-existing sanitization-asymmetry thread on src/shared/native-chat-slash-commands.ts, which this delta does not touch.

Reviewed changes

  • Merged main (2e8fa3f) into the branch — pulled in first-work-branch-rename (#19138), the packaged-browser E2E workflow, and the structured status-feed work. The overlapping structured-agent-session-host.ts resolved correctly: readCommands (PR) and now/onStatusChanged (main) are both present.
  • Completed merged journal fixtures — added the now-required lastActivityAt: () => 1 to two AgentSessionJournal mocks in src/main/agent-hooks/first-work-branch-rename.test.ts.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Review complete at d5a8f8f009b79769a72d2160aa0b14a0a9fdcb28; fixes are pushed and the PR remains unmerged.

Same-model/effort review loops and the start/end readiness audits completed with no remaining proven in-scope findings. The focused fixes preserve authoritative empty catalogs, deliver idle changes and reconnect clearing through the existing stream, parse real provider reload descriptors, and seed the catalog before the first prompt. Known skills retain Enter completion. No additional polling, command RPCs, or stream opcode was introduced. Concurrent main updates were integrated normally; CI also required two missing methods in test fixtures, with no production workaround.

Validation: regression ablations reproduced the failures; final checks passed 111 integration tests, 13 real-release cross-version tests, full typecheck, and changed-code quality. All CI checks are complete: 19 successful, 9 skipped.

Grok rebuilt hidden Electron from the final commit and verified a fresh session reports the project command and skill before any prompt, with help absent. With the skill selected in the open picker, the first Enter leaves the completed draft and zero history items; the second Enter invokes the skill successfully. The earlier click-and-send QA alone did not establish that keyboard behavior; this final check does.

First Enter completes the draft:

Completed skill draft with no submitted turn

Second Enter invokes the skill:

Successful skill invocation

Coverage limits: SSH login to the throwaway Linux host worked, but Orca connection was blocked by the dev build's missing Linux ARM64 relay package; structured Chat also currently has a local-only launch gate. No live remote-catalog pass is claimed. Empty-catalog and idle-reload behavior are covered by automated tests, not live screenshots. Native mobile/Windows/WSL and live mixed-version pairing were not exercised.

@brennanb2025
brennanb2025 merged commit bf4e270 into main Sep 7, 2026
28 checks passed
brennanb2025 pushed a commit that referenced this pull request Sep 7, 2026
Main centralised the launch gate in structured-native-chat-launch-route, where it
re-added the client-side codex+win32 refusal. Delete that blocker there instead,
so the renderer and orchestration both stop guessing; createSupport still answers.
Drops the now-unread platform input end to end.

Also dedupes two shadowed lastActivityAt keys that arrived from main in #19127 and
fail tsc; the later value already won, so behaviour is unchanged.
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 29, 2026
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Nov 13, 2026
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