fix(assistant): clearer proposal connect button + host-supplied integration icons#180
Conversation
…l requirements The proposal card rendered every integration requirement with `ProviderLogo`, whose marks are LLM model providers (anthropic, openai, …) — so integration providers (github, slack, gmail, notion, …) all fell back to a letter monogram instead of their brand icon. Add an optional `renderProviderIcon(provider)` prop, threaded AssistantDock → AssistantPanel → ProposalCard the same way `renderGraph` is, so a host can render integration marks from its own integrations catalog (the single source of truth for provider icons) while the assistant stays host-agnostic. When the prop is absent, or returns a nullish node for a provider the host doesn't recognize, the row falls back to the built-in `ProviderLogo` mark — no behaviour change for hosts that don't wire it.
This comment has been minimized.
This comment has been minimized.
…sh the card `renderProviderIcon` is an untrusted host callback invoked during render. If a host throws for a provider it doesn't recognize (e.g. indexing a catalog without guarding an unknown id), the error would unwind the whole proposal card. Compute the icon under try/catch and degrade a throw to the built-in `ProviderLogo` mark — the same containment `onConnect` already gets — so one bad provider mark can't take down the row.
🤖 AI Code Review (ensemble)
SummaryThis PR threads an optional host-supplied Issues Found1 total — 0 P1 (blocking) · 1 P2 (should fix) · 0 P3 (nice to have)
|
Problem
Two UX bugs in the workflow-proposal integration requirement rows (tangle-network/agent-dev-container#3351, items 1 & 2):
ProviderLogo, whose marks are LLM model providers.Changes
renderProviderIcon(provider)prop, threadedAssistantDock → AssistantPanel → ProposalCardthe same wayrenderGraphis, so a host can render integration marks from its own integrations catalog (the single source of truth) while the assistant stays host-agnostic. When the prop is absent, or returns a nullish node for a provider the host doesn't recognize, the row falls back to the built-inProviderLogo— no behaviour change for hosts that don't wire it.Host follow-up
platform-web will pass
renderProviderIcon(reusing its integrations-catalog icon logic) after this releases; its^0.43.xrange already allows the new version, so no dependency bump is needed there beyondpnpm update.Testing
250assistant tests pass, including two new cases for the injected-icon path and theProviderLogofallback.