refactor: type the checkout request and response#7600
Conversation
📝 WalkthroughWalkthroughThis change adds type safety to the checkout flow in PricingTable.vue by introducing a CheckoutResponse type alias derived from the OpenAPI schema. The initiateCheckout function is updated to explicitly return a Promise. The import from comfyRegistryTypes is widened to include operations alongside components. Changes
Possibly related PRs
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (8)src/**/*.vue📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{vue,ts}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/{composables,components}/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/*.{vue,ts,tsx}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/{components,composables}/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/*.{js,ts,tsx,vue}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.{ts,tsx,vue,js}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (4)📚 Learning: 2025-12-09T03:49:52.828ZApplied to files:
📚 Learning: 2025-12-09T21:40:12.361ZApplied to files:
📚 Learning: 2025-12-16T22:26:49.463ZApplied to files:
📚 Learning: 2025-12-11T12:25:15.470ZApplied to files:
🔇 Additional comments (4)
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 |
🎭 Playwright Test Results🕵🏻 No test results found ⏰ Completed at: 12/18/2025, 11:14:44 AM UTC 📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.21 MB (baseline 3.21 MB) • ⚪ 0 BMain entry bundles and manifests
Graph Workspace — 1 MB (baseline 1 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Panels & Settings — 297 kB (baseline 297 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
UI Components — 183 kB (baseline 183 kB) • ⚪ 0 BReusable component library chunks
Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Utilities & Hooks — 1.86 kB (baseline 1.86 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Vendor & Third-Party — 8.46 MB (baseline 8.46 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 3.44 MB (baseline 3.44 MB) • ⚪ 0 BBundles that do not match a named category
|
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/18/2025, 01:02:01 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
| } | ||
|
|
||
| return await response.json() | ||
| return (await response.json()) as CheckoutResponse |
There was a problem hiding this comment.
note for other reviewers: it would actually be somewhat bad to do runtime validation here if we ever believe this code is going to run on local - because it would prevent us from changing the API in a functionally backwards-compatible way (but not strictly same type) in the future.
Summary
Refactor: use openapi.yml types for the strip checkout api.
Currently the types do not include the yearly subscription tier. But will once https://github.com/Comfy-Org/comfy-api/pull/757 is merged. So will want to tie the tier types to openapi after.
Changes
┆Issue is synchronized with this Notion page by Unito