The code cited its plan instead of saying why: `E28 review J4`, `(R6 S3b)`, `S1 justified…`,
`deep-review round 5`. That plan lives in the private ops repo, so for every reader of this one the
citation was noise, and a sentence whose subject was the plan step ("round 2 showed…") hid its
lesson behind an id. Each one is gone and the "why" kept: a bare citation is deleted, a sentence
carrying a lesson is reworded around it ("a later attempt showed…").
Measured (`scripts/audit_metrics.py`, product code): 652 lines in 270 files carried an epic code by
the definition the next commit holds (507 / 241 by the old, two-digit-only one) -> 0. Across all
code, tests, scripts and configs: ~1100 epic-code lines plus ~320 sprint/round ids.
Behaviour unchanged, checked mechanically: every changed .py file has the same AST once docstrings
are blanked; css/sh/toml/yml/json files are identical once comments are stripped; the only
non-comment changes in TS/JS are test titles, one description string in a contract table, and five
ESLint messages, whose text is all the gates snapshot diff holds. Not touched: Markdown (docs and
the changelog keep their history), Alembic migrations, TV episode notation (`S2 · E5`), DESIGN.md
ids (`C1`, `B4`, `S3h`), tracker ids (`SEC-16`, `DX-17`).
One stale claim fixed on the way: test_hls_reaper's docstring said the player checkpoints "every
10 s whether or not it is playing", which plex/stream.py calls wrong; it now says what the code does.
53 lines
2.1 KiB
TypeScript
53 lines
2.1 KiB
TypeScript
import { useState } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { Info } from "lucide-react";
|
|
|
|
import { PopoverSurface } from "./ui/AnchoredPopover";
|
|
import { useAnchoredPopover } from "./ui/anchoredPopoverHooks";
|
|
import { Button } from "./ui/Button";
|
|
import { SURFACE } from "./ui/surfaces";
|
|
|
|
// The playlists module shows fewer lists than youtube.com does, and without a word about it that
|
|
// reads as Siftlode being broken (the owner's ask, 2026-09-03: say it is YouTube's API, up front).
|
|
// Three facts, behind one quiet line at the foot of the rail — the owner's pick from the mockups
|
|
// (2026-09-19): always there to find again, never in the way.
|
|
export default function PlaylistLimitsHint() {
|
|
const { t } = useTranslation();
|
|
const [open, setOpen] = useState(false);
|
|
const pop = useAnchoredPopover({
|
|
open,
|
|
onOpenChange: setOpen,
|
|
mode: "dialog",
|
|
role: "dialog",
|
|
placement: "right-end",
|
|
offset: 8,
|
|
});
|
|
const { setPositionReference, setReference } = pop.refs;
|
|
return (
|
|
// The panel is placed off the whole row, not the "Why?" button: off the button it opened
|
|
// over the right third of the rail and covered the lists (measured on localdev).
|
|
<div
|
|
ref={setPositionReference}
|
|
className="mt-2 flex items-center gap-1.5 border-t border-border/60 px-1 pt-2 text-2xs text-muted"
|
|
>
|
|
<Info className="h-3.5 w-3.5 shrink-0" aria-hidden="true" />
|
|
<span>{t("playlists.limits.hint")}</span>
|
|
<Button variant="link" ref={setReference} {...pop.getReferenceProps()}>
|
|
{t("playlists.limits.why")}
|
|
</Button>
|
|
<PopoverSurface
|
|
popover={pop}
|
|
ariaLabel={t("playlists.limits.title")}
|
|
className={`${SURFACE.popover} w-80 max-w-[calc(100vw-2rem)] p-3.5 text-xs leading-relaxed text-fg animate-[popIn_0.16s_ease]`}
|
|
>
|
|
<p className="mb-2 font-semibold">{t("playlists.limits.title")}</p>
|
|
<ul className="list-disc space-y-1.5 pl-4 text-muted">
|
|
<li>{t("playlists.limits.closed")}</li>
|
|
<li>{t("playlists.limits.ownOnly")}</li>
|
|
<li>{t("playlists.limits.noChannel")}</li>
|
|
</ul>
|
|
</PopoverSurface>
|
|
</div>
|
|
);
|
|
}
|