Skip to content

refactor(web): draw a poller's list from one shell section - #184

Merged
Bakhomious merged 5 commits into
mainfrom
step/shared-polled-section
Oct 30, 2026
Merged

Bakhomious merged 5 commits into
mainfrom
step/shared-polled-section

Conversation

@Bakhomious

Copy link
Copy Markdown
Contributor

Brief

Goal: one component in the shell shows a poller's list in a section, so the GitHub page's three lists don't make a third copy of the PRs page's and the Todos page's Jira section (decision 205, as decision 112 did for the form styles).

Scope

  • apps/web/src/shell/PolledSection.svelte: the section, generic over the snapshot and its items, with each list's row as a snippet.
  • apps/web/src/shell/count.ts: countLabel(count, noun), which replaces pullsNote and ticketsNote.
  • PullsSection and JiraTickets use the component; JiraInbox counts with countLabel.
  • Plan: the §0 row, §8.2, decision 205, the Biome gap in §10.

Out of scope: the GitHub page (github-page), the Time page's failure line, the other copies of the card's styles, the Jira inbox's card.

Acceptance criteria

  • The users' unit tests pass unchanged.
  • The pulls*, todos-tickets and todos-inbox* end-to-end specs pass unchanged.
  • The PRs page and the Todos page render the same DOM and look as on main.
  • mise run check is green.

What changed

QA

  • Same DOM, styles and boxes as on the base: a throwaway Playwright spec saved main's HTML (Svelte's comments and scoped classes removed), and every element's tag, box and computed styles, for 7 PRs-page and 7 Todos-page scenarios: loaded, empty, a failure with an earlier list, a failure before any success, a failed load, not set up, nothing yet, a PR without a link, long unbroken texts. It ran in desktop Chromium and phone WebKit, light and dark: 56 captures on 44b1b0f and on this branch, 0 differences. A light-versus-dark control showed 1429 differences, so the diff does catch them.
  • Mutants: 14 mutants of PolledSection and countLabel (the guards, the noun, the count, the texts, the rows, the branches). The users' tests killed 12; two survived, the guard that says "These … are from" only with both a list and its time, a gap main had too. QA added shell/PolledSection.test.ts, which tests the component with a list of its own (GitHub's items key, the noun issue) and both halves of that guard; now all 14 are killed.
  • Coverage: PolledSection.svelte 100% of lines and functions, 17 of 18 branches; the one left is the compiler's failure ?? '' inside {#if failure}, which can't be reached. count.ts 100%.
  • Typecheck covers the new test: a wrong key in its list fails svelte-check.

Review

No blocking findings. Non-blocking:

Gates

mise run check, green locally with BAKHYARD_E2E_PORT=8280: Go fmt, gen, lint, actions and compose lint, tests, coverage, govulncheck; web install, Biome, svelte-check and tsc, Vitest with coverage, knip, pnpm audit, Playwright end-to-end tests in both browsers.

The PRs page's two lists and the Todos page's Jira tickets each drew a
poller's list from a copy of the same markup, texts and styles, and the
GitHub page's three lists would make a third copy. PolledSection in the
shell now draws them, with each list's row as a snippet, and countLabel
replaces pullsNote and ticketsNote. Nothing changes on screen
(decision 205).
@Bakhomious
Bakhomious merged commit b7f499c into main Oct 30, 2026
2 checks passed
@Bakhomious
Bakhomious deleted the step/shared-polled-section branch October 30, 2026 03:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant