feat(api): improve install UX clarity and expose reachability policy#9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83b0d7b415
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| fetch('/rag/install?name=' + encodeURIComponent(r.name), { headers: { accept: 'application/json' } }) | ||
| .then(res => res.ok ? res.json() : Promise.reject(new Error('install config unavailable'))) | ||
| .then(data => { | ||
| renderInstallInfo(parseInt(b.dataset.idx, 10), data); |
There was a problem hiding this comment.
Avoid rendering install info by mutable list index
The install-info panel is keyed to the transient array index (install-info-${i}), and the async /rag/install callback renders using parseInt(b.dataset.idx, 10); if a user runs a new search before an earlier request returns, the old response can populate transport/URL/note details into a different card that now occupies the same index. This introduces incorrect per-server install guidance in the UI; use a stable key (for example server name) or verify the result set hasn’t changed before updating the panel.
Useful? React with 👍 / 👎.
Summary
reachabilityPolicyto/rag/statsclaudeDesktopNoteto/rag/installfor clearer remote-vs-stdio guidance/browseinstall UX to show primary transport badge and a collapsible Claude Desktop note/rag/statsand/rag/installfieldsChanges
API (
apps/api/src/app.ts)/rag/statsresponse now includes:reachabilityPolicy(strict|loose)/rag/installresponse now includes:claudeDesktopNoteclaudeDesktopNotebehavior:streamable-http/sse): explains Connectors UI requirement caveatBrowse UI (
docs/hosting/api/browse/index.html)Remote (SSE)/Remote (Streamable HTTP)/Local (stdio))Claude Desktop notesection when presentTests (
apps/api/tests/api.test.ts)/rag/statstest now assertsreachabilityPolicy/rag/installtests now assertclaudeDesktopNotebehavior for:Docs (
docs/DEPLOYMENT.md)/rag/installemitsclaudeDesktopNotefor UI guidanceValidation
pnpm -r lintpnpm -r typecheckpnpm -r test