Commit Graph

19 Commits

Author SHA1 Message Date
Cursor Agent
dcb7ffa945 Suppress Mermaid render error artifacts
Configure Mermaid to suppress its built-in error renderer in both
interactive UI previews and generated document HTML. Render failures now
surface through the product toast flow with a safe inline fallback instead
of leaving raw Mermaid diagnostics in the document body.

Signed-off-by: Cursor Agent <cursoragent@cursor.com>

Co-authored-by: Émile Ré <nemile.re@gmail.com>
2026-07-28 16:04:07 +02:00
Sacha Al Himdani
c635492f75 SOA as document: replace export with publish workflow
Statements of Applicability are no longer exported as one-off PDFs.
Instead, each SOA owns a persistent document that accumulates versions
over time, following the same publish/approve lifecycle as authored
documents.

Publishing without approvers publishes immediately; publishing with
approvers creates a draft pending approval via the existing quorum
system. SOAs can also store default approvers that are pre-populated in
the publish dialog.

The SOA is removed from the snapshot system — applicability statements
are now queried directly (snapshot_id IS NULL) rather than through
snapshot copies.

A standalone migration script (cmd/migrate-soa-snapshots-to-documents)
converts existing SOA snapshots into documents with proper ProseMirror
content, preserving version history and approval decisions.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-16 00:01:13 +02:00
Émile Ré
6600f415b7 Allow logo to take doc width
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-02 18:44:54 +04:00
Émile Ré
7dcfa90672 Remove arbitrary h2 sibiling page breaks
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Émile Ré
2c3261354d Add blockquote style
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Émile Ré
e71e7f1a45 Use prosemirror pkg to render document PDF
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Sacha Al Himdani
68bc8cf59a Add major.minor document versioning
Introduce a two-part version scheme (major.minor) for documents.
Drafts start at 0.1 and increment minor on each new draft. Publishing
as minor keeps the current version, publishing as major bumps to the
next major.0. Both current_published_major and current_published_minor
are tracked on the document for exact version lookups.

Signatures and approval quorums aggregate across all versions sharing
the same major number using CTE joins. Approval page mutations spread
the decision fragment so Relay updates the version row state without
requiring a page refresh.

GraphQL, MCP, and service layer expose separate publishMajor and
publishMinor mutations instead of a single mutation with a type enum.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-30 18:54:28 +02:00
Sacha Al Himdani
999171a626 Add document approval workflow
Introduce a complete approval system for document publishing. Document
versions can now require approval from selected reviewers before being
published, with automatic publishing once all approvers have approved.

- Add approval quorum and decision tables with backfill migration
- Implement request approval, approve, and reject flows with electronic
  signature support for approve decisions
- Add employee approvals page with dedicated tab and pending approvals view
- Add changelog field to publish and request approval flows
- Pre-select previous version's approvers in the publish dialog
- Show quorum approvers in document list with 100 approver hard limit
- Expose approval workflow through GraphQL, MCP, and CLI
- Remove legacy default approvers feature entirely
- Add comprehensive e2e test coverage for approval workflows

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-27 19:43:20 +01:00
Sacha Al Himdani
c98ffaeda3 Add mermaid suport
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-12 14:41:30 +01:00
Sacha Al Himdani
33dfcd26c2 Fix approvers ui
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-02-17 10:48:44 +01:00
Sacha Al Himdani
75e28627a5 Fix code blocks
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-01-05 10:45:20 +01:00
Sacha Al Himdani
da2e19e1bc Fix ordered list display in documents
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-17 14:41:19 +02:00
Sacha Al Himdani
d757c9604b Add company name and logo to documents
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-14 11:02:12 +02:00
Sacha Al Himdani
ec716e587c Remove document description and footer
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-09-30 20:32:16 +02:00
Sacha Al Himdani
07b931c66c Drop request by
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-09-26 09:24:29 +02:00
Sacha Al Himdani
533822b60d Decouple users from people
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-09-23 13:50:41 +02:00
Sacha Al Himdani
2df463c5dc Fix tables in pdf export
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-07-22 14:36:47 +02:00
Bryan Frimin
68b422e06b Fix publisher by format error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-07-03 11:58:17 +02:00
Bryan Frimin
1025bcb509 Add docgen package
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-07-03 11:37:08 +02:00