Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 987d769d7e
ℹ️ 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".
| const merged = Object.fromEntries(Object.entries({ ...businessSettings(business), ...input }) | ||
| .map(([key, value]) => [key, value ?? ""])); | ||
| const profile = settingsBusinessProfileSchema.parse(merged); |
There was a problem hiding this comment.
Allow partial updates when the stored country is null
For businesses created by scripts/seed.ts, ensureBusinessForUser stores country_code: null; this merge converts that value to "" and then validates the entire record with the required countryCode schema. Consequently, even an unrelated call such as { "name": "New name" } fails validation until the caller also supplies a country, contradicting the tool's partial-update contract. Validate and update only submitted fields, or otherwise preserve nullable legacy values during the merge.
Useful? React with 👍 / 👎.
Folio can now be used by assistants, scripts and external applications through authenticated MCP and HTTP APIs. Both interfaces use the same business operations, validation and invoice/payment services.
Changes
/api/mcpwith 60 tools covering customers, items, expenses, invoices, payments, recurring billing, reporting and business settings, plus PDF resources and workflow prompts./api/v1with 61 REST routes covering those operations, ordinary JSON responses, native PDF/CSV downloads and a generated OpenAPI reference at/api/v1/openapi.json.Validation
bun run typecheckandbun run lintpass.bun run test: 394 passed, one optional PostgreSQL test skipped because no test database is configured.bun run buildpasses, with the existing two Next.js file-tracing warnings.bun run test:e2e: all four browser scenarios pass, including shared API/MCP token creation, permissions, revocation and authenticated REST requests.SQLite migration, token lifecycle, cross-business isolation, HTTP/SDK protocol handling, invoice/payment workflows, real PDF rendering, CSV pagination and the nullable-country regression have automated coverage. PostgreSQL execution remains unverified locally.