Commit Graph

1125 Commits

Author SHA1 Message Date
Émile Ré
2b6f131f43 Fix PR review comments on cookie banner i18n
Address locale normalization for region-tagged values, guard
language detection for non-DOM runtimes, validate DefaultLanguage
on update, pass translated texts through the deactivation flow,
handle slug collisions in migration, add organizations FK, fix
consent migration from name-keyed to slug-keyed data, render all
template placeholders in previews, and wrap helper text for i18n.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 12:18:12 +04:00
Émile Ré
4246d4fae9 Add i18n variable hints
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 12:18:11 +04:00
Émile Ré
cd824c2c55 Add per-category translations and improve preferences panel preview
Introduce category-level name/description translations in the cookie
banner i18n flow. Seed default translations for fr/de/es on banner
creation, parse them from the stored JSON, and manage them via
react-hook-form Controllers instead of a manual ref/callback pattern.
Enhance the panel preview with category descriptions and all three
action buttons.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 12:18:11 +04:00
Émile Ré
165b9ad9d3 Add slug to cookie categories for stable consent identifiers
The category slug provides a stable, URL-safe key used as the
data-cookie-consent attribute value and consent data key, replacing
the fragile category name. This prevents breakage when categories
are renamed.

- Add slug column with unique-per-banner constraint and backfill migration
- Add Slug validator (lowercase alphanumeric + hyphens)
- Propagate slug through GraphQL schema, service layer, and snapshot
- Update console UI with slug field in create/edit forms
- Switch cookie-banner widget to use slug as consent data keys

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 12:18:10 +04:00
Émile Ré
879b6dd733 Add cookie banner translations UI
Add default language select to the settings page and a new Translations
tab with react-hook-form-based editing of banner, preferences panel,
and placeholder UI strings with live previews.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 12:18:10 +04:00
Émile Ré
72443ff32f Use full Probo logo (picto + wordmark) in cookie banner branding
Replace the picto-only SVG with the full Logo component in both the
console theme preview and the cookie-banner web component.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-22 15:49:56 +04:00
Émile Ré
680e60b6e9 Add missing relay @required directive
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-22 15:22:03 +04:00
Émile Ré
b1607d76c5 Expose showBranding as read-only GraphQL field and reflect it in theme preview
Uses the Loader + Page + Fragment pattern so the snippet page fetches
its own data instead of relying on Outlet context.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-22 15:22:02 +04:00
Émile Ré
df698b5b21 Change branding copy from "Powered by" to "Privacy by"
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-22 15:22:02 +04:00
Émile Ré
2911d98276 Add branding to cookie banner theme preview
Also fix branding spacing with proper padding-top.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-22 15:22:02 +04:00
Émile Ré
9510d91c61 Align theme preview with real themed banner styles
Fix button layout in ThemePreview to match the actual themed-banner:
wrap buttons in spans to mimic custom element wrappers (preventing
flex: 1 from stretching them), use correct padding/background/max-width,
and set explicit line-height: normal. Also clean up dead flex properties
in themed-banner styles.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-22 11:34:51 +04:00
Sacha Al Himdani
b603d04d8d Assets as document: replace snapshot with publish workflow
Remove assets from the snapshot system and replace with a publish-based
document workflow that generates versioned ProseMirror documents.

- Remove snapshot_id/source_id from asset and asset_vendor models
- Delete AssetFilter (no longer needed without snapshot filtering)
- Add PublishAssetList service, GraphQL mutation, MCP tool, CLI command,
  and n8n operation
- Add asset_list_document_id column to generated_documents table
- Generate ProseMirror documents with asset inventory tables
  (name, type, amount, data types stored, owner, vendors)
- Add AssetListDocument resolver on Organization type
- Update frontend to remove snapshot routes/params and add publish dialog
- Add e2e tests for asset publish (immediate, with approvers, reuse, RBAC)
- Add migration script for converting legacy asset snapshots to documents
- Exclude ASSETS from snapshot type lists and e2e snapshot tests
- Move generated_documents SQL to coredata methods on Datum and Asset
- Clear generated document and SOA references on soft delete and archive

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-21 19:36:17 +02:00
Émile Ré
8dfed9fff2 Fix move-cookie connection lookup with filters: []
ConnectionHandler.getConnection could not find the cookies
connection because orderBy was implicitly treated as a filter.
Add filters: [] to the @connection directive and document the
filters rule in contrib/claude/relay.md.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 14:18:33 +04:00
Émile Ré
8e420da5bc Fix cookie mutations to update Relay store
The create, delete, and move cookie mutations were not updating
the Relay store connections, so the UI only reflected changes
after a page reload. Add @connection and @appendEdge/@deleteEdge
directives, and a store updater for the move mutation.

Also document mutation store update rules in contrib/claude/relay.md.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 14:18:33 +04:00
Émile Ré
29c0d55e75 Create a db table for cookies for easiest management
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 14:18:32 +04:00
Sacha Al Himdani
8ce429507b Bump langsmith to 0.5.20 and override @langchain/classic to fix CVE
langsmith <=0.5.18 leaks streamed LLM output past redaction controls
(GHSA-rr7j-v2q5-chgv). The transitive pin via @n8n/ai-utilities held
@langchain/classic at 1.0.5 which required langsmith ^0.3.64, blocking
the upgrade. Add npm overrides for @langchain/classic (^1.0.27) and
langsmith (^0.5.19) to resolve all three langsmith advisories.

The lockfile refresh bumps eslint-plugin-react-hooks from 7.0.1 to
7.1.0 which enables the react-hooks/refs and set-state-in-effect
rules. Fix the resulting lint errors:

- PDFPreview (console + trust): read currentPage through a ref synced
  via useEffect, keeping the setState updater pure and ref access
  outside of render
- MeasuresPage: remove redundant categoryFilter state that mirrored
  urlCategory, use a ref to detect URL changes and trigger refetch
  as the single source of category refetches
- WebhooksSettingsPage: defer loadEvents via requestAnimationFrame
  to avoid synchronous setState within the effect body

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-21 11:16:53 +02:00
Sacha Al Himdani
e1148f812e Replace implemented column with CMMI maturity level
Drop the boolean implemented/not-implemented state in favor of a
mandatory CMMI maturity level enum (NONE, INITIAL, MANAGED, DEFINED,
QUANTITATIVELY_MANAGED, OPTIMIZING) stored as a Postgres enum type.

The migration backfills existing rows (NOT_IMPLEMENTED → NONE,
IMPLEMENTED → INITIAL), makes the column NOT NULL, and drops the old
implemented column and its enum type.

- maturityLevel is required on CreateControlInput and non-nullable (!)
  in the GraphQL schema
- CLI displays human-readable CMMI labels instead of raw enum tokens
- SOA table and published document use a single Maturity column in
  place of the old Implemented + Maturity columns
- Remove ControlImplementationState type and all implemented references
  across backend, frontend, CLI, MCP, n8n, and E2E tests

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-21 11:06:36 +02:00
Alejandro Juan
da91afc2a7 Add CMMI maturity level to compliance controls
Adds an optional CMMI 0-5 maturity level field to Control to support
ISO 27001 clause 9.1 effectiveness measurement and HITRUST CSF maturity
requirements. The field is nullable, framework-agnostic, and exposed
across all four API surfaces (GraphQL, MCP, CLI, n8n) plus the
generated SoA document.

Signed-off-by: Alejandro Juan <alejandrojuan@alejandrojuan.com>
2026-04-21 11:06:36 +02:00
Émile Ré
98487953b9 Fix review
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 11:40:23 +04:00
Émile Ré
937a0079fc Fix some lint error + change error handling
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 11:40:23 +04:00
Émile Ré
d3333fd137 Remove unused destructured variable and document the convention
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 11:40:22 +04:00
Émile Ré
b29f51c303 Extract inline forms from CategorySection into separate components
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 11:40:22 +04:00
Émile Ré
653b43fc81 Add moveCookieToCategory mutation
Moving a cookie between categories previously required two sequential
updateCookieCategory mutations, which was not atomic and could leave
data in an inconsistent state if the second call failed. This adds a
dedicated moveCookieToCategory mutation that performs both updates in
a single transaction.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 11:40:22 +04:00
É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é
7cd8c516b9 Add uncategorised cookie category
Replace the `required` boolean column on cookie_categories with a `kind`
enum (NORMAL, NECESSARY, UNCATEGORISED). The Necessary category remains
undeletable and always-on for consent; the new Uncategorised category is
also undeletable but users can opt out of it.

When a category is deleted, its cookies are merged into the Uncategorised
category (lazy-created for legacy banners that don't have one yet).

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-21 11:40:21 +04:00
Émile Ré
16f4fcd9da Fix type errors on cookie banner pages
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 18:07:30 +04:00
Émile Ré
7f852aebc5 Comment unused graphql field
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 18:02:26 +04:00
Émile Ré
4555d1e867 Fix missing space + hide page from sidebar
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:59:36 +04:00
Émile Ré
3ed1d5e4dd Add links to docs
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:52:17 +04:00
Émile Ré
6dc234bbe9 Fix review issues: clipboard error handling, merge conflicts, mutation error checks, and category ranking
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:07 +04:00
Émile Ré
09ddbb1f51 Replace back link with breadcrumb on NewCookieBannerPage and remove CookieBannersLayout
Move the PageHeader into CookieBannersOverviewPage directly since
the layout had only one child route left after extracting the "new"
route as a sibling, making the wrapper unnecessary.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:07 +04:00
Émile Ré
d27d36f1ae Remove additionnal code snippets
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:07 +04:00
Émile Ré
5094ff49df Add reorderCookieCategory mutation
Category reordering previously required two separate
updateCookieCategory calls to swap ranks, which was not
atomic. Replace with a single reorderCookieCategory mutation
that shifts all affected ranks in one SQL statement, and
remove the rank field from UpdateCookieCategoryInput.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:07 +04:00
Émile Ré
9511fa3bd4 Review fixes
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:06 +04:00
Émile Ré
de73199ff2 Rename useMutation destructured vars to match graphql tagged node
Replace generic names (commitMutation, commitCreate, isInFlight, etc.)
with names derived from the graphql tagged-template variable minus the
Mutation suffix. Add naming convention rule to contrib/claude/relay.md.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:06 +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
Émile Ré
a6c9b2f3a7 Remove examples on snippet page
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:05 +04:00
Émile Ré
a60f5dfa95 Fix relay/unused-fields ESLint warnings
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:05 +04:00
Émile Ré
ddc97208e5 Handle cookie banner version sync on updates
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:05 +04:00
Émile Ré
c271938525 Add cookies page + refactor relay tree
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:04 +04:00
Émile Ré
1ec8e475de Add UX for cookie banner management
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-20 17:47:04 +04:00
Sacha Al Himdani
6c5c1fa818 Remove meeting feature
Drop meetings and meeting_attendees tables, remove all meeting-related
code across GraphQL, MCP, CLI, N8N, webhooks, frontend, and e2e tests.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-20 15:37:39 +02:00
Sacha Al Himdani
55563226cb Data as document: replace snapshot with publish workflow
Mirror the SOA-to-document migration for the data list. Remove data
from the snapshot system and add a publish workflow that generates a
ProseMirror document for the full organization data inventory.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-20 14:44:00 +02:00
Bryan Frimin
82811f3b0b Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-19 12:00:53 +02:00
Bryan Frimin
0e701ec6e9 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-19 12:00:53 +02:00
Bryan Frimin
11770b4058 Add OAuth2/OpenID Connect authorization server
Implement a full OAuth2 2.0 and OpenID Connect 1.0 authorization
server with support for authorization code flow (with PKCE),
refresh token rotation, device authorization grant, dynamic
client registration, token introspection, and token revocation.

Includes database schema, coredata layer, service logic, HTTP
handlers, OIDC discovery endpoint, and JWKS publishing.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-19 12:00:53 +02:00
Aurélien Sibiril
7143944fba Use @deleteRecord on SCIM disconnect mutation
The custom updater on the SCIM disconnect mutation ran on every
response and nulled organization.scimConfiguration in the Relay store
-- including on error responses, which flipped the UI to the
"disconnected" state even when the backend had actually rejected the
delete.

Replace the updater with a @deleteRecord directive on the returned
deletedScimConfigurationId, matching the pattern already used in
SCIMConfiguration.tsx. @deleteRecord is a no-op when the returned id
is null, so error responses no longer produce a false-positive UI
update.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-16 16:27:30 +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
Sacha Al Himdani
754dac9ec6 Reject signature and approval requests for people with ended contracts
Add server-side validation in BulkRequestSignatures, RequestSignature,
and RequestApproval to load the referenced profiles and verify none
have an ended contract before proceeding. Returns ErrProfileContractEnded
if a profile's contract_end_date is in the past, surfaced as a CONFLICT
GraphQL error in all three resolvers.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-15 14:05:34 +02:00
Sacha Al Himdani
524f209df7 Filter people with ended contracts from signature request dialog
Move the paginated people query from PeopleGraph.ts into
SignatureDocumentsDialog.tsx following colocated query conventions
and pass excludeContractEnded: true to hide people whose contract has ended.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-15 14:05:34 +02:00