feat: [AI-8138] /datamates picker + onboarding banner - #1051
feat: [AI-8138] /datamates picker + onboarding banner#1051ralphstodomingo wants to merge 3 commits into
Conversation
- `/datamates` TUI palette command: read-only picker listing the tenant's datamates with an active marker; selecting one wires the datamate MCP server via the shared connect core - extract `connectDatamate()` from the `datamate_manager` tool's `add` operation; the tool is now a thin formatter over it (behavior unchanged) - new fork endpoint `POST /altimate/datamate/connect` — the TUI thread has no `Instance`/`MCP` runtime (server runs in a Worker), so the picker connects through the local server, same as the existing fork endpoints - `datamate-config.ts`: config-only reads (`readWiredDatamates`) safe to import on the TUI thread; guard test asserts the picker never imports the server-only module - dismissable home-screen banner promoting `/datamates` (KV-backed, keyboard-dismissable via palette command, hidden once a datamate server is connected) - fork-feature-guard entries for registration, palette names, endpoint, and KV key Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
…servers Live TUI testing surfaced two defects: - Swapping the top-level dialog component (DialogAlert fallback while loading) re-mounts the dialog factory, which re-creates the resource and refetches in a ~200ms loop, so the picker never left "Loading". Render a single DialogSelect for every state instead, with status states as sentinel rows — same device as the skills dialog's synthetic install row. - The banner suppressed itself when any datamate MCP server existed, including a stale entry with status "failed" — the exact situation the picker fixes. Only a connected datamate server now hides the banner. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A stale `datamate` key neutralized with `enabled: false` was still
flipping the picker into gateway mode ("via extension gateway" title,
all rows checked). Skip disabled entries when computing wired state.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Closing for now — the demo was delivered on 2026-07-30, but the approach hasn't been cleared: product is revisiting datamates positioning in altimate-code (first-class citizen vs a more generic IDE↔SaaS bridge, and the intended user experience/value prop). The branch stays; this reopens if the current direction is confirmed. Status tracked on the internal ticket. |
Issue for this PR
No GitHub issue — internal ticket AI-8138 (epic AI-7523, datamates integration).
Type of change
What does this PR do?
Adds the first human-facing surface for datamates in the CLI:
/datamatespalette command — a read-only picker listing the tenant's datamates (name, description, integrations) with an active-datamate ✓ marker. Selecting one wires the datamate MCP server; its tools appear with the Altimate badge. No create/edit/delete./datamates(KV keydismissed_datamates_banner, keyboard-dismissable via a palette command, auto-hidden once any datamate server is connected).Why it's shaped this way: the TUI plugin thread has no
Instance/MCPruntime (the server runs in a Worker), so the picker cannot wire MCP in-process. The wiring core is extracted out of thedatamate_managertool'saddoperation intoconnectDatamate(), and a new fork endpointPOST /altimate/datamate/connect(same precedent asreload-datamate) lets both surfaces share it exactly — IDE-gateway detection, reconnect-vs-add,MCP.connectso enabled-state persists, stale-entry reporting. The LLM tool's outputs are unchanged.datamate-config.tsholds config-only reads safe on the TUI thread; a guard test asserts the picker never imports the server-only module.Known limitation (deliberate): in IDE-gateway mode a single
datamateserver serves every datamate, so no per-datamate ✓ is derivable from config — the dialog titles itself "(via extension gateway)". Cross-surface selection sync is a follow-up on the epic.How did you verify your code works?
datamateentry suppress it. Both fixed in the second commit; picker, ✓ marker, and banner verified visually (screenshots below).POST /altimate/datamate/connectwith a real datamate id →status: connected, 11 tools, correct remote entry (URL + 4 auth headers) written to the project's.altimate-code/altimate-code.json, andreadWiredDatamatesresolves the active id for the picker's ✓.Screenshots / recordings
Headless TUI captures (tmux) from the verified flow:
Onboarding banner on home (shown when no datamate is connected; a stale failed entry no longer suppresses it)

/datamatespicker — tenant datamates with integration footersReopened after connecting — active datamate carries the ✓, cursor lands on it

Checklist
🤖 Generated with Claude Code