Commit Graph

189 Commits

Author SHA1 Message Date
Émile Ré
1574600c72 Use fragment and add confirm
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 11:40:22 +04:00
Émile Ré
465f43d359 Refactor UX to remove useless page
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:06 +04:00
Bryan Frimin
0e701ec6e9 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-19 12:00:53 +02:00
Aurélien Sibiril
6f0e150a06 Refactor sidebar with sticky collapse button
The absolute-positioned collapse button overlapped the nav items
whenever the sidebar content exceeded the viewport. With the page now
scrolling at the document level, the overlap became permanent.

Restructure the aside as a flex column: nav list in a flex-1 region,
collapse button in a sticky bottom-0 container with a border-t
separator. The button pins to the viewport bottom while scrolling and
never overlaps the items above.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-16 15:51:45 +04:00
Aurélien Sibiril
8fb688f19c Use page-level scroll in main layout
The previous layout nested two scroll regions, sidebar and main, each
with its own scrollbar. Combined with the fixed 100vh flex container,
any child overflow (notably the sidebar nav) spilled past bg-level-0
and exposed the browser's default white background -- most visible in
dark mode as a white strip at the bottom of the viewport.

Switch to a single page-level scroll: pin the header with fixed, let
the wrapper grow with min-h-screen, and drop main's internal overflow.
The drawer becomes fixed too so it stays pinned while the page scrolls
and gets an opaque background to cover scrolled content behind it.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-16 15:51:45 +04: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
Sacha Al Himdani
58c2415275 Align risk severity across views
Use the shared getSeverity helper from @probo/helpers in SeverityBadge
so the list view displays the same labels (Low/High/Critical) and
thresholds (0/5/15) as the detail view. Also fix the RisksChart legend
and getLevel thresholds to match.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-14 16:52:19 +02:00
Sacha Al Himdani
ab5f42ad74 Redesign document approval flow
Replace the per-approver add/remove model with a quorum-based approval
system. Documents now have default approvers that are pre-populated when
requesting approval, and the publish dialog lets users adjust the list
before submitting.

Key changes:

- Add PENDING_APPROVAL document version status with dedicated transitions
- Introduce approval quorums with request/approve/reject/void lifecycle
- Add default approvers per document (stored in document_default_approvers)
  with MERGE-based upsert for efficient sync
- Add NoDuplicates validator for slice fields
- Split ALTER TYPE ADD VALUE migrations into separate files (required by
  PostgreSQL when run inside transactions)
- Use VOIDED consistently for both quorum status and decision state enums
- Expose void/approve/reject through GraphQL and MCP, with e2e tests
- Add approval management UI: publish dialog with approver selection,
  approval list with void support, and external approve/reject page

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-09 18:18:30 +02:00
Sacha Al Himdani
5fd580e995 Rename State of Applicability to Statement of Applicability
Rename the entity across the full stack: database table
(states_of_applicability → statements_of_applicability), Go model,
GraphQL types, MCP specification, CLI commands, frontend components,
routes, and display labels. Includes a migration to rename the table
and its foreign key column.

Widen sidebar from 260px to 280px to fit the longer label.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-09 13:06:06 +02:00
Émile Ré
16d4e462c8 Add list keymaps to handle backspaces
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-07 17:13:33 +04:00
Émile Ré
0f674d1980 Better handle list transformation
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-07 17:13:33 +04:00
Émile Ré
9b473b27c2 Fix invisible drag line on Safari
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-06 19:18:09 +04:00
Émile Ré
b9d7beb22c Change import for bullet list in rich editor
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-03 17:07:35 +04:00
Émile Ré
5359fe9931 Update rich editor style to be lighter and closer to printed doc
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-03 17:02:42 +04:00
Émile Ré
6d1a7c846d Add bottom padding to rich editor
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-03 17:02:42 +04:00
Émile Ré
a850b0f77c Move markdown to prosemirror parser in packages
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-03 17:02:41 +04:00
Émile Ré
3561a6e0b7 Implement markdown parsing for copy paste
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-03 17:02:41 +04:00
Sacha Al Himdani
8adf26ad20 Add in-progress state to tasks
Introduce IN_PROGRESS as a new task state between TODO and DONE across
the full stack: database enum, Go backend, GraphQL, MCP, and frontend.

The task state icon now cycles forward on click (TODO → IN_PROGRESS →
DONE → TODO), and the action dropdown provides explicit "Move to"
options for any state transition. The "All" tab supports drag-and-drop
between state sections to change a task's state.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-03 08:33:37 +02:00
Aurélien Sibiril
b396359162 Add access review frontend
Add campaign and source management pages with detail
views, bulk decision and flag controls, connector
provider dialog with OAuth/API-key/client-credentials
flows, vendor logos, shared helpers, and campaign
lifecycle UX (start, complete, cancel).

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Sacha Al Himdani
324f4ce793 Add task priority enum and rename priority to rank
The existing integer priority field represents positional ordering
within a state, not semantic importance. Rename it to rank and
introduce a new priority field with enum values URGENT, HIGH,
MEDIUM and LOW across the entire stack.

Rank is now scoped to (state, priority) so tasks are ordered
within each priority group. A generated priority_rank column
combines both fields into a single sortable integer for cursor
pagination.

Dragging a task across priority groups updates its priority
automatically based on the drop position neighbors. The backend
first moves the task to the new group then repositions it at the
target rank.

The migration defaults existing rows to MEDIUM priority and
backfills ranks per (state, priority) group.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-02 13:35:39 +02:00
Bryan Frimin
a2f0a37b7b Add UNKNOWN and NOT_IMPLEMENTED measure states
Introduce two new measure states across the full stack: database
migration, Go coredata, GraphQL schema, MCP specification, and
frontend UI (labels, badge variants, and colors).

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-02 10:59:25 +02:00
Émile Ré
821f66cc20 Review fixes
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 19:53:25 +04:00
Émile Ré
aac4d9d12e Fix mermaid rounded corners in edit mode
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:04:37 +04:00
Émile Ré
84adb5409d Make mermaid toolbar invisible in preview mode
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:04:36 +04:00
Émile Ré
9bbcba68c0 Add mermaid tiptap extension
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:04:36 +04:00
Émile Ré
8a25ca27b6 Do not display editor block placeholder when disabled
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:04:36 +04:00
Émile Ré
3d1d794a84 Fix first rendering save
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:04:36 +04:00
Émile Ré
d73263f7e8 Handle disabled editor after version publishing
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:04:35 +04:00
Émile Ré
37e17c370f Support all headings in tiptap
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:26 +04:00
Émile Ré
0a0b01fa05 Fix menu shadows
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:24 +04:00
Émile Ré
96168cbfb0 Fix listeners cleaning on unmount
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:24 +04:00
Émile Ré
f3b0842206 Fix bubble menu positioning when scrolling
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:23 +04:00
Émile Ré
62d13a1539 Handle table selection style with an overlay element
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:23 +04:00
Émile Ré
cc93378996 Split menu components for better responsibility handling
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:23 +04:00
Émile Ré
0b02171e4a Fix link menu z-index
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:23 +04:00
Émile Ré
7897871659 Refactor actions using builtin editor methods
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:23 +04:00
Émile Ré
cf5ffc319a Fix review
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:23 +04:00
Émile Ré
aef0da4c52 Refactor duplicated code
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:22 +04:00
Émile Ré
48fbca6b04 Add split cells action
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:22 +04:00
Émile Ré
935e650991 Fix style of the drop cursor
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:22 +04:00
Émile Ré
525f1e4473 Fix lit item paragraph must be full size
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:21 +04:00
Émile Ré
d0592df676 Ensure caret is always visible
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:21 +04:00
Émile Ré
67273fe1b6 Fix table dragging
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:21 +04:00
Émile Ré
48206cbc36 Add header row / column option
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:21 +04:00
Émile Ré
4840dd510d Select all column / row cells on menu trigger click
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:21 +04:00
Émile Ré
d75edca6b1 Add TableRowMenu
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:21 +04:00
Émile Ré
c89c437074 Add table column menu
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:20 +04:00
Émile Ré
9a3077b320 Fix drag
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:20 +04:00
Émile Ré
74380f78d9 Add table cell menu
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:20 +04:00
Émile Ré
70ebdd771d Add table extension
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:20 +04:00