fix: resolve duplicate sections in data-driven contract rendering #46

Merged
forgejo_admin merged 1 commit from fix-data-driven-rendering-bugs into main 2026-04-05 17:36:51 +00:00
Contributor

Summary

Fixes three rendering bugs in the data-driven contract path introduced by T6 (#37):

  • Duplicate Jersey, Communication, Rules, Commitment sections (shared block rendered for both paths)
  • Duplicate Additional Terms (config.note + custom_notes both shown)
  • Section ordering mismatch vs original template

Changes

  • Moved Communication, Rules, Commitment, Callout into the data-driven path
  • Moved Practice Schedule + Payment Schedule after static sections (correct order)
  • Wrapped old shared sections in {#if !data.config} (fallback only)
  • Added && !data.config guard to custom_notes rendering

Test Plan

  • 38/38 tests pass
  • Manual: Kiana's contract — no duplicate sections
  • Manual: Kelsie's contract — no duplicate sections
  • Manual: Standard contract (Aleiyah) — no regression

Review Checklist

  • No unrelated changes
  • Single file, targeted fix
  • Closes #37
  • Parent: westside-contracts#34
## Summary Fixes three rendering bugs in the data-driven contract path introduced by T6 (#37): - Duplicate Jersey, Communication, Rules, Commitment sections (shared block rendered for both paths) - Duplicate Additional Terms (config.note + custom_notes both shown) - Section ordering mismatch vs original template ## Changes - Moved Communication, Rules, Commitment, Callout into the data-driven path - Moved Practice Schedule + Payment Schedule after static sections (correct order) - Wrapped old shared sections in `{#if !data.config}` (fallback only) - Added `&& !data.config` guard to custom_notes rendering ## Test Plan - [x] 38/38 tests pass - [ ] Manual: Kiana's contract — no duplicate sections - [ ] Manual: Kelsie's contract — no duplicate sections - [ ] Manual: Standard contract (Aleiyah) — no regression ## Review Checklist - [x] No unrelated changes - [x] Single file, targeted fix ## Related Notes - Closes #37 - Parent: westside-contracts#34
- Move Communication, Rules of Conduct, Commitment, Callout into data-driven
  path instead of shared block (eliminates duplicates for override contracts)
- Move Practice Schedule and Payment Schedule after static sections for correct
  ordering matching original template
- Suppress custom_notes rendering when data.config exists (config.note replaces it)
- Wrap shared sections in {#if !data.config} so they only render on fallback path

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
forgejo_admin deleted branch fix-data-driven-rendering-bugs 2026-04-05 17:36:51 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ldraney/westside-contracts!46
No description provided.