feat: Enhance validation viewing functionality with event emission

- Updated the `createMarkViewedHandler` to emit an event when a validation is marked as viewed, allowing the UI to update the unviewed count dynamically.
- Modified the `useUnviewedValidations` hook to handle the new event type for decrementing the unviewed validations count.
- Introduced a new event type `issue_validation_viewed` in the issue validation event type definition for better event handling.
This commit is contained in:
Kacper
2025-12-23 22:25:48 +01:00
parent d1418aa054
commit dd27c5c4fb
4 changed files with 23 additions and 2 deletions

View File

@@ -45,7 +45,7 @@ export function createGitHubRoutes(events: EventEmitter): Router {
router.post(
'/validation-mark-viewed',
validatePathParams('projectPath'),
createMarkViewedHandler()
createMarkViewedHandler(events)
);
return router;