Skip to content

The shell can finally show that the handshake fired - #41

Merged
keirsalterego merged 1 commit into
identra-dev:mainfrom
keirsalterego:feat/the-handshake-says-what-it-sent
Aug 2, 2026
Merged

keirsalterego merged 1 commit into
identra-dev:mainfrom
keirsalterego:feat/the-handshake-says-what-it-sent

Conversation

@keirsalterego

Copy link
Copy Markdown
Contributor

Identra's one claim is that an agent opens already holding the project, because the facts arrive in the MCP initialize handshake rather than through a tool the agent has to choose to call. That is the only thing here a competitor cannot match by writing a better tool description.

Until now it happened entirely out of sight. The handshake is between an agent's CLI and the bus; nothing about it reached the window.

The canvas covered for that by accident — there was always something to look at. The three-column shell removed the last of it, which means the shell as it shipped is a build where the differentiator is invisible by construction. A user has no way to tell "it works" from "it silently does nothing". Neither do I.

The receipt

connect_block now returns the block and the number of facts written into it — after the near-duplicate collapse and after the byte cap stopped the loop, since counting rows read out of the store would report a number nobody received. initialize records it against the node that connected.

The sidebar reads the most recent one under the workspace name:

Sent 7 facts to Claude
2m ago

Every handshake this session is on hover.

It says sent. It has to keep saying sent.

The initialize response goes to the agent and never comes back to us. Over ACP it is not observable even in principle — the protocol does not return the server's initialize response to the client at all (#37 established this).

"Knows 7 facts" reads better and is a claim nobody measured. The rule is written into the doc comment on Handshake and on the Tauri command, where the next person to touch this will read it before they improve the wording.

Zero is shown, not hidden

That is the second test. "Connected, and there was nothing to tell it" and "has not connected" look identical to a person, and only one of them means this works. So the receipt is a count, never a flag.

Scope

The receipt lives and dies with the process. That is right, not a shortcut: it describes live sessions, and a count restored from disk would be a claim about an agent that is no longer running.

cargo fmt, clippy --all-targets, 10 test suites, tsc, bun test and the frontend build are clean.

Identra's one claim is that an agent opens already holding the project, because the facts arrive in
the MCP `initialize` handshake rather than through a tool the agent has to choose to call. That is
the only thing here a competitor cannot match by writing a better tool description, and until now
it happened entirely out of sight: the handshake is between an agent's CLI and the bus, and nothing
about it reached the window.

The canvas covered for that by accident — there was always something to look at. The three-column
shell removed the last of it, which means the shell as it shipped is a build where the
differentiator is invisible by construction. A user has no way to tell "it works" from "it silently
does nothing", and neither do I.

So the bus keeps the receipt. `connect_block` returns the block and the number of facts actually
written into it — after the near-duplicate collapse and after the byte cap stopped the loop, since
counting rows read out of the store would report a number nobody received — and `initialize`
records it against the node that connected. The sidebar reads the most recent one under the
workspace name, with every handshake this session on hover.

**It says sent, and it has to keep saying sent.** The initialize response goes to the agent and
never comes back to us. Over ACP it is not observable even in principle, because the protocol does
not return the server's initialize response to the client at all. "Knows 7 facts" reads better and
is a claim nobody measured, so the wording rule is in the doc comment on `Handshake` and on the
Tauri command, where the next person to touch this will read it.

Zero is shown rather than hidden, and that is the second test. "Connected, and there was nothing to
tell it" and "has not connected" look identical to a person, and only one of them means this works.

The receipt lives and dies with the process, which is right: it describes live sessions, and a
count restored from disk would be a claim about an agent that is not running.

cargo fmt, clippy --all-targets, 10 test suites, tsc, bun test and the frontend build are clean.
Copilot AI review requested due to automatic review settings August 2, 2026 04:04
@keirsalterego
keirsalterego merged commit a62a3d4 into identra-dev:main Aug 2, 2026
3 checks passed

Copilot AI 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.

Pull request overview

This PR makes the MCP initialize handshake observable in the desktop shell by recording how many workspace facts were sent to each connecting agent and surfacing that “receipt” in the sidebar UI.

Changes:

  • Update the MCP server handshake path to return (instructions, facts_sent) and record per-node handshake receipts in-memory.
  • Expose handshake receipts to the desktop UI via a new Tauri command and frontend API wrapper.
  • Render a “Sent N facts … / Xm ago” receipt under the workspace name, with per-session handshake history on hover.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
crates/identra-mcp/src/server.rs Return and record a “facts sent” count during initialize; add in-memory handshake receipt tracking and tests.
apps/identra-desktop/src-tauri/src/lib.rs Add a Tauri command to fetch handshake receipts from the bus and register it.
apps/identra-desktop/frontend/src/api.ts Add Handshake type and busHandshakes() invoke wrapper.
apps/identra-desktop/frontend/src/App.tsx Poll handshake receipts and display the latest receipt + hover history in the sidebar.
apps/identra-desktop/frontend/src/styles.css Add styling for the sidebar handshake receipt line.

Comment on lines +413 to +417
/// What each node was handed at `initialize`, by node id. Written once per connect.
///
/// The window has no other way to know this happened. An agent's handshake is between its CLI
/// and this server; nothing about it reaches the UI, and it is the one thing the UI most needs
/// to be able to show. So the bus keeps the receipt.
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.

2 participants