AletheiaFact / AletheiaFact/aletheia

Enhancement: Predefined Filtering Topics for Events

Abierto
#2,342 0 comentarios 0 reacciones 0 asignados Ver en GitHub
tech
Lenguaje dominante
TypeScript
Estrellas
55
Forks
20
Merge medio
2 d 6 h
PR fusionados (30 d)
2

Descripción

# Problem Statement

Currently, event pages have no way to narrow down claim-reviews or verification requests beyond the event's single main topic. Admins and Fact Checkers need a way to define additional filtering topics per event so that the content shown on the event page is more precise and relevant to the audience.

## How

Each event already holds a `mainTopic` reference. The solution is to extend this with a `filterTopics` array — a list of secondary topics that Admins or Fact Checkers can manage through the event creation and edition drawer.

When the event detail page fetches claim-reviews or verification requests, it will use both the `mainTopic` and the `filterTopics` to build the query, narrowing results to only the content that matches at least one of those topics.

**Affected endpoints:**
- `PATCH /api/event/:id` — accepts `filterTopics` as an optional array in the update payload
- `GET /api/review` — receives the resolved topic IDs to scope the results
- `GET /api/verification-request` — same scoping logic applied to the verification requests collection

**UI changes:**
- The event creation and edition drawer will expose a multi-select input for `filterTopics`, restricted to Admin and Fact Checker roles
- The event detail page will pass the selected filter topics down to both `EventReviewsList` and `EventVerificationRequestList`

## Expected Behavior

- Admins and Fact Checkers can define one or more secondary filtering topics when creating or editing an event
- The event detail page renders only claim-reviews and verification requests that match the event's main topic or any of the defined filter topics
- Users browsing the event page see more precise, contextually relevant content
- Regular users have no access to manage filter topics — the input is hidden for non-privileged roles

## Scope / User Stories

- As an **Admin**, I want to define filtering topics for an event so that the event page only shows relevant claim-reviews and verification requests
- As a **Fact Checker**, I want to manage filtering topics for events I am working on so that my team's output is correctly scoped to the event
- As a **user**, I want to see only content that is relevant to the event I am browsing

## Must-haves

- [ ] `filterTopics` array field added to the Event schema (we already have)
- [ ] Event creation and edition drawer exposes a multi-select input for `filterTopics` (Admin and Fact Checker only)
- [ ] Claim-reviews on the event detail page are filtered using both `mainTopic` and `filterTopics`
- [ ] Verification requests on the event detail page are filtered using both `mainTopic` and `filterTopics`

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.