Commit Graph

1226 Commits

Author SHA1 Message Date
Bryan Frimin
dcc08c42e3 Fix lint errors in SignInPage: use Relay fragment for OIDC providers
- Add blank line between import groups (import-x/order)
- Use Relay fragment in OIDCButtons to colocate field queries (relay/unused-fields)

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:45 +01:00
Bryan Frimin
f8e086a00b Address PR review feedback for OIDC sign-in pages
- Remove inline password form from SignInPage (use PasswordSignInPage)
- Extract Divider and OIDCButtons to _components folder
- Move OIDC providers into page queries instead of lazy-loaded queries
- Create useSafeContinueUrl hook for trust app using getPathPrefix
- Use safeContinueUrl.toString() for continue URL parameter
- Fix wg.Go style in IAM service Run method

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:44 +01:00
Bryan Frimin
3e4a7d3638 Add OIDC login support to compliance page
Add Google and Microsoft sign-in buttons to the trust center connect
page, matching the console sign-in experience. The backend OIDC flow
already supports flexible continue URLs, so only the GraphQL schema
and frontend needed changes.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:44 +01:00
Bryan Frimin
29b41208f3 Address PR review feedback for OIDC login
- Remove sensitive nonce values from error messages to prevent logging leaks
- Guard ticker intervals against non-positive durations in SAML domain
  verifier and garbage collector to prevent panics
- Require both client ID and client secret for Google/Microsoft OIDC
  providers to be marked as enabled
- Replace http.DefaultClient with kit/httpclient for JWKS fetching to
  ensure proper timeouts
- Fix eslint indentation in SignInPage OIDC button click handler

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:43 +01:00
Bryan Frimin
3066e7d14c Fix eslint errors in sign-in page
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:43 +01:00
Bryan Frimin
83468db034 Refactor sign-in page and IAM service lifecycle
Redesign the sign-in page to show email/password form inline
with OIDC provider buttons (with vendor icons) instead of
separate pages. Extract OIDCProvider type to its own file.

Replace errgroup with sync.WaitGroup + WithCancelCause for
graceful shutdown in IAM services. Refactor garbage collectors
to use functional options and time.Ticker instead of
time.After to avoid repeated allocations.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:43 +01:00
Bryan Frimin
23084a72a2 Add OIDC login support for Google and Microsoft providers
Implements OpenID Connect authentication flow with PKCE, JWT verification, and enterprise-only account restrictions. Adds OIDC service with JWKS caching and state management, HTTP handlers for login/callback flows, GraphQL query for available providers, and sign-in UI integration.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-23 14:17:43 +01:00
Bryan Frimin
3b5122da5e Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-21 19:16:21 +01:00
Bryan Frimin
7b320916af Add audit log feature for recording all actions
Adds audit logging that records all authorized actions performed by
users and API keys. The audit log is automatically populated whenever
the authorizer approves an action, and is queryable via GraphQL, MCP,
and CLI interfaces. Permission checks are excluded via a dry-run flag
to avoid phantom entries on page loads.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-21 19:16:19 +01:00
Bryan Frimin
190baeebed Use actual MIME type for trust center file exports
The export endpoint was hardcoding application/pdf for all trust center
files. Now the real MIME type from the stored file metadata is threaded
through the service layer and returned as a data URI, so non-PDF files
are handled correctly on the frontend. Watermarking is only applied when
the file is actually a PDF.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-20 18:01:00 +01:00
Bryan Frimin
8142637e79 Fix trust center SPA asset loading on custom domains
The base tag was only set for /trust/{slug} paths, causing asset requests on custom domains to resolve relative to the page URL instead of root, resulting in 404 fallback to index.html.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-20 18:00:56 +01:00
Bryan Frimin
fce754cff4 Fix measure category filter not applying on initial page load
When navigating back to the measures page with a ?category query parameter, the filter wasn't applied to the initial Relay query. The component state was initialized from the URL, but the Relay fragment loaded with its default category: null. Add a mount effect that triggers a refetch with the initial category parameter.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-20 11:46:52 +01:00
Bryan Frimin
19eb2f5d84 Add formal consent disclaimer when skipping confirmation email
Display a legal notice requiring the operator to certify they have
obtained verifiable prior consent (GDPR, CAN-SPAM) before bypassing
the confirmation email flow.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-20 09:54:28 +01:00
Bryan Frimin
c5589793da Allow skipping confirmation email when adding mailing list subscribers
When creating a new subscriber, operators can now check "Skip confirmation email" if they already have the recipient's consent. This creates the subscriber in confirmed status and skips sending the notification email.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-20 09:54:25 +01:00
Bryan Frimin
bedfd61168 Rename Vendor to Subprocessor in trust API surface
Rename Vendor → Subprocessor, VendorConnection → SubprocessorConnection, and VendorEdge → SubprocessorEdge across the GraphQL schema, Go resolvers, and React frontend components. Internal coredata types remain unchanged. User-facing labels in console app updated to reflect terminology change.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-20 09:52:37 +01:00
Bryan Frimin
f756b7273d Paginate findings and obligations 500 by 500
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 23:57:12 +01:00
Bryan Frimin
a7319e54a1 Paginate measures 500 by 500 instead of 100 by 100
Increase MaxCursorSize from 100 to 500 to allow larger page sizes, and set the measures list frontend query to fetch 500 items per page by default.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 23:55:50 +01:00
Bryan Frimin
a1f8f01165 Fix query loaders to reload on parameter changes
Remove !queryRef guard and add proper dependency arrays so queries
refetch when organizationId or meetingId changes.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 19:02:51 +01:00
Bryan Frimin
89882d368c Rewrite context routes to use useQueryLoader pattern
Replace loaderFromQueryLoader/loadQuery in route definitions with
useQueryLoader inside dedicated Loader components, matching the
compliance-page pattern. Use index routes instead of redirect hacks.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 19:02:51 +01:00
Bryan Frimin
e1133b1e9a Access context fields explicitly to satisfy relay/unused-fields lint
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 19:02:50 +01:00
Bryan Frimin
a9ebeef0fa Transform meetings page into context page with tabs
Add structured organization context with 5 markdown sections (Product, Architecture, Team, Processes, Customers) editable inline. Meetings are now a tab within the context page. Moved all GraphQL queries from hooks/graph/MeetingGraph.ts into colocated components following new best practices. Updated database schema, backend services, GraphQL resolvers, and MCP API to support the new context fields and structure.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 19:02:50 +01:00
Bryan Frimin
c2a1843c67 Address PR review comments
- Fix import order: react-relay before react-router
- Add parentheses around arrow function parameter
- Sync category filter with URL param changes, not just on mount

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 18:33:43 +01:00
Bryan Frimin
ad7a3ecbe9 Fix measure breadcrumb category filter
When clicking a category name in the measure detail breadcrumb, users should be taken back to the measures list with that category filtered. Previously, the breadcrumb linked to a route that wasn't read by the measures page.

Changed the breadcrumb to use a ?category search param instead of a route segment, and updated the measures page to initialize and sync its category filter from the URL. Removed the now-unused category/:categoryId route.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 18:33:41 +01:00
Sacha Al Himdani
a5dc9a13ad Fix style
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-19 14:36:30 +01:00
Sacha Al Himdani
1db8e7133e Add document archiving
Documents can be archived and unarchived. Archived documents are
read-only, excluded from the trust center, and moved to a dedicated
Archived tab in the document list.

- Add archived_at timestamp and status (ACTIVE/ARCHIVED) PG enum column
- Rename DocumentStatus → DocumentVersionStatus, introduce DocumentStatus
- Archive/unarchive mutations in GraphQL, MCP, and CLI
- Bulk archive/unarchive mutations with Active/Archived tabs in the list
- ABAC policies: write actions denied on archived docs, unarchive denied
  on active docs
- Remove control/risk mappings and reset trust center visibility on archive
- Exclude archived documents from mapping dialogs and trust center tab

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-19 14:15:54 +01:00
Bryan Frimin
a6c88c9631 Add fulltext search to measures page
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 12:36:51 +01:00
Bryan Frimin
c3be391e9d Fix DocumentList: clear selection on filter change, update connection ID, fix indentation
Addresses PR review comments: clears selected document IDs when changing
the type filter to prevent bulk actions on hidden rows, updates the Relay
connection ID when the filter changes so mutations target the correct
connection, and fixes eslint indentation violations.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 12:31:41 +01:00
Bryan Frimin
4f54241382 Add document types filtering and rename ISMS to GOVERNANCE
Adds 5 new document types (PLAN, REGISTER, RECORD, REPORT, TEMPLATE), renames ISMS to GOVERNANCE, and implements type-based filtering across GraphQL, MCP, and frontend. Includes migration, enum updates, filter implementation with SQL array support, and frontend dropdown UI with Relay refetch pattern.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 12:31:39 +01:00
Bryan Frimin
d7c120c144 Rename NONCONFORMITY to MINOR_NONCONFORMITY and add MAJOR_NONCONFORMITY
Support distinguishing between minor and major non-conformities in findings. Rename the existing NONCONFORMITY enum value to MINOR_NONCONFORMITY and add a new MAJOR_NONCONFORMITY value across all API layers (GraphQL, MCP, CLI) and the database.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 10:02:28 +01:00
Bryan Frimin
a46366fad4 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:54:35 +01:00
Bryan Frimin
82f241628c Refactor MeasuresPage to use Relay fragments
Replace the client-side grouped-by-category view (fetching 500 items)
with a flat table using server-side filtering and cursor-based
pagination. Colocate GraphQL queries, fragments, and mutations in the
component file per console CLAUDE.md conventions.

Backend changes add a category filter to the measure list endpoints
(GraphQL, MCP) and a new measureCategories field on Organization.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:54:33 +01:00
Bryan Frimin
32cc4a4f9c WIP
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:39 +01:00
Bryan Frimin
239f201a93 Restore missing useState import in AuditsPage
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:38 +01:00
Bryan Frimin
5c42d2e9ba Simplify dropzone overlay to use fixed positioning without portal
Remove createPortal and main element ref/state in favor of a simple
fixed overlay with top-12 offset. This avoids React 19 strict mode
violations around ref access during render and setState in effects.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:38 +01:00
Bryan Frimin
6eebfa11ef Use state instead of ref for main element portal target
Replace mainRef with useState to avoid accessing ref.current during
render, which is forbidden by React 19's strict ref rules.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:38 +01:00
Bryan Frimin
f89fdc02b1 Clean up main element style on unmount in AuditsPage
Add cleanup function to the useEffect that sets position: relative on
the main element, so the style is restored when the component unmounts.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:37 +01:00
Bryan Frimin
44cc650af2 Fix dragCounterRef going negative in audit list dropzone
Clamp the counter with Math.max(0, ...) and use <= 0 check to prevent
the drag overlay from getting stuck when dragLeave fires more than
dragEnter.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:37 +01:00
Bryan Frimin
e055b21bc3 Exclude header from audit dropzone overlay
Offset the fixed overlay with top-12 so the navigation bar remains
visible and unobstructed during file drag.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:37 +01:00
Bryan Frimin
d746f32903 Use window-level drag detection for audit list dropzone
The previous approach attached drag handlers to a content div that
didn't fill the viewport, making the dropzone hard to target. Now
drag detection uses window-level events with a counter for correct
nested element handling, and the full-screen overlay itself becomes
the react-dropzone drop target.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:37 +01:00
Bryan Frimin
d360725d24 Fix import order and handle GraphQL errors in upload onCompleted
- Move DialogFooter before type DialogRef to satisfy import-x/order
- Check errors argument in onCompleted callback to avoid treating
  GraphQL errors as successful uploads

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:36 +01:00
Bryan Frimin
65e3bd014b Fix ESLint violations in CreateAuditDialog
- Fix import order for DialogRef type
- Add explicit type parameter to useMutation
- Remove unnecessary parens around single arrow function arg
- Fix jsx-one-expression-per-line for MB text

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:36 +01:00
Bryan Frimin
a6d5e9b1f0 Colocate upload mutation and remove promisifyMutation usage
Move uploadAuditReportMutation into CreateAuditDialog and replace
promisifyMutation with a Promise wrapper using native Relay callbacks.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:36 +01:00
Bryan Frimin
b4a6618736 Add PDF dropzone to audit list for streamlined report upload
Enable users to drag-and-drop PDF reports onto the audit list page, which automatically opens the create-audit dialog with the file attached. The dialog chains createAudit → uploadAuditReport mutations, with graceful handling for partial failures (audit created but upload failed).

Changes:
- AuditsPage: Add dropzone with visual overlay (dashed border + icon) when dragging PDFs
- CreateAuditDialog: Accept optional file prop, show file info, chain mutations on submit
- Extract audit ID from createAudit response to pass to uploadAuditReport
- Handle upload failure with warning toast, allowing manual upload from audit detail page
- Add react-dropzone dependency to console app

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:34 +01:00
Bryan Frimin
1e5f4012f0 Add dynamic favicon for trust center using file API
Use the trust center's logo as favicon via the public file API URL,
falling back to the default favicon when no logo is configured.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:32:37 +01:00
Bryan Frimin
751d9eb1f3 Add SSR for compliance page with dynamic title and meta tags
Implement server-side rendering of trust center page `<head>` with dynamic organization name and OG meta tags. Adds generic `FileRenderer` mechanism to statichandler for dynamic file rendering, allowing the trust server to inject templated content at request time.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:32:34 +01:00
Bryan Frimin
52b4951507 Hide audit report buttons when no file attached
When an audit has no report attached, neither the View nor Request access button should be displayed. Updated the conditional rendering to wrap the entire button section with the audit.report check instead of only checking it in the nested ternary.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:20:04 +01:00
Bryan Frimin
0e0539f1f3 Replace console frontend with unified findings pages
Add FindingsPage, FindingDetailsPage, and CreateFindingDialog
supporting all finding kinds (nonconformity, observation, exception)
with filtering, sorting, and audit linking.

Remove the separate nonconformity and continual improvement pages,
routes, and graph hooks. Update sidebar navigation, routes, and
components for nullable audit framework field.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:05:33 +01:00
Sacha Al Himdani
cf1dadc0b5 Add implemented state and justification to controls
Introduce `implemented` enum (IMPLEMENTED/NOT_IMPLEMENTED) and
`not_implemented_justification` (nullable text) fields on the Control
entity across all API surfaces (GraphQL, MCP, CLI), database, frontend,
and SOA export.

The database stores implementation state as a PostgreSQL enum
`control_implementation_state`. Controls default to IMPLEMENTED during
migration. The SOA list and PDF export show implementation status
alongside applicability, with "-" for non-applicable controls.
Justification columns are renamed for clarity: "Justification for
non-applicability" and "Justification for non-implementation".

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-17 11:01:04 +01:00
Bryan Frimin
7ffb2d5e94 Add document viewer with proper 404 handling for trust center
Move document download/view to a dedicated viewer page with PDF preview,
access request flow, and a proper 404 error boundary when documents are
not found. The backend now returns NOT_FOUND instead of INTERNAL for
missing documents and reports.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 19:13:21 +01:00
Bryan Frimin
807213d384 Stop tracking generated files
Run make generate in CI lint and test jobs since generated files are
now gitignored. Also include Relay codegen for frontend apps in the
generate target.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 16:19:47 +01:00