Repository navigation
feat(close): the schedule form takes custom curves and loans, previews, and edits in place - #524
Conversation
…s, and edits in place The schedule modal becomes `ScheduleModal`, with a method: straight-line as before; a custom curve, one amount per month of the range, spread evenly until typed into and refused until it sums to the total; and a loan, whose terms (principal, rate, draw date, day count, payment frequency and amount, interest-only, maturity, capitalized interest, the note and current-portion accounts) the server turns into the amortization table, with the entry's legs chosen by how the payment settles (accrued and paid through the bank feed, or booked by the schedule). Preview runs the server's generator without keeping it and shows the roll-forward month by month, the overlap warnings and, on an edit, what the schedule has posted and the path the change takes. Edit schedule on the panel loads the definition back from the envelope's mechanics (the facts' months and amount for a schedule stored before the definition rode the envelope) and saves it through rebuild-schedule while nothing has posted; once a month has posted the save is locked with the server's reason. The schedule rendering reads a loan as the note's balance moved by the period's interest rather than by the balance difference, which is zero for an interest-only note. All of it goes through the generated SDK (`@/lib/ledger/schedules`), against the operations live since robosystems v1.20.0. Claude-Session: https://claude.ai/code/session_01WaJSHXWM1Lnpdrf5P7wiYW
|
Change classification: normal — platform or application code changed. A normal change carries a documented automated review on this pull request before merge, in place of a second human approver. The |
|
@claude please review this PR |
|
Claude finished @jfrench9's task in 32s —— View job Review of #524: schedule form with custom curves, loans, preview and in-place edit
Verdict: the structure is sound. Please fix the render loop below before merging. Bug: custom curve can loop forever
Take method = Custom curve, with an original amount entered and no valid range. The default state has
It needs only a custom method, a typed original amount, and the end date still blank. Fix: guard on Smaller issues
Looks good
|
Summary
Phase 4 of the schedule work: the app side of what robosystems v1.20.0 shipped (custom curves, loan amortization,
preview-schedule,rebuild-schedulewith an edited definition; rs #1922, live on prod since 2026-10-22).ScheduleModalreplacesNewScheduleModal, with a method: straight-line as before; a custom curve (one amount per month of the range, spread evenly until typed into, refused until it sums to the total less salvage); a loan, whose terms (principal, rate, draw date, day count, payment frequency and amount, interest-only, maturity, capitalized interest, the note and current-portion accounts) the server turns into the amortization table, with the entry's legs set by how the payment settles (accrued and paid through the bank feed, or booked whole by the schedule).artifact.mechanics(the facts' months and usual amount for a schedule stored before the definition rode the envelope) and saves it throughrebuild-schedulewhile nothing has posted, renaming throughupdate-schedule; once a month has posted the save is locked with the server'sedit_warning.src/lib/ledger/schedules.ts, so this builds against the published client 2.31.0 and waits on no client release. The facade twins are feat(ledger): schedule facade takes custom curves, loans, preview, and an edited definition robosystems-typescript-client#295 and feat(ledger): schedule facade takes custom curves, loans, preview, and an edited definition robosystems-python-client#279, for SDK users.Acceptance from the spec, run read-only through
preview-scheduleagainst a live interest-only line of credit: the schedule reproduces the lender's billed interest to the cent on actual/360 for the closed months, states the note's balance throughout, and raises no overlap warning.Not verified in a browser: the local stack still runs the 1.19.6 image, which predates the operations.
Test plan
ScheduleModal: straight-line behaviours ported (13), custom curve (spread, mismatch refused, negative refused), loan (terms + bank legs, schedule-settled legs, draw date outside the first period refused, preview renders and clears on edit), edit (prefill + rebuild, rename, preview against the replaced schedule, posted lock, legacy fallback, loan loads back)SchedulePanel: Edit opens on the envelope's definition; no Edit without oneScheduleRendering: a loan reads the note and the interestscheduleshelpers: months, life end, even curve, mechanics narrowing, facts fallback, legs ↔ settlement🤖 Generated with Claude Code