chore(comments): drop epic, sprint and review-round ids from the code
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.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// @vitest-environment jsdom
|
||||
//
|
||||
// E5 S5: the enriched Plex detail page. Covers the TMDB-fed pieces added on the page variant — the
|
||||
// The enriched Plex detail page. Covers the TMDB-fed pieces added on the page variant — the
|
||||
// multi-source ratings row (IMDb / TMDb / audience), the facts panel (budget / revenue / studios /
|
||||
// countries), the keyword chips (→ onFilter), and the full crew (→ onOpenPerson). i18n is
|
||||
// key-passthrough; PlexInfo is prop-driven (no queries) so it just needs a QueryClient for its cache
|
||||
@@ -104,7 +104,7 @@ describe("PlexInfo enriched detail (page)", () => {
|
||||
expect(screen.getByText("$160M")).toBeTruthy();
|
||||
expect(screen.getByText("$830M")).toBeTruthy();
|
||||
expect(screen.getByText("Studio A")).toBeTruthy(); // tmdb.studios preferred over the fallback
|
||||
// E30: a coded country is named through the vocab (key-echo i18n here), an uncoded one as stored.
|
||||
// A coded country is named through the vocab (key-echo i18n here), an uncoded one as stored.
|
||||
expect(screen.getByText("vocab.region.HU, United States")).toBeTruthy();
|
||||
});
|
||||
|
||||
@@ -115,7 +115,7 @@ describe("PlexInfo enriched detail (page)", () => {
|
||||
expect(onFilter).toHaveBeenCalledWith({ keywords: ["heist"] });
|
||||
});
|
||||
|
||||
// E28: every value that filters says so on hover — the genre, certificate and studio had no hint
|
||||
// Every value that filters says so on hover — the genre, certificate and studio had no hint
|
||||
// while the keyword and the year did — and a value filters in the facts panel as in the header.
|
||||
it("every filtering value carries a filter hint", () => {
|
||||
wrap(<PlexInfo onPlayItem={noop} detail={detail} variant="page" onFilter={() => {}} />);
|
||||
@@ -139,7 +139,7 @@ describe("PlexInfo enriched detail (page)", () => {
|
||||
const onOpenPerson = vi.fn();
|
||||
wrap(<PlexInfo onPlayItem={noop} detail={detail} variant="page" onOpenPerson={onOpenPerson} />);
|
||||
expect(screen.getByText("plex.info.crew")).toBeTruthy();
|
||||
// E30: the job is TMDB's English word, named through the vocab (key-echo i18n here).
|
||||
// The job is TMDB's English word, named through the vocab (key-echo i18n here).
|
||||
expect(screen.getByText("vocab.crewJob.Director")).toBeTruthy();
|
||||
fireEvent.click(screen.getByText("Jane Director"));
|
||||
expect(onOpenPerson).toHaveBeenCalledWith("Jane Director");
|
||||
@@ -173,9 +173,9 @@ describe("PlexInfo enriched detail (page)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// E28 S3h, the owner's layout B: a main column (collection strips → crew → cast) beside a sidebar of
|
||||
// The owner's layout: a main column (collection strips → crew → cast) beside a sidebar of
|
||||
// facts (details, keywords); a column with nothing in it is not rendered and the other takes the width.
|
||||
// E31 (the owner's pick "A"): the hero's text stopped at ~55% of the panel. The facts and the key crew are
|
||||
// The owner's pick: the hero's text stopped at ~55% of the panel. The facts and the key crew are
|
||||
// its second column now (a grid that splits in a wide hero), the keywords sit under the text, and under
|
||||
// the hero only the collection strips and the cast remain, stacked.
|
||||
describe("PlexInfo — the hero's second column (page)", () => {
|
||||
@@ -252,7 +252,7 @@ describe("PlexInfo — the hero's second column (page)", () => {
|
||||
expect(follows(heading("Test Movie"), kw)).toBe(true);
|
||||
});
|
||||
|
||||
// E31: the hero's grid row is as tall as its taller column — the crew, beside the text — and the poster,
|
||||
// The hero's grid row is as tall as its taller column — the crew, beside the text — and the poster,
|
||||
// a flex child, stretched to it: a 2:3 picture drawn ~175×590 and cropped. It keeps its own ratio.
|
||||
it("keeps the poster at its own height, not stretched to the row", () => {
|
||||
wrap(<PlexInfo onPlayItem={noop} detail={full} variant="page" />);
|
||||
@@ -261,7 +261,7 @@ describe("PlexInfo — the hero's second column (page)", () => {
|
||||
expect(poster.className.split(/\s+/)).toContain("self-start");
|
||||
});
|
||||
|
||||
// E31 (the owner's call): twelve names ran the column ~170px past the text. The first CREW_SHOWN show,
|
||||
// The owner's call: twelve names ran the column ~170px past the text. The first CREW_SHOWN show,
|
||||
// the rest behind "Show N more"; a list barely longer shows whole.
|
||||
it("shows the first crew names and opens the rest on demand", () => {
|
||||
const crew = Array.from({ length: 12 }, (_, i) => ({ name: `Person ${i}`, job: "Producer" }));
|
||||
@@ -301,7 +301,7 @@ describe("PlexInfo — the hero's second column (page)", () => {
|
||||
expect(screen.queryByRole("button", { name: "plex.info.crewMore" })).toBeNull();
|
||||
});
|
||||
|
||||
// E32 S2: the cast row is the shared CastRow now; the page and the player's overlay hand it their
|
||||
// The cast row is the shared CastRow now; the page and the player's overlay hand it their
|
||||
// own palette. Only the overlay sits on the dark art, so only it may carry the white text.
|
||||
it.each([
|
||||
["page", false],
|
||||
@@ -313,7 +313,7 @@ describe("PlexInfo — the hero's second column (page)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// E28 review D1 + D2: a collection sibling is a Plex card like any other — its "…" menu, its watched
|
||||
// A collection sibling is a Plex card like any other — its "…" menu, its watched
|
||||
// toggle and its playlist add, as on the related strip — where it used to be a Play and nothing else.
|
||||
describe("a collection strip's card", () => {
|
||||
beforeAll(() => {
|
||||
|
||||
Reference in New Issue
Block a user