Render submitted form answers as a list (PMS-747) #504

Merged
longjacksonle merged 1 commit from fix/PMS-747-form-answer-markdown into main 2026-08-09 18:48:21 +02:00

PMS-747 F6. Found while reproducing the reported approval confusion, not reported itself, and visible in that report's own screenshot: a ticket raised from a client's submission read "First name: David Last name: Randall Phone number: 9194047511" on a single line.

The answers were joined with plain newlines, but the SPA renders a ticket description as Markdown (src/pages/tickets.rs, PMS-309), where a single newline is not a line break. So every answer collapsed into one paragraph, and the more the form asked for the worse the ticket read for whoever had to work it.

They are now a Markdown list, one answer per line, label in bold. A textarea answer carries the client's own newlines; those become hard breaks with the continuation indented into the list item, so the client's paragraphing survives instead of collapsing the same way the answers did.

The rest of PMS-747 is SPA-side and goes out as mokosh-apps #498. This change is independent of it: the run-on description predates that PR and is fixed by this one alone.

Testing

cargo fmt --all --check, cargo clippy --all-targets, cargo test --lib (three new tests on render_answers: one line per answer, hard breaks preserved inside a multi-line answer, unanswered fields dropped and order following the form). No migration and no API shape change.

PMS-747 F6. Found while reproducing the reported approval confusion, not reported itself, and visible in that report's own screenshot: a ticket raised from a client's submission read "First name: David Last name: Randall Phone number: 9194047511" on a single line. The answers were joined with plain newlines, but the SPA renders a ticket description as Markdown (`src/pages/tickets.rs`, PMS-309), where a single newline is not a line break. So every answer collapsed into one paragraph, and the more the form asked for the worse the ticket read for whoever had to work it. They are now a Markdown list, one answer per line, label in bold. A textarea answer carries the client's own newlines; those become hard breaks with the continuation indented into the list item, so the client's paragraphing survives instead of collapsing the same way the answers did. The rest of PMS-747 is SPA-side and goes out as mokosh-apps #498. This change is independent of it: the run-on description predates that PR and is fixed by this one alone. ## Testing `cargo fmt --all --check`, `cargo clippy --all-targets`, `cargo test --lib` (three new tests on `render_answers`: one line per answer, hard breaks preserved inside a multi-line answer, unanswered fields dropped and order following the form). No migration and no API shape change.
fix(forms): render submitted answers as a list so they stop running together
Some checks failed
E2E / Playwright against staging (pull_request) Successful in 2m35s
Check / fmt + clippy + build + tests (pull_request) Successful in 2m36s
Create release / Gate (release-branch merges only) (pull_request) Successful in 2s
Create release / Create release from merged PR (pull_request) Has been skipped
Integration / integration tests (pull_request) Failing after 5m46s
95b718b25d
PMS-747 F6, found while reproducing the reported approval confusion rather than reported itself. A ticket raised from a client's submission read "First name: David Last name: Randall Phone number: 9194047511" on one line.

The answers were joined with plain newlines, but the SPA renders a ticket description as Markdown, where a single newline is not a break, so every answer collapsed into one paragraph and the more the form asked for the worse the ticket read. They are now a Markdown list, one answer per line, with the label bold.

A textarea answer carries the client's own newlines. Those become hard breaks with the continuation indented into the list item, so the client's paragraphing survives instead of collapsing the same way the answers did.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E48b8YHWYwmaKjFBy5esXp
longjacksonle scheduled this pull request to auto merge when all checks succeed 2026-08-09 18:47:15 +02:00
longjacksonle deleted branch fix/PMS-747-form-answer-markdown 2026-08-09 18:48:21 +02: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
psa-systems/mokosh-server!504
No description provided.