Commit Graph

1356 Commits

Author SHA1 Message Date
Émile Ré
598c6b112c Add cookie_policy_url field to cookie banners
Introduce a required cookie_policy_url alongside the existing
privacy_policy_url (now optional) so banners can link directly to a
dedicated cookie policy — a compliance best practice recommended by
CNIL, ICO, and the EDPB. Existing rows are seeded from their current
privacy_policy_url value.

Both {{cookie_policy_link}} and {{privacy_policy_link}} placeholders
are supported independently in banner description translations.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 18:48:39 +04:00
Émile Ré
11f856740a Make cookie banner origin immutable after creation
Origin is a fundamental identity property of a banner tied to consent
records for a specific site. Changing it would break the audit trail
and violate GDPR consent specificity requirements.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 18:48:39 +04:00
Bryan Frimin
de1a33dc36 Fix ts type error
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-24 16:33:47 +02:00
Bryan Frimin
1cc9f011f4 Fix import order and floating promise lint errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-24 16:10:47 +02:00
Bryan Frimin
9afc2eaaa7 Track copied config ID per row instead of globally
The useCopy hook returns a single boolean, so copying one
row's configuration ID would flip every row to "Copied!".
Track the specific copied ID in state so only the clicked
row shows feedback.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-24 16:10:46 +02:00
Bryan Frimin
9e1111d576 Show SAML configuration ID in SSO settings
Users need the configuration ID to set up the Start URL in
their identity provider (e.g. Google Workspace) but it was
not visible anywhere in the UI. Add a Configuration ID column
to the SAML configuration list with click-to-copy support.

Closes #1070

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-24 16:10:46 +02:00
Bryan Frimin
976acbd114 Surface domain provisioning errors to users
When DNS verification, CAA checks, or HTTP challenge completion
fail during certificate provisioning, the error is now stored on
the custom domain record and exposed via GraphQL. The console
displays it in both the domain card and domain detail dialog so
users can diagnose configuration issues without checking logs.

Previously these failures returned an error that was only logged
server-side, leaving users with no visibility into why their
domain was stuck in a pending state.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-24 16:05:11 +02:00
Émile Ré
9fbb716b00 Constrain PostHog consent to one normal category per banner
Add a partial unique index ensuring only one category per banner can
have posthog_consent enabled. Default it to the analytics category on
banner creation, clear the previous mapping before setting a new one,
and restrict the toggle to NORMAL categories in both the service layer
and the console UI.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 17:13:12 +04:00
Émile Ré
7f1dffad80 Add PostHog consent integration and extract integration plugin system
Add PostHog opt-in/opt-out consent support mirroring the existing Google
Consent Mode integration: database column, GraphQL field, console UI
toggle, and client-side posthog-js calls.

Extract both GCM and PostHog logic from CookieBannerClient into a
ConsentIntegration plugin interface so future integrations can be added
without modifying the client core.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 17:13:12 +04:00
Émile Ré
076e0129f6 Add GCM consent type mapping to console UI
Display Google Consent Mode mappings as badges on each
category and add a checkbox selector in the edit form
so users can configure which GCM signals each category
controls.

Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-24 17:13:12 +04:00
É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