Skip to content

feat(native): implement MCP Use in another app flow and palette action (CN-MCP, KB-PALETTE) - #422

Merged
rynfar merged 1 commit into
nativefrom
nw/f2-mcp-palette
Nov 19, 2026
Merged

rynfar merged 1 commit into
nativefrom
nw/f2-mcp-palette

Conversation

@rynfar

@rynfar rynfar commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Summary

Implements Wave F2 Track 1 — CN-MCP (#375) and KB-PALETTE (#250):

  1. CN-MCP (todo -> done):
    • Core logic (crates/core/src/mcp/{mod,apps,gate,approval}.rs):
      • Ports mcpApps.ts (MCP_APPS 9 external targets with Gemini hidden, OTHER_MCP_APP_STEPS, mcpHandoffAction, JS-compatible encodeURIComponent, safe https: / grokbot:// link checks).
      • Ports mcpGate.ts & t3ConnectState.ts (resolveMcpGate, afterFailedCheck, isManagedTunnelActive, t3ConnectMcpUrl plain DNS validation, resolveT3ConnectTurnOn, McpCapabilities decoding).
      • Ports ConnectAgentSurface.logic.ts, ApproveAgentSurface.tsx, approve-agent.tsx, and connectMcpApproval.ts (AuthMcpClientAccess, mcpClientScopes, mcpApprovalCode, parseMcpApprovalCode, resolveMcpAccess, resolveApprovalDecision, ceilingReason, agentRedirectUrl, isLoopbackHost, /approve-agent & /connect-agent URL parsing).
    • Native GPUI views (crates/app/src/mcp/{mod,wizard,approval,tests}.rs, workspace.rs):
      • Ports UseInAnotherAppDialog.tsx: full gate screen coverage (checking, sign-in, disconnected, update, no-relay-read, error, turn-on on-host/policy, offline, open), 2-step hosted approval (mcpHostedApproval) vs 3-step access + one-use code minting (POST /api/auth/pairing-token with { label: "App sign-in", access } & 1s countdown only while live), "Set up another way", LinkedLine (peerLinks.list), and "Manage access" -> Settings -> Sharing & access.
      • Ports ApproveAgentSurface.tsx & ConnectAgentSurface.tsx: intercepts /approve-agent & /connect-agent URLs, calls POST /oauth/mcp/approval and POST /oauth/mcp/decision on connected environments, enforces 700ms arming delay + window-focus rearm, supports one-click approval, sign-in codes, level-bound codes, managed runtime-mode ceilings, safe redirect validation, and hosted browser/code handoff for unsaved relay machines (pending CN-RELAY #93).
  2. KB-PALETTE (partial -> done):
    • Wires action:use-in-another-app ("Use T3 Code in another app (MCP)") with full web search terms (mcp, connector, another app, poke, claude, chatgpt, grok, muse, instinct, openclaw, hermes) into crates/app/src/palette/mod.rs, closing the sole remaining gap in ## Commands and keys (4/4 done).
  3. Ledger (apps/native/parity/LEDGER.md):
    • Updates CN-MCP (todo -> done) and KB-PALETTE (partial -> done), formatted with vp fmt.

Upstream refs: pingdotgg/t3code#33196, pingdotgg/t3code#33600, pingdotgg/t3code#33632.

Verification (a542d92f8a51a7856a12a3b9ac35e997f44334af)

  1. vp fmt --check apps/native/parity/LEDGER.md — pass
  2. cd apps/native && node scripts/gen-theme.ts --check && node --test parity/sync.test.ts && node conformance/generate.ts --check — pass (tokens.rs up to date, 42/42 sync tests)
  3. cd apps/native && cargo test -p t3-core -p t3-client — pass (t3-client 135/135, t3-core 1666/1666, conformance 8/8)
  4. cd apps/native && T3_NATIVE_HOME=$(mktemp -d) cargo test -p t3-native --features snapshot -- mcp palette workspace — pass (23/23)
  5. cd apps/native && cargo clippy --workspace --all-targets -- -D warnings && cargo build -p t3-native — pass (0 clippy warnings)

Done with Antigravity.

@rynfar
rynfar merged commit 5d30d8e into native Nov 19, 2026
2 checks passed
@rynfar
rynfar deleted the nw/f2-mcp-palette branch November 19, 2026 07:53
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