Skip to content

fix(mcp): seed new catalog entries on every onStart + integrations-first UI layout - #84

Merged
jonnyparris merged 1 commit into
mainfrom
oauth/followup-seed-and-layout
May 26, 2026
Merged

fix(mcp): seed new catalog entries on every onStart + integrations-first UI layout#84
jonnyparris merged 1 commit into
mainfrom
oauth/followup-seed-and-layout

Conversation

@jonnyparris

Copy link
Copy Markdown
Owner

Two follow-ups to #83 — the cf-portal entry wasn't showing up in the UI.

1. Catalog seed was first-run-only

/api/mcp-catalog reads from UserControl's approved_mcps SQLite table. The seed code only ran when the table was empty, so existing DOs (seeded before cf-portal was added to the catalog) never picked up the new entry.

Fix: Use INSERT OR IGNORE on every onStart, keyed by mcp_url (PRIMARY KEY). New catalog entries flow through; admin-edited / soft-deleted rows are preserved.

Verified live: the deployed catalog endpoint returned only 3 entries (browser-rendering, dodo-self, github) — cf-portal was missing despite being merged in #83. With this fix, the next request triggers an onStart pass that inserts cf-portal.

2. Integrations buried below Skills + Tools

Settings panel order was: Skills (~50 entries) → Tools (~30 entries) → Integrations. You couldn't see the OAuth catalog without scrolling past everything.

Fix: Move Integrations to the top of that section. Skills and Tools are now wrapped in collapsed <details> so they don't dominate the scroll either.

Verification

  • npm run typecheck clean
  • npx vitest run 817/817 pass
  • Seed behaviour exercised implicitly by every test that hits the catalog endpoint
  • Markup-only change for the layout, no JS touched

Bonus context: CF Access bypass

Earlier you asked about the bypass. I checked — no bypass needed. The OAuth callback (/agents/oauth/callback) is on the same origin as Dodo, so the popup inherits the user's CF_AppSession cookie when it returns from the OAuth provider. Verified with chrome-devtools by fetching the callback path from an authenticated tab — got 404 (route works, no OAuth code) instead of 302 to Access login. The existing Dodo MCP (Bypass) Access app at dodo.jonnyparris.workers.dev/mcp already proves the cookie-inheritance model; we don't need an analogous bypass for the OAuth callback path because the callback IS authenticated via the user's already-valid cookie.

beep-boop-🤖

…rst UI layout

Two follow-ups to PR #83:

1. **Catalog seed was first-run-only.** The cf-portal entry I added to
   `mcp-catalog.ts` never appeared in `/api/mcp-catalog` because the
   endpoint reads from UserControl's `approved_mcps` table, which is
   seeded once when the table is empty. Existing DOs (i.e. mine, and
   everyone else's) had been seeded back when the catalog was just
   browser-rendering + github, so the new entry never propagated.

   Fix: use `INSERT OR IGNORE` on every onStart, keyed by `mcp_url`
   (PRIMARY KEY). New catalog entries flow through; admin edits and
   soft-deletes on existing rows are preserved.

2. **Integrations buried below Skills + Tools.** Settings panel order
   was Skills (~50 entries) → Tools (~30 entries) → Integrations.
   Moved Integrations above both. Skills and Tools are now wrapped in
   collapsed `<details>` so they don't dominate the scroll.

No tests added — the seed behaviour is exercised implicitly by every
test that hits `/api/mcp-catalog` (which seeds via onStart). The UI
move is markup-only.

beep-boop-🤖
@jonnyparris
jonnyparris merged commit 1fd9cf9 into main May 26, 2026
1 check passed
@jonnyparris
jonnyparris deleted the oauth/followup-seed-and-layout branch May 26, 2026 11:46
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