Skip to content

feat(desktop): kirocrew:// URL scheme and kirocrew open to reach a session - #23197

Merged
KiroCrewCaptain merged 2 commits into
kirodotdev:mainfrom
dzcohen:feat/kirocrew-url-scheme
Oct 29, 2026
Merged

KiroCrewCaptain merged 2 commits into
kirodotdev:mainfrom
dzcohen:feat/kirocrew-url-scheme

Conversation

@dzcohen

@dzcohen dzcohen commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Another program on the machine can open the KiroCrew desktop app on a specific session with one URL, kirocrew://chat?sid=<key>.

Nothing outside the desktop app can tell it which session to show. The dashboard's /chat?sid= link works in a browser tab; open -a KiroCrew only raises the window; the one in-app route (the Crew Companion overlay's "Open session", a navigate IPC) is reachable from inside the Electron process alone. A companion app that posts to a session through /api/chat and wants to hand the user back to it ends up opening a browser tab beside the running desktop app, so the same session is open twice.

Why it matters

Every "open this in Kiro Crew" affordance outside the app wants this: a menu-bar quick-ask panel, a Slack button, a Raycast or Alfred action, a script. Without a scheme each one is stuck with the browser link, which puts the user in a second copy of the dashboard rather than the app they already have open.

Not a goal

  • Carrying a token or any credential in a deep link. The desktop window is already authenticated; a URL any program can hand to LaunchServices is not a place for a secret.
  • Deep-linking to arbitrary dashboard paths. Only the bare scheme and /chat?sid=<key> are accepted; adding a route is a deliberate allowlist change.
  • Registering the scheme for the browser-served dashboard or a remote crew. This is the desktop shell only.
  • Changing what a plain relaunch (second-instance with no link) does.

What changed (motivation → approach → change)

A kirocrew:// URL is text another program chose, so the shell treats it as untrusted: it parses the URL, accepts exactly two shapes (bare, and chat?sid=<key> with a conservative key grammar), and rebuilds the route from the parsed parts instead of copying the input. Delivery reuses the Crew Companion's origin check (hostsDashboard), so there is one definition of "the dashboard is loaded"; openSettingsPage is untouched.

A link can arrive before the dashboard can take it. The renderer tells the main process when its navigate listener exists (navigate-ready, sent once per document by the preload), and the handler holds at most one link until that ack; a new main-frame navigation re-arms the wait. The launching process's own argv is read once after the handler is installed, which is how a cold start on Windows or Linux reaches the session (macOS gets the URL through open-url).

Piece What it does
website/electron/package.json build.protocols declares kirocrew; the two new modules are packaged
website/electron/deep-link.js resolveDeepLink (parse + allowlist), deepLinkFromArgv (pick the URL off a Windows/Linux argv); no Electron import
website/electron/deep-link-handler.js the pending-link buffer and ready flag; installDeepLinks (setAsDefaultProtocolClient, failure logged and degraded, skipped in a dev run of the stock electron binary so it cannot overwrite the installer's registration; open-url on macOS); installNavigateReady (the ack and re-arm wiring)
website/electron/main.js, preload.js, crew-companion/index.js deliverDeepLink raises the main window and sends navigate through hostsDashboard(wc, base), which gains an optional base so it answers before the companion initialises; the preload sends navigate-ready
src/kiro_crew/cli_open.py, cli_parser_gateway.py, cli_help.py, cli.py, platform_compat_trust.py kirocrew open [SESSION] [--print] builds the URL with the same key grammar (fullmatch, so a trailing newline is refused like the JS side) and hands it to platform_compat_trust.open_with_default_app (macOS/Linux) or os.startfile (Windows). The shared launcher gains an optional wait_for_exit; the CLI uses it so open/xdg-open exiting non-zero (no application registered) is reported as a failure with the browser fallback named, instead of exit 0. --print writes the URL instead; the parser, help row and dispatch register the verb
docs/system-specs/modules/cli.md the command table gains the kirocrew open row

Backwards compatibility

Compatible: nothing main accepts today is rejected, renamed or removed. A plain second-instance still calls showMainWindow({ focus: true }); openSettingsPage and openDashboardSession keep their signature and behaviour; hostsDashboard's new parameter defaults to the value it read before, and open_with_default_app's new keyword defaults to today's fire-and-forget behaviour for every existing caller. New files, a new protocols key, one new CLI subcommand, one new renderer-to-main IPC message (navigate-ready) that nothing else listens for.

Removes nothing.

Tests

  • website/electron/test/deep-link.test.js: each accepted form and its exact route; the sid is re-encoded rather than copied; refusal shapes each with their reason (wrong scheme, credentials, port, fragment, settings/artifacts/unknown hosts, extra path segments, every non-sid query parameter, missing/empty/over-long/space/leading-dash/HTML-shaped sid); dot-segment normalisation stays inside the route; deepLinkFromArgv picks the last URL and answers "" for a macOS argv; package.json build.protocols names the scheme the resolver accepts.
  • website/electron/test/deep-link-handler.test.js: registration runs in a packaged app and is skipped (and logged) under process.defaultApp; a link before the ack is held; the ack flushes it exactly once; a later link replaces a held one; a bare link raises immediately; a new main-frame navigation re-arms the wait; navigate-ready counts only from the dashboard view; a cold-start argv link is held until the ack; a refused URL opens nothing and the log names the reason, not the payload; open-url only on darwin; main.js reads the launching argv once right after installing the handler and routes second-instance through it with the previous fallback.
  • website/electron/test/preload-navigate-ready.test.js: the ack is sent after the listener registers, once per document, and again for a fresh document.
  • website/electron/crew-companion/test/petOverlay.test.js: hostsDashboard answers with an explicit base before init; default behaviour unchanged.
  • test/test_reveal_in_file_manager.py: open_with_default_app never waits by default; with wait_for_exit, exit 0 is True, exit 1 or 3 is False, a still-running launcher is True, a missing launcher spawns nothing.
  • test/test_cli_open.py: URL building for a session and the bare case; refusals match the desktop resolver, including a trailing newline; macOS/Linux go through the shared launcher with wait_for_exit, a non-zero launcher exit is reported as "no application is registered", and Windows goes through os.startfile (mocked, nothing launched); CLI wiring through --print, exit 2 with a reason on a bad key, exit 1 naming the fallback when the OS cannot open; a pin that the Python slot-key pattern and scheme are byte-identical to deep-link.js.
  • Local runs on this head: website/electron npm test 2833 pass / 0 fail; pytest test/test_cli_open.py test/test_cli_help.py test/test_reveal_in_file_manager.py 50 pass; test/test_flake_pattern_ratchet.py 60 pass; isort, flake8, the black gate, mypy (--platform linux) and the brand gate clean.

Manual verification

Needs a packaged build: setAsDefaultProtocolClient is a no-op for an unbundled Electron, so the scheme can only be exercised end to end from a built .app / installer. Planned on the macOS artifact once CI produces one: (1) open "kirocrew://chat?sid=<an open slot>" with the app running lands on that session; (2) the same with the app quit launches it and lands on the session once the dashboard has mounted (held-link path); (3) open "kirocrew://chat?sid=a%20b" and open "kirocrew://evil" are refused with a log line and the window is untouched; (4) a plain relaunch still only raises the window. The Windows/Linux cold-start argv path is covered by unit tests; I cannot run the packaged binaries there.

Screenshots / video

Why no screenshot: no rendered surface changes; the dashboard is navigated to a page that already exists, and the only new user-visible text is the kirocrew open --help output.

Related Issues

Closes #23195

@dzcohen
dzcohen requested review from a team and KiroCrewCaptain as code owners October 22, 2026 21:08
@dzcohen
dzcohen requested a review from buluoray October 22, 2026 21:08
@github-actions github-actions Bot added readiness: checking Automated validation is still running fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5, fork) — ✅ PASS

Design-level review of e1d3b65fe8e8aa053eb35098fe0f30de8c25f804 via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

No design-level blocker. The URL allowlist is rebuilt from parsed parts, delivery reuses hostsDashboard, and when registration fails the app logs it and keeps starting.

Notes

  • The appShell.tsx hunk changes behaviour without saying so. A native navigate to /chat?sid= now runs dispatch(setActiveId(null)), which closes a Remote Crew pane. That also changes what the Crew Companion's existing "Open session" does, and the description's change table never mentions it. It also runs before the leave prompt, so declining the prompt still leaves the remote pane closed. Add it to the description, or move it to its own PR.
  • Nothing has been run end to end yet. The description says manual verification is "Planned on the macOS artifact once CI produces one". Cold start on Windows/Linux (the process.argv read) and Linux build.protocols (AppImage registration) have no planned check at all. Run all three before merging. If any fails, only the feature is lost, because startup and plain second-instance keep their old paths.

[DESIGN-REVIEWED] e1d3b65

Description read

[DESCRIPTION-READ] 7fbb9000442ecb0888e41f72950b714399425e17078b33520d1471c9e63c18e3

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5, fork) — ⏭️ skipped

Revision e1d3b65fe8e8aa053eb35098fe0f30de8c25f804 touches no user-facing surface (no changes under website/ or committed screenshots), so the UX review was skipped. Does not block merge.

@dzcohen
dzcohen force-pushed the feat/kirocrew-url-scheme branch from 69bcb5b to 1f24b66 Compare October 22, 2026 22:43
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5, fork) — ✅ PASS

Premise-level review of e1d3b65fe8e8aa053eb35098fe0f30de8c25f804 via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. Two notes: the PR claims the scheme in Nightly too, which the base records as unable to tell the two apps apart, and it ships an undeclared Remote Crew pane switch.

Notes

  • Item 1 — undeclared: packaging/build-desktop.sh:1603 records "a kirocrew:// URL scheme could not disambiguate the two apps (none is registered today)". build.protocols registers the scheme for Nightly as well as production. So kirocrew://chat?sid= can open whichever app the OS picks, and that comment is now stale. Subtraction: drop protocols from the Nightly build (-c.protocols=[] in its EB_ARGS) so only one app claims the scheme.
  • Item 6 — undeclared, rides along: in appShell.tsx, if (…activeId != null) dispatch(setActiveId(null)) changes what the existing Crew Companion "Open session" does over a Remote Crew pane. The description's table never lists appShell.tsx. Subtraction: move it to its own PR, or name it in the description.

What this change ships

Inventory (8 items) — 6 justified

Intent: let another program on the machine open the desktop app on a given session with one URL. This is an ADDITION.

  1. The desktop installer registers kirocrew://, for production and Nightly alike — undeclared: Nightly shares the scheme
  2. kirocrew://chat?sid=<key> opens that session in the running app; kirocrew:// raises the window — justified
  3. A link that launches the app is held until the dashboard can take it (navigate-ready ack) — justified
  4. A second launch carrying a link routes to it; a plain relaunch is unchanged — justified
  5. New kirocrew open [SESSION] [--print] CLI verb — justified
  6. Over a Remote Crew pane, any native session navigation now switches to the local Crew — undeclared, rides along
  7. open_with_default_app can wait for the launcher's exit status (opt-in) — justified
  8. hostsDashboard takes an optional base URL and is exported — justified

[FIRST-PRINCIPLES-REVIEWED] e1d3b65

Description read

[DESCRIPTION-READ] d5bdc5c6ead83e13ae2aa1c5de0063fd2f68b69988451160d2970b937e4f246d

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review (fork) — ✅ no blocking findings

Reviewed e1d3b65fe8e8aa053eb35098fe0f30de8c25f804 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] e1d3b65

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review (fork) — ✅ no blocking findings

Reviewed e1d3b65fe8e8aa053eb35098fe0f30de8c25f804 via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e1d3b65

@dzcohen
dzcohen force-pushed the feat/kirocrew-url-scheme branch from 1f24b66 to a5c9b89 Compare October 22, 2026 23:22
@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • A second OS-opener next to open_with_default_app

fixed in a5c9b89: cli_open.open_url calls platform_compat_trust.open_with_default_app(url) on macOS/Linux; os_open_command, the hand-rolled Popen and the shutil/subprocess imports are gone. Windows keeps os.startfile because the shared helper refuses Windows by design.
Clears-when met: cli_open.py's POSIX opening goes through the existing helper; one launcher, one PATH-pinning rule.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • Inventory items 3, 6, 8 (settings/artifacts routes, buildDeepLink, Settings-menu readiness)

fixed in a5c9b89 by subtraction: resolveDeepLink accepts only the bare scheme and chat?sid=; --settings/--artifact and JS buildDeepLink are deleted; openSettingsPage is back to its base body and openDashboardRoute no longer exists, so item 8 is gone.

  • Inventory item 5 (kirocrew open verb oversized)

needs-a-decision: the Goal names "another program on the machine", and the verb is the form a script or Raycast action reaches without knowing the URL grammar; dropping it is a Goal change. Maintainer call: keep kirocrew open [SESSION] [--print] (now one function over the shared launcher, no copy of the opener) or ship the scheme alone. I will follow the ruling.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • main.js:407 — Windows/Linux cold launch never reads the link

fixed in a5c9b89: deepLinks.handleArgv(process.argv) runs once right after installDeepLinks and installNavigateReady, before second-instance is registered; the held-link buffer carries it until the dashboard acks. Test: "a cold-start argv link is held until the dashboard acks" and the main.js wiring test in deep-link-handler.test.js.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • main.js:411 — did-finish-load flush races the renderer's navigate listener

fixed in a5c9b89: the did-finish-load flush is removed. The preload sends navigate-ready once per document after registering onNavigate; installNavigateReady accepts it only from the main dashboard view and flushes then; a main-frame cross-document did-start-navigation re-arms the wait. Tests in deep-link-handler.test.js and preload-navigate-ready.test.js.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • Windows/Linux cold launches discard the deep link

fixed in a5c9b89: the lock-winner branch calls deepLinks.handleArgv(process.argv) once after the handler and the ack wiring are installed, so a launching URL enters the pending buffer and is delivered on the renderer's ack.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • Pending navigation is cleared before the renderer subscribes

fixed in a5c9b89: readiness is a renderer ack (navigate-ready, sent by the preload when onNavigate registers) rather than did-finish-load plus an http(s) URL test; openDashboardRoute and its regex are deleted and delivery reuses hostsDashboard. A held link is cleared only after a delivery that happened post-ack.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • Cold start on Windows/Linux drops the link

fixed in a5c9b89: deepLinks.handleArgv(process.argv) once after the handler is created; the buffer holds it until the dashboard acks.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • openSettingsPage has a new failure path

fixed in a5c9b89: openSettingsPage is restored to its base body verbatim; the generalised openDashboardRoute no longer exists. The description's compatibility claim is now accurate.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • Manual verification is still pending

accepted-and-deferred to the packaged artifact: setAsDefaultProtocolClient is a no-op in an unbundled Electron, so the end-to-end steps listed under Manual verification run on the CI-built macOS artifact for this head; Windows/Linux cold start is covered by unit tests and I cannot run those binaries. Results will be posted as a PR comment before merge.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • --settings help text vs required TAB

fixed in a5c9b89 by subtraction: --settings and --artifact are removed with the settings/artifacts routes.

@dzcohen

dzcohen commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author
  • A refused link only logs

rebutted: a refused URL is one another program built wrong (bad sid, unknown route), not a user typo; the CLI validates before handing the URL to the OS and prints the reason, and the Companion/Slack callers hold a real slot key. Surfacing an in-dashboard notice for malformed programmatic input is a new surface outside the Goal; the log line names the reason for the integrator who needs it.

@github-actions github-actions Bot removed the readiness: action required A blocking check or review needs attention label Oct 22, 2026
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Oct 22, 2026
@dzcohen
dzcohen force-pushed the feat/kirocrew-url-scheme branch from a5c9b89 to 23c33d2 Compare October 23, 2026 00:02
@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • kirocrew open exits 0 when no app handles kirocrew://

fixed in 23c33d2: open_with_default_app gains wait_for_exit (default None keeps today's fire-and-forget for every other caller); cli_open.open_url passes 2.0 s, so /usr/bin/open's "No application knows how to open URL" and xdg-open's exit 3/4 become (False, "no application is registered for kirocrew://") and the command exits 1 with the browser fallback named. A launcher still running at the deadline counts as launched (the generic xdg-open path runs the app in the foreground). Tests: test_reveal_in_file_manager.py (default never waits; 0 -> True; 1 and 3 -> False; timeout -> True) and TestOpenUrl in test_cli_open.py.

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • Notes: _SLOT_KEY_RE.match accepts a trailing newline; cli.md has no open row

fixed in 23c33d2: _SLOT_KEY_RE.fullmatch (a trailing-newline case is in the refusal table and the cross-language pin still passes); docs/system-specs/modules/cli.md gains the kirocrew open [SESSION] [--print] row in the command table, in the same order as cli_help.

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • Packaged-only paths ship with no manual verification

fixed (dev-run half) in 23c33d2: installDeepLinks skips setAsDefaultProtocolClient when process.defaultApp is set, so npm start can no longer overwrite the installer's per-user handler on Windows; verified against Electron's app.md (path defaults to process.execPath) and browser_win.cc (HKCU Classes). Tests: registers when packaged, skips and logs under defaultApp.
accepted-and-deferred (verification half): I will run steps (1)-(4) on the macOS Build Desktop artifact for this head and post the results here before merge; I have no Windows or Linux host for a packaged run, so that half is for a maintainer with one or for the nightly. Owner: dzcohen. Due: 2026-10-24.

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • Rejected deep links still restore and focus the dashboard

rebutted (agreeing with the adjudication's downgrade): the fallthrough is the base's own plain-relaunch behaviour (showMainWindow({ focus: true })), nothing navigates, a held link is still delivered on navigateReady, and any local program can already raise the window by relaunching the binary. Threading a third return value to suppress a raise that a relaunch performs anyway is a permanent design choice for near-zero harm.

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • Item 6: kirocrew open verb oversized

needs-a-decision (unchanged from the previous head): the verb is the form a script or launcher reaches without knowing the URL grammar, and it now carries no copy of the launcher; dropping it is a Goal change. Maintainer call: keep kirocrew open [SESSION] [--print] or ship the scheme alone. I will follow the ruling.

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • Item 7: tests pin never-shipped --settings/--artifact targets

fixed in 23c33d2: test_settings_and_artifact_targets_are_gone and test_removed_target_flags_are_rejected are deleted; the description no longer calls them "removed".

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • A refused link gives the user no message

rebutted: a refused URL is one another program built wrong, not a user typo; the CLI validates the key before handing the URL to the OS and prints the reason, and the in-app callers hold real slot keys. An in-dashboard notice for malformed programmatic input is a new surface outside the Goal; the log line names the reason for the integrator.

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author
  • session help text points at the URL bar

rebutted: no CLI command lists session keys today (cli_help.py has none), so there is nothing to point to, and adding one is outside the Goal. The URL's ?sid= is the one place the key is already visible to a user; the companion app that motivates this PR passes the key programmatically.

@dzcohen

dzcohen commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Backend Tests (Windows) (7) on 23c33d2 is main's red, not this PR's: all 33 failures are test/test_sibling_list_check.py::test_a_heading_is_found_exactly_when_the_template_check_finds_it[...], the same node ids fail on feat/persist-session-trust (run 39877392687) and fix/admission-policy-seed-marker (run 39877925497) from the same hour, and this branch carries main's bytes for both test/test_sibling_list_check.py and .github/scripts/pr-description-check.sh. Tracked in #23259; fix in #23264. Waiting for that to land, then rebasing.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Oct 23, 2026
@iamwhatever
iamwhatever force-pushed the feat/kirocrew-url-scheme branch from 23c33d2 to 5e67b10 Compare October 28, 2026 06:54
Doug Cohen added 2 commits October 28, 2026 07:07
The installer registers `kirocrew://` on macOS, Windows and Linux. Two link
shapes are accepted: a bare `kirocrew://` raises the window, and
`kirocrew://chat?sid=<slot key>` opens that session. Links are parsed and
allowlisted in a pure module, delivered through the Crew Companion's existing
origin-matched readiness check, and held until the dashboard document has
mounted its `navigate` listener (the renderer acks with `navigate-ready`; a
new main-frame navigation re-arms the wait). The launching process's own
argv is read once, so a cold start on Windows or Linux opens the session too.
Builds `kirocrew://chat?sid=<key>` (or the bare scheme with no session) with
the same slot-key grammar the Electron resolver accepts, pinned by a
cross-language test, and hands it to the OS through
`platform_compat_trust.open_with_default_app` on macOS and Linux and
`os.startfile` on Windows. The shared launcher gains an optional
`wait_for_exit` so the CLI can report "no application is registered" from
`open` / `xdg-open`'s exit status instead of exiting 0; other callers keep
the fire-and-forget default. `--print` writes the URL instead of opening it.
@iamwhatever
iamwhatever force-pushed the feat/kirocrew-url-scheme branch from 5e67b10 to e1d3b65 Compare October 28, 2026 07:08
@iamwhatever

iamwhatever commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor
  • Session deep links leave the target hidden behind an active Remote Crew span=86f902ddf8d7

fixed in 11f34e1: the session branch of subscribeNativeNavigate in website/src/shell/appShell.tsx now clears instances.activeId (selects the Local pane) before applyNavIntentInMain, the same order the notification banner uses, so the leave prompt shows on the local Crew and the existing guard still decides. Tests in website/src/test/App.navLeaveGuard.test.tsx: with a Remote Crew active, /chat?sid=other makes Local active and switches the slot; a declined leave keeps the draft and the current slot. Both fail without the fix.

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Oct 28, 2026
@iamwhatever iamwhatever self-assigned this Oct 28, 2026
@iamwhatever

Copy link
Copy Markdown
Contributor

Hold at e1d3b65 for human review.

Reserved for a human. This registers a kirocrew:// OS scheme (package.json, setAsDefaultProtocolClient / open-url) that lets any local program, or a web page through the browser's protocol prompt, steer the signed-in desktop window (main.js). It also edits platform_compat_trust.open_with_default_app (L876-L916). The parser itself looks careful: it accepts two shapes and rebuilds the route from a strict sid grammar (deep-link.js). A new caller that can drive the app still needs a maintainer's sign-off.

Also open on this head:

  • A maintainer ruling on keeping kirocrew open or shipping the scheme alone. The author asked for it twice.
  • Nightly and production share an appId, and both now claim kirocrew://, so the OS may open either one. packaging/build-desktop.sh still says no scheme is registered (L1602-L1603). Drop protocols from the Nightly build, or open a linked issue.
  • Packaged end-to-end verification. The macOS results were promised before merge (due 2026-10-24) and have not been posted. Windows/Linux has no owner.

AI findings judged non-blocking

  • Design/First Principles: the description does not name the appShell.tsx Remote Crew hunk. The behaviour was answered with tests, nothing is lost, and the pane can be reselected. The description should still name it (code).

Checks are green and there is no conflict with main.

— crew-pr-reviewer (r133)

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Approved on behalf of the watch holder (bolichen). Design and First Principles pass on this head (or skipped / author override), UX skipped or pass, no conflict, no open change request.

@KiroCrewCaptain
KiroCrewCaptain merged commit da4eb1c into kirodotdev:main Oct 29, 2026
218 of 220 checks passed
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Oct 29, 2026
@ewanmakepeace

Copy link
Copy Markdown

I feel that this task is only 50% done:

  1. I confirm that I can construct a URL like kirocrew://chat?sid= using the SessionID and it works.
  2. However in the Kiro Crew UI "Copy Link" still gives me a link of form http://localhost:5476/chat/kirocrew-new-features?sid=chat-1-1791561875 - which is the old link opening the chat in the browser.

I see no user friendly way to grab the new URL?

Screenshot 2026-11-08 at 12 13 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Desktop app: a kirocrew:// URL scheme so other local apps can open a session

4 participants