mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 12:22:28 +00:00
Document moderation runtime flow and fixtures
This commit is contained in:
1 parent
01a6c2ffd8
commit
b46caa59ea
2 files changed
+17
No files matched your search
@@ -40,6 +40,8 @@ Expected:
|
||||
* After 2 reports → autoplay blocked.
|
||||
* After 3 reports → thumbnail blurred; reason chip shown.
|
||||
|
||||
**Exercises:** [`ModerationService.ingestReportEvent()`](../../js/services/moderationService.js) and [`ModerationService.getTrustedReportSummary()`](../../js/services/moderationService.js) wire through [`createModerationStage()`](../../js/feedEngine/stages.js) so [`bitvidApp.decorateVideoModeration()`](../../js/app.js) can hand the summary to [`VideoCard.refreshModerationUi()`](../../js/ui/components/VideoCard.js).
|
||||
|
||||
### B) Mute list (10000)
|
||||
|
||||
```json
|
||||
@@ -53,6 +55,8 @@ Expected:
|
||||
|
||||
Expected: author’s items are downranked/hidden for this viewer.
|
||||
|
||||
**Exercises:** [`ModerationService.ingestTrustedMuteEvent()`](../../js/services/moderationService.js) updates [`ModerationService.isAuthorMutedByTrusted()`](../../js/services/moderationService.js) / [`getTrustedMutersForAuthor()`](../../js/services/moderationService.js), which [`createModerationStage()`](../../js/feedEngine/stages.js) propagates to the video item before [`VideoCard.refreshModerationUi()`](../../js/ui/components/VideoCard.js) renders the mute state.
|
||||
|
||||
### C) Admin blacklist (30000)
|
||||
|
||||
```json
|
||||
@@ -67,11 +71,15 @@ Expected: author’s items are downranked/hidden for this viewer.
|
||||
|
||||
Expected: when viewer subscribes to this list, author is hard-hidden.
|
||||
|
||||
**Exercises:** [`accessControl`](../../js/accessControl.js) hydration feeds [`ModerationService.getAdminListSnapshot()`](../../js/services/moderationService.js) / [`getAccessControlStatus()`](../../js/services/moderationService.js), giving [`createModerationStage()`](../../js/feedEngine/stages.js) the whitelist/blacklist flags that [`bitvidApp.decorateVideoModeration()`](../../js/app.js) and [`VideoCard.refreshModerationUi()`](../../js/ui/components/VideoCard.js) respect.
|
||||
|
||||
### D) COUNT fallback
|
||||
|
||||
* Use a relay that doesn’t support COUNT.
|
||||
* Verify “—” placeholders; no spinner loops; no crashes.
|
||||
|
||||
**Exercises:** Missing COUNT data flows through [`ModerationService.setActiveEventIds()`](../../js/services/moderationService.js) → [`ModerationService.getTrustedReportSummary()`](../../js/services/moderationService.js) defaults, letting [`createModerationStage()`](../../js/feedEngine/stages.js) emit neutral moderation metadata that [`VideoCard.refreshModerationUi()`](../../js/ui/components/VideoCard.js) renders as placeholders.
|
||||
|
||||
## Automated checks (suggested)
|
||||
|
||||
* `npm run test:unit` — covers `tests/moderation/trusted-report-count.test.mjs` for deduping and mute handling.
|
||||
|
||||
Reference in new issue
Block a user