Skip to content

OBJ-88 — HTML renderer for documents - #34

Merged
objectgyan merged 1 commit into
mainfrom
objectgyan/obj-88-m62-html-renderer-for-documents
May 17, 2026
Merged

objectgyan merged 1 commit into
mainfrom
objectgyan/obj-88-m62-html-renderer-for-documents

Conversation

@objectgyan

Copy link
Copy Markdown
Owner

Summary

  • Implements IDocumentHtmlRenderer + DefaultDocumentHtmlRenderer with per-control HTML emitters for all v1 controls (Textbox, Number, Date, Dropdown, Checkbox, Table static+dynamic)
  • Adds paged-media CSS (@page, page-break-inside: avoid) suitable for PDF rendering
  • Adds GET /api/documents/{id}/render-html?version=N endpoint (defaults to current version when version omitted)
  • Output is deterministic and SHA-256 hash-stable for a given input

Test plan

  • Build: dotnet build — 0 warnings, 0 errors
  • Unit tests: 159 passing
  • Integration tests: 89 passing (includes 8 new RenderHtmlApiTests)
  • Validation script: scripts/validate-obj-88.ps1 exits 0
  • SHA-256 hash stable across two consecutive renders confirmed
  • tests/fixtures/obj-88-render-hash.txt checked in

Implements IDocumentHtmlRenderer with per-control HTML emitters for all v1
controls (Textbox, Number, Date, Dropdown, Checkbox, Table static+dynamic),
paged-media CSS, GET /api/documents/{id}/render-html?version=N endpoint,
deterministic SHA-256-stable output, integration tests, and validation script.
@linear-code

linear-code Bot commented May 17, 2026 •

Copy link
Copy Markdown
OBJ-88 M6.2 — HTML renderer for documents

Milestone: M6 · Wave: 2

Summary

Server-side render a document (any version) to HTML. Same renderer used by the test UI's preview and by the PDF export. Resolves dynamic tables via the M3 render context.

Acceptance

  • All v1 controls render
  • Static + dynamic tables render with identical row content
  • CSS suitable for paged media

Validation

  • DB check: integration test fixture document renders deterministically (hash-stable)
  • Live API check: GET /api/documents/{id}/render-html?version=N returns expected HTML
  • Script: scripts/validate-obj-NNN.ps1

Branch / PR

Branch from main; target main. No trailers/footer.

Review in Linear

@objectgyan
objectgyan merged commit 36c24db into main May 17, 2026
2 of 3 checks passed
objectgyan added a commit that referenced this pull request May 17, 2026
objectgyan added a commit that referenced this pull request May 17, 2026
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