Skip to content

fix: cover letters keep every paragraph - #22

Merged
coderback merged 1 commit into
mainfrom
fix/letter-paragraphs
Oct 15, 2026
Merged

coderback merged 1 commit into
mainfrom
fix/letter-paragraphs

Conversation

@coderback

Copy link
Copy Markdown
Owner

Summary

The cover-letter renderer kept only the first four paragraphs (_MAX_PARAGRAPHS = 4). When the model wrote five, which it sometimes does despite the prompt asking for exactly four, the closing paragraph was silently dropped. So was any paragraph added in the letter editor.

Every paragraph is now rendered. The letter's measured page fit from #20 (tighter spacing, then 10pt type, never trimming) keeps it to one page, as before.

Testing

  • The letter test now sends five paragraphs and expects all five on the page.
  • New PDF test: a five-paragraph, 380-word letter (the top of the prompt's range) fits on one page, with its last paragraph present.
  • The API suite passes (658), and all 53 document tests pass in the API image.

The renderer kept only the first four paragraphs, so when the model wrote
five (it sometimes does, despite the prompt) the closing paragraph was
silently dropped, as was any paragraph added in the letter editor. Every
paragraph is now rendered; the letter's measured page fit (tighter
spacing, then 10pt type) keeps it to one page, as before.
@coderback
coderback merged commit 556d5b0 into main Oct 15, 2026
4 checks passed
@coderback
coderback deleted the fix/letter-paragraphs branch October 15, 2026 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant