mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 03:47:35 +01:00
Two bugs surfaced by live authenticated testing of the loan flow: 1. Edit was silently blocked. The canonical loanSchema added the listing string fields (lender_name, loan_number, origination_date, maturity_date, preferred_terms) as `z.string().optional()`, which rejects `null`. The edit form loads a saved row whose unset columns come back as null, so client-side zodResolver validation failed and no PUT was ever sent — every loan edit was a no-op. Switched those fields to optionalText() (null-tolerant, matching loan_category_id/bitcoin_address); the dialog projection keeps its inputs non-null. Added a regression test that parses a null-heavy loaded row. 2. "Failed to get incoming offers" (column profiles_1.display_name does not exist). Three loan queries selected a bare `display_name`; the self-host profiles column is `name`. Aliased to `display_name:name` (the pattern used everywhere else), restoring the incoming-offers / offer-list / available-loan profile names. type-check, lint, 738 unit tests green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>