[pull] main from oomol-lab:main - #9
Merged
Merged
Conversation
Co-authored-by: cofly-ai <chinajj@hotmail.com>
…tch (#173) ## Summary The dashboard shipped the entire catalog — every provider and every action's full input/output JSON schema — from `GET /api/providers` as one ~23 MB uncompressed blob. The client re-fetched the full catalog on every refresh (each connect, disconnect, action run, or OAuth completion), even though the catalog is generated at build time and static at runtime. Full diagnosis, measurements, and proofs: #172 - Server slims `/api/providers`: precompute a schema-free provider summary once in `createCatalogStore` and serve it. Full schemas remain available per action at `GET /api/actions/:actionId`. - Client caches the catalog: `loadRuntimeData` fetches it once; `refresh()` re-pulls only mutable data (connections, oauth configs, tokens, policy, runs), so action refresh transfers zero catalog bytes. - Action detail lazy-loads schema on selection, with loading/error states. - gzip compression scoped to `/api/*` so streaming `/mcp` transport and `/v1/proxy` pass-through are never buffered or re-encoded. - ETag on `/api/providers`: catalog is static at runtime, so body and content-derived ETag are precomputed (pure-JS hash, compatible with Cloudflare Workers build) and matching `If-None-Match` returns `304 Not Modified`. ## Benchmark Results (1,108 providers / 11,217 actions) | Metric | Before | After | Improvement | | --- | --- | --- | --- | | `/api/providers` response size | 22.89 MB | ~458 KB (gzip) | ~50x reduction | | Initial `/providers` page load transfer | 24.09 MB | ~464 KB | ~50x reduction | | Catalog refetch on action/state update | 22.89 MB | 0 bytes | 100% reduction | | Unchanged page reload | 22.89 MB | 304 Not Modified (0 bytes body) | 100% transfer saved | ## Testing - Unit tests added and passing (`src/catalog-store.test.ts`, `src/server/connect-server.test.ts`). - End-to-end load performance verified against provider catalog. closes #172 --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )