Repository navigation
Avoid duplicate personal rows in reading leaderboards - #83
Conversation
PR reader API performanceResult: INCONCLUSIVE 7 inconclusive · 1 within threshold. Zero request failures across all six runs. Base Three independent runs per revision, each on a fresh GitHub-hosted ARM64 runner. 16 users, 60 seconds/run, 1,000 synthetic articles, cache off, five PgBouncer slots. Latency comparisonAll latency values are in milliseconds; lower is better. Values are medians of three runs.
Additional latency and throughput metricsEach cell shows base → PR. Latencies are in milliseconds.
Individual runs
How to interpret this reportRegressed / Improved: a p95 regression needs >20% and >20 ms increase in the medians and at least two head samples versus the base median. Improvements use the inverse threshold. Within threshold means the change did not meet both thresholds. Inconclusive: a within-revision p95 range >35% of its median and >20 ms is too noisy for a confident latency verdict. Inconclusive latency comparisons are non-blocking: the check passes without claiming an improvement. Confirmed regressions and test/report errors fail the PR gate. Throughput is descriptive: paced users do not measure maximum capacity. This uncached public API test does not establish production health, browser performance or worker capacity. Separate runners can differ in hardware or host load; repetitions and noise checks reduce but cannot eliminate that uncertainty. Full HTML/CSV reports and logs · attempt 1 |
Backend unit coveragePASS · minimum combined coverage 67.60%. Tests: 3007 passed, 0 failed, 0 skipped. Source files: 273.
Unit coverage includes every backend workspace. PostgreSQL/Redis integration tests run separately. Commit: 702257b · HTML, JSON, XML reports and job logs · attempt 1 |
Code Review ✅ Approved🟡 Medium risk · Touch-target preparation now retries within five seconds before dispatching events. Fixes duplicate personal rows in reading leaderboards by deduplicating when a signed-in reader appears in the displayed top ten, with independent membership checks for longest streak and total reading days. Seven PostgreSQL integration regressions and 27 unit regressions passed, including ties outside displayed rows, users present in both boards, and a touch preparation retry mechanism to handle reader-test race conditions. No issues found. OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
|



What changes and why?
When a signed-in reader appeared in a leaderboard's displayed rows, the personal footer rendered the same reader again. Each board now highlights that reader once in the list and omits the duplicate footer and divider. The personal footer remains when their username is outside that board's displayed rows.
Membership is checked independently for longest streak and total reading days, using the username rather than the numerical rank. This preserves personal ranks for ties that extend beyond the ten displayed readers.
Read-only production checks refreshed at 2026-10-04 17:46 UTC found 29 accounts, four claimed public usernames, and ten accounts with recorded reading activity. One account qualifies for both boards: the other nine active readers have no claimed username, and the other three claimed public profiles have no reading activity. Both the live public API and the database return one eligible reader per board. Reading-day and streak projections have zero mismatches and no missing active-reader projection.
The backend already orders each board by its own descending score with a deterministic username tie-break and a ten-row limit. Real PostgreSQL regressions now verify the complete top-ten order and distinct usernames, twelve-way ties at the cutoff, global personal ranks outside the displayed ten, and an active unclaimed reader immediately joining both top tens after claiming a username. Public-profile eligibility remains unchanged.
CI also exposed a reader-test race: rendering could replace a touch target between the actionability preflight and its bounds lookup. Per the requested scope, this PR now retries only touch preparation within a five-second budget, before dispatching native events. A real browser regression forces that remount and checks exactly one touch and one click.
The README now explains leaderboard eligibility and where personal ranks appear. Changes are isolated on
fix/leaderboard-own-row.Validation
Updated against master after #82, preserving query/account boundaries, grid/list preferences, prompt coordination, article-first rendering, filter recovery and scoped touch/runtime fixtures.
apps/web/tests/browser, with the website and Chrome/Edge consumers updated. Application coverage exclusions are unchanged.702257b8: 39 jobs passed, ten expected skips, includingCI required, all CodeQL analyses and SonarQube. 3,007 backend unit, 1,139 PostgreSQL integration, 852 reader and 648 admin tests passed, with no skips. Whole-backend combined coverage is 67.79% across 273 source files, above the unchanged 67.60% minimum.Rollout notes
Frontend rendering change only; no API contract or database migration changes. Production was inspected without writes. Website deployment and Chrome/Edge store publication remain pending release.
Merge after #82 and before #84, after all current-head checks pass.
Ready for review