Safety: account-level (per-creator) web-of-trust overrides

Add "trusted creator" overrides that suppress the web-of-trust warning/blur
for ALL of a creator's videos until reset — the account-level companion to the
existing per-video "Show anyway".

- cache.js: per-author override store (bitvid:moderationAuthorOverrides:v1),
  keyed by author hex, with get/set/has/clear/list + persist/load, mirroring
  the per-video store.
- moderationDecorator: overrideActive now also honors an account-level override
  for the video's author, so the whole class of WoT warnings clears for every
  video by that creator.
- app.js: load the author overrides on startup.
- Services + contract: getAuthorModerationOverrides / setAuthorModerationOverride
  / clearAuthorModerationOverride; set/clear refresh the feed + fire the shared
  moderation-override event so the Safety tab list updates.
- Safety tab: a "Trusted creators" section — add by npub, list each with a
  Reset, mirroring the Active-overrides section.
- tests: storage set/get/has/clear/list, hex normalization, persist→load,
  invalid-input guard.

Next: the "Always show this creator" button on the video warning overlay
(second entry point) — a larger multi-component UI change, done separately.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-07-08 15:58:10 -04:00
1 parent 18e7197bdc
commit a0131c718e
9 files changed
+538 -5

No files matched your search

+50
View File
@@ -1612,6 +1612,56 @@
data-orientation="vertical"
></ul>
</div>
<div class="space-y-3 border-t border-border/60 pt-4">
<div class="space-y-1">
<h4 class="text-sm font-semibold text-text">
Trusted creators
</h4>
<p class="text-xs text-muted">
Turn off web-of-trust warnings for a creator across all
their videos. They stay listed here until you reset them.
</p>
</div>
<div class="flex flex-wrap items-end gap-2">
<label class="min-w-0 flex-1 space-y-1">
<span class="text-xs font-medium text-muted"
>Creator npub</span
>
<input
id="profileAuthorOverrideInput"
type="text"
class="form-control"
placeholder="npub1…"
autocomplete="off"
spellcheck="false"
/>
</label>
<button
id="profileAuthorOverrideAddBtn"
type="button"
class="btn focus-ring"
>
Always show
</button>
</div>
<p
id="profileAuthorOverrideStatus"
class="text-xs text-muted"
role="status"
aria-live="polite"
></p>
<div
id="profileAuthorOverridesEmpty"
class="card border border-dashed border-border/60 p-4 text-center text-xs text-muted"
>
No trusted creators yet.
</div>
<ul
id="profileAuthorOverridesList"
class="grid-stack hidden"
data-orientation="vertical"
></ul>
</div>
</div>
<div id="profileLinkPreviewSettings" class="card space-y-4 p-5">