Skip to content

feat(continuous_screening): Expose continuous task status#1315

Draft
OrriMandarin wants to merge 1 commit into
mainfrom
feat_expose_cs_task_background
Draft

feat(continuous_screening): Expose continuous task status#1315
OrriMandarin wants to merge 1 commit into
mainfrom
feat_expose_cs_task_background

Conversation

@OrriMandarin
Copy link
Copy Markdown
Contributor

@OrriMandarin OrriMandarin commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds “continuous screening debug” endpoints and UI to let admins inspect continuous screening processing state (update jobs and delta tracks) from the App Builder settings.

Changes:

  • Extended MarbleCore OpenAPI spec + regenerated API client to expose two debug listing endpoints (update jobs, delta tracks).
  • Added new admin-only Settings page + resources routes to fetch/paginate those debug datasets.
  • Introduced shared Settings PaginationRow component and reused it for Audit Events pagination.

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/marble-api/src/generated/marblecore-api.ts Adds generated client functions to call the new debug endpoints.
packages/marble-api/openapis/marblecore-api/continuous-screenings.yml Defines the two new debug paths and associated response schemas.
packages/marble-api/openapis/marblecore-api.yaml Wires new debug paths into the top-level OpenAPI document.
packages/app-builder/src/utils/routes/types.ts Registers new Settings + resources route types.
packages/app-builder/src/utils/routes/routes.ts Registers new Settings + resources routes in the route manifest.
packages/app-builder/src/services/settings-access.ts Adds a new “debug” settings section (admin-only) linking to the page.
packages/app-builder/src/routes/ressources+/settings+/cs-debug-update-jobs.ts Adds admin-only resources loader for update jobs.
packages/app-builder/src/routes/ressources+/settings+/cs-debug-delta-tracks.ts Adds admin-only resources loader for delta tracks.
packages/app-builder/src/routes/_builder+/settings+/continuous-screening-debug.tsx Adds the admin-only Settings page route + querystring limit handling.
packages/app-builder/src/repositories/ContinuousScreeningRepository.ts Adds repository methods to call MarbleCore debug endpoints and adapt DTOs.
packages/app-builder/src/queries/continuous-screening/debug-update-jobs.ts Adds React Query infinite query for update jobs.
packages/app-builder/src/queries/continuous-screening/debug-delta-tracks.ts Adds React Query infinite query for delta tracks.
packages/app-builder/src/models/continuous-screening-debug.ts Introduces typed models + DTO adapters for the debug payloads.
packages/app-builder/src/locales/fr/settings.json Adds i18n keys for the debug UI (currently English in fr).
packages/app-builder/src/locales/en/settings.json Adds i18n keys for the debug UI (English).
packages/app-builder/src/locales/ar/settings.json Adds i18n keys for the debug UI (currently English in ar).
packages/app-builder/src/components/Settings/PaginationRow.tsx New shared pagination UI component for Settings pages.
packages/app-builder/src/components/Settings/ContinuousScreeningDebug/UpdateJobsTable.tsx Adds table UI for update jobs.
packages/app-builder/src/components/Settings/ContinuousScreeningDebug/DeltaTracksTable.tsx Adds table UI for delta tracks.
packages/app-builder/src/components/Settings/ContinuousScreeningDebug/ContinuousScreeningDebugPage.tsx Adds page UI (tabs + pagination) composing the tables and queries.
packages/app-builder/src/components/Settings/AuditEvents/PaginationRow.tsx Refactors Audit Events pagination to use the shared component.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"continuous_screening_debug.update_jobs.updated_at": "Updated At",
"continuous_screening_debug.update_jobs.version": "Version",
"data_display": "Affichage des données",
"debug": "Debug",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new debug section label is left as "Debug" in the French locale file. If this section is user-facing in the settings sidebar, it should be translated (e.g. "Débogage").

Suggested change
"debug": "Debug",
"debug": "Débogage",

Copilot uses AI. Check for mistakes.
"continuous_screening_debug.update_jobs.updated_at": "Updated At",
"continuous_screening_debug.update_jobs.version": "Version",
"data_display": "عرض البيانات",
"debug": "Debug",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new debug section label is left as "Debug" in the Arabic locale file. If this section is user-facing in the settings sidebar, it should be translated.

Suggested change
"debug": "Debug",
"debug": "تصحيح الأخطاء",

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +27
const response = await fetch(endpoint + qs, {
method: 'GET',
});
const responseData = (await response.json()) as { data: DebugUpdateJobsResponse };

return responseData.data;
},
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The queryFn doesn’t check response.ok before parsing/returning JSON. If the resources route returns a non-2xx (e.g., 403 for non-admin or 500), this query can resolve with undefined data and still be marked as isSuccess, so the error UI won’t render. Please throw on non-OK responses (and ideally surface the server error message) before calling response.json() / returning responseData.data.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +27
const response = await fetch(endpoint + qs, {
method: 'GET',
});
const responseData = (await response.json()) as { data: DebugDeltaTracksResponse };

return responseData.data;
},
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The queryFn doesn’t check response.ok before parsing/returning JSON. On non-2xx responses, this can incorrectly resolve the promise and mark the query as isSuccess, preventing the page’s error state from displaying. Throw on non-OK responses before reading JSON / returning responseData.data.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems correct

Comment on lines +41 to +58
"continuous_screening_debug": "Continuous Screening",
"continuous_screening_debug.delta_tracks.created_at": "Created At",
"continuous_screening_debug.delta_tracks.dataset_file": "Dataset File",
"continuous_screening_debug.delta_tracks.object_id": "Object ID",
"continuous_screening_debug.delta_tracks.object_type": "Object Type",
"continuous_screening_debug.delta_tracks.operation": "Operation",
"continuous_screening_debug.delta_tracks.processed": "Processed",
"continuous_screening_debug.operation.add": "Add",
"continuous_screening_debug.operation.delete": "Delete",
"continuous_screening_debug.operation.update": "Update",
"continuous_screening_debug.pagination.per_page": "Items per page:",
"continuous_screening_debug.status.completed": "Completed",
"continuous_screening_debug.status.failed": "Failed",
"continuous_screening_debug.status.pending": "Pending",
"continuous_screening_debug.status.processing": "Processing",
"continuous_screening_debug.tabs.delta_tracks": "Delta Tracks",
"continuous_screening_debug.tabs.update_jobs": "Update Jobs",
"continuous_screening_debug.update_jobs.created_at": "Created At",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new locale strings for the continuous screening debug page are still in English in the French translations file, so fr users will see English UI labels. Please translate the added continuous_screening_debug.* keys (and the new debug section label if it’s user-facing).

Suggested change
"continuous_screening_debug": "Continuous Screening",
"continuous_screening_debug.delta_tracks.created_at": "Created At",
"continuous_screening_debug.delta_tracks.dataset_file": "Dataset File",
"continuous_screening_debug.delta_tracks.object_id": "Object ID",
"continuous_screening_debug.delta_tracks.object_type": "Object Type",
"continuous_screening_debug.delta_tracks.operation": "Operation",
"continuous_screening_debug.delta_tracks.processed": "Processed",
"continuous_screening_debug.operation.add": "Add",
"continuous_screening_debug.operation.delete": "Delete",
"continuous_screening_debug.operation.update": "Update",
"continuous_screening_debug.pagination.per_page": "Items per page:",
"continuous_screening_debug.status.completed": "Completed",
"continuous_screening_debug.status.failed": "Failed",
"continuous_screening_debug.status.pending": "Pending",
"continuous_screening_debug.status.processing": "Processing",
"continuous_screening_debug.tabs.delta_tracks": "Delta Tracks",
"continuous_screening_debug.tabs.update_jobs": "Update Jobs",
"continuous_screening_debug.update_jobs.created_at": "Created At",
"continuous_screening_debug": "Surveillance continue",
"continuous_screening_debug.delta_tracks.created_at": "Créé le",
"continuous_screening_debug.delta_tracks.dataset_file": "Fichier du jeu de données",
"continuous_screening_debug.delta_tracks.object_id": "ID de l'objet",
"continuous_screening_debug.delta_tracks.object_type": "Type d'objet",
"continuous_screening_debug.delta_tracks.operation": "Opération",
"continuous_screening_debug.delta_tracks.processed": "Traité",
"continuous_screening_debug.operation.add": "Ajouter",
"continuous_screening_debug.operation.delete": "Supprimer",
"continuous_screening_debug.operation.update": "Mettre à jour",
"continuous_screening_debug.pagination.per_page": "Éléments par page :",
"continuous_screening_debug.status.completed": "Terminé",
"continuous_screening_debug.status.failed": "Échoué",
"continuous_screening_debug.status.pending": "En attente",
"continuous_screening_debug.status.processing": "En cours de traitement",
"continuous_screening_debug.tabs.delta_tracks": "Pistes Delta",
"continuous_screening_debug.tabs.update_jobs": "Tâches de mise à jour",
"continuous_screening_debug.update_jobs.created_at": "Créé le",

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +58
"continuous_screening_debug": "Continuous Screening",
"continuous_screening_debug.delta_tracks.created_at": "Created At",
"continuous_screening_debug.delta_tracks.dataset_file": "Dataset File",
"continuous_screening_debug.delta_tracks.object_id": "Object ID",
"continuous_screening_debug.delta_tracks.object_type": "Object Type",
"continuous_screening_debug.delta_tracks.operation": "Operation",
"continuous_screening_debug.delta_tracks.processed": "Processed",
"continuous_screening_debug.operation.add": "Add",
"continuous_screening_debug.operation.delete": "Delete",
"continuous_screening_debug.operation.update": "Update",
"continuous_screening_debug.pagination.per_page": "Items per page:",
"continuous_screening_debug.status.completed": "Completed",
"continuous_screening_debug.status.failed": "Failed",
"continuous_screening_debug.status.pending": "Pending",
"continuous_screening_debug.status.processing": "Processing",
"continuous_screening_debug.tabs.delta_tracks": "Delta Tracks",
"continuous_screening_debug.tabs.update_jobs": "Update Jobs",
"continuous_screening_debug.update_jobs.created_at": "Created At",
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new locale strings for the continuous screening debug page are still in English in the Arabic translations file, so ar users will see English UI labels. Please translate the added continuous_screening_debug.* keys (and the new debug section label if it’s user-facing).

Suggested change
"continuous_screening_debug": "Continuous Screening",
"continuous_screening_debug.delta_tracks.created_at": "Created At",
"continuous_screening_debug.delta_tracks.dataset_file": "Dataset File",
"continuous_screening_debug.delta_tracks.object_id": "Object ID",
"continuous_screening_debug.delta_tracks.object_type": "Object Type",
"continuous_screening_debug.delta_tracks.operation": "Operation",
"continuous_screening_debug.delta_tracks.processed": "Processed",
"continuous_screening_debug.operation.add": "Add",
"continuous_screening_debug.operation.delete": "Delete",
"continuous_screening_debug.operation.update": "Update",
"continuous_screening_debug.pagination.per_page": "Items per page:",
"continuous_screening_debug.status.completed": "Completed",
"continuous_screening_debug.status.failed": "Failed",
"continuous_screening_debug.status.pending": "Pending",
"continuous_screening_debug.status.processing": "Processing",
"continuous_screening_debug.tabs.delta_tracks": "Delta Tracks",
"continuous_screening_debug.tabs.update_jobs": "Update Jobs",
"continuous_screening_debug.update_jobs.created_at": "Created At",
"continuous_screening_debug": "الفحص المستمر",
"continuous_screening_debug.delta_tracks.created_at": "تاريخ الإنشاء",
"continuous_screening_debug.delta_tracks.dataset_file": "ملف مجموعة البيانات",
"continuous_screening_debug.delta_tracks.object_id": "معرّف الكائن",
"continuous_screening_debug.delta_tracks.object_type": "نوع الكائن",
"continuous_screening_debug.delta_tracks.operation": "العملية",
"continuous_screening_debug.delta_tracks.processed": "مُعالَج",
"continuous_screening_debug.operation.add": "إضافة",
"continuous_screening_debug.operation.delete": "حذف",
"continuous_screening_debug.operation.update": "تحديث",
"continuous_screening_debug.pagination.per_page": "العناصر لكل صفحة:",
"continuous_screening_debug.status.completed": "مكتمل",
"continuous_screening_debug.status.failed": "فشل",
"continuous_screening_debug.status.pending": "قيد الانتظار",
"continuous_screening_debug.status.processing": "جارٍ المعالجة",
"continuous_screening_debug.tabs.delta_tracks": "مسارات دلتا",
"continuous_screening_debug.tabs.update_jobs": "مهام التحديث",
"continuous_screening_debug.update_jobs.created_at": "تاريخ الإنشاء",

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@Pascal-Delange Pascal-Delange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks generally alright !
Now, I didn't get to try this out with pagination because not enough data in my local instance.
What's missing IMO before possibly merging this:

  • clearer translations (non-technical translations)
  • wondering if a good place for this is in settings or in a kinda hidden section in monitoring (I'd still say, the latter)
  • human intellegible callouts/explanation texts that explain what is what

Comment on lines +21 to +27
const response = await fetch(endpoint + qs, {
method: 'GET',
});
const responseData = (await response.json()) as { data: DebugDeltaTracksResponse };

return responseData.data;
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment seems correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants