# Framing diagram — Per-group featuring & pinning (Task 7267) # Current system vs. two approaches, drawn from Bruce's 2026-07-12 feedback. # Render: ../../render.sh featured-replays.d2 vars: { d2-config: { layout-engine: dagre } } classes: { problem: { style: { fill: "#fee2e2"; stroke: "#ef4444"; font-color: "#991b1b" } } ok: { style: { fill: "#dcfce7"; stroke: "#22c55e"; font-color: "#14532d" } } new: { style: { fill: "#dbeafe"; stroke: "#2563eb"; font-color: "#1e3a8a" } } neutral: { style: { fill: "#f8fafc"; stroke: "#94a3b8"; font-color: "#334155" } } note: { style: { fill: "#fffbeb"; stroke: "#f59e0b"; font-color: "#92400e"; font-size: 13; border-radius: 8 } } } grid-columns: 3 grid-gap: 80 # ───────────────────────────────────────────────────────────── current: "① CURRENT — one global flag, leaks everywhere" { style: { stroke: "#cbd5e1"; fill: "#ffffff" } flag: "Content.featured\n(global boolean)" { class: problem } leaks: "Replays tab · Community card\nTopics · Author profiles · Group list" { class: problem } flag -> leaks: "highlighted EVERYWHERE\nthe content appears" { style.stroke: "#ef4444" } posts: "Posts" { class: neutral } pinned: "ContentGroup.pinned\n(per-group)" { class: ok } poststab: "Posts tab UI ✓" { class: ok } posts -> pinned -> poststab replays: "Replays" { class: neutral } modal: "featured managed in a modal\ninside Replay feature config" { class: problem } replays -> modal: "hidden / confusing" pain: "Admin can't answer:\n'what's featured in THIS group?'" { class: note } } # ───────────────────────────────────────────────────────────── verA: "② VERSION A — features-tab modal (shipped prototype, PR #615)" { style: { stroke: "#cbd5e1"; fill: "#ffffff" } cfg: "Replay feature config\n(group features tab)" { class: neutral } mgr: "'Featured replays' manager\n(modal)" { class: new } bridge: "ContentGroup.pinned\n(reused — no new data)" { class: ok } cfg -> mgr -> bridge poststab: "Posts tab\n(separate)" { class: neutral } con: "Replays managed in a modal —\ninconsistent with how Posts\nare managed. Harder to scan." { class: note } } # ───────────────────────────────────────────────────────────── verB: "③ VERSION B — dedicated Replays tab (Bruce's suggestion)" { style: { stroke: "#cbd5e1"; fill: "#ffffff" } toggle: "Enable Replays feature" { class: neutral } tab: "adds a 'Replays' TAB\nin group admin panel" { class: new } toggle -> tab: "auto-adds tab" posts: "Posts tab" { class: neutral } replays: "Replays tab" { class: new } posts -> replays: "parallel, same pattern" { style.stroke-dash: 3 } reuse: "reuse Post components\n(replays are content too)" { class: ok } tab -> reuse simplify: "Featured could simplify to\n'auto: just show the latest',\nor featured-post → links to replay\n(Bruce's other PR) — kills the\n'is it featured?' question" { class: note } }