Relocate blocked inspection to Settings and enhance user review lifecycle #25
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/review-and-blocked-inspection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Relocate blocked-content inspection to Settings and enhance user review lifecycle (2.7.0-dev8)
Summary of changes:
Blocked-content inspection:
User review lifecycle and layout enhancements (CUR-12, CUR-13, CUR-14):
Target alignment:
Validation:
Automated code review
Reviewed commit:
9aec4ecd50ab4317f84bc0b213b1fdefc0a1f759Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Verified the supplied changes against the checked-out tree. The CUR-12 SQL edits in src/app.ts are guarded by
type === 'user'(subreddits have nois_reviewcolumn in schema.sql),/api/blocked/bulkreusessetBlockedso it inherits the clearing, and the new review-card markup in web/src/primary-views.tsx matches the existing.entity-list/.entity-card/.entity-name::before { content: attr(data-prefix) }rules already present in web/src/style.css, so the updated smoke selectors resolve. The new tests (tests/review-lifecycle.test.mjs, the added blocked.test.mjs case) match the actual API shapes and schema columns. One concrete measurement defect exists in the changed benchmark script (a metric that no longer measures anything), plus several narrower behavioural/UX inconsistencies introduced by the relocated blocked-content inspection and the new review-card actions. No evidence of data loss, migration, auth, path-containment or worker-ownership breakage.Blocking findings
None.
Important findings
The diff deletes the
await waitFor(...nav[aria-label="Gallery views"] button... >= blockedEntities + 1)that previously sat betweenconst initialMs = ...(line 141) andconst blockedNavMs = performance.now() - initialStarted;(line 142). In the checked-out file there is no await or other work between the two statements, soblockedNavMsis always equal toinitialMs, yet it is still emitted at line 238 asblocked_navigation_loaded_ms. The relocated path (Settings link click,details.blocked-content-inspectionwait, summary click,.blocked-media-list buttonwait) is now timed only insideblockedReviewMs.Impact: The reported field silently duplicates
initial_gallery_50_cards_msregardless ofblocked_entities, so the benchmark output contains a metric whose name claims blocked-list rendering cost but measures the initial gallery load; any scale evidence read from it is meaningless.Suggested fix: Re-point the measurement at the relocated path (start a timer before the Settings link click and set
blockedNavMsafter awaitForasserting the blocked rows are rendered, e.g.[...document.querySelectorAll('.blocked-media-list li')].length >= ${blockedEntities}), or drop the metric and rename the emitted field so it is not read as a blocked-list measurement.Suggestions
Bulk follow does not clear review for users already in followed state (src/app.ts:2843; medium confidence)
The bulk-follow update added by this change is
UPDATE users SET state = 'followed', ... , is_review = 0 WHERE name_normalized = ? AND state IN ('new', 'seen') AND is_collector = 0(src/app.ts:2840-2843), so an already-followeduser is counted asskippedand keepsis_review = 1. The single-follow route handles that case explicitly:} else if (type === 'user') { db.prepare('UPDATE users SET is_review = 0 WHERE id = ?')...}(src/app.ts:2800-2801). The state is reachable becausePOST /api/users/{user}/review(src/app.ts:3034) andPOST /api/review/bulk(src/app.ts:2998) applyis_review = 1with no state guard.Impact: CUR-12's invariant that review is an active triage state alongside lifecycle states can be violated: a followed user marked for review stays in the Users-to-review cards after bulk follow, while the identical single-action request clears it.
Suggested fix: Mirror the single-follow branch in the bulk route (a second update clearing
is_review = 0forstate = 'followed' AND is_collector = 0), or document that bulk follow only clears review for newly followed users.Blocked-inspection banner offers only "Back to Settings" for inspections entered from other views (web/src/main.tsx:1384; medium confidence)
The new banner hardcodes
<button onClick={() => switchView('settings')}>Back to Settings</button>, butselectedis still set from unchanged non-Settings paths:viewEntityMedia(if (blockedEntity) setSelected(blockedEntity), main.tsx:661) andviewCrossReferenceMedia(main.tsx:721), both reached from the entity-card "View blocked media" button (main.tsx:1486) in the Users/Subreddits views.Impact: After the gallery nav buttons were removed, an inspection opened from the Users or Subreddits view can only be exited via "Back to Settings" (an unrelated view) or "Exit to Gallery", so the return path no longer matches where the inspection was opened.
Suggested fix: Record the originating view when
selectedis set and label/point the return button accordingly, or keep a neutral pair of exits ("Exit to Gallery" plus a link back to the originating view).Settings inspection summary counts files differently from the adjacent purge preview (web/src/main.tsx:1636; medium confidence)
The new summary prints
blocked.reduce((sum, e) => sum + e.media_count, 0)over/api/blocked/content, which returns only users and subreddits withmedia_count > 0(src/app.ts:1114) and whosemedia_countis a per-entity counter maintained by the schema.sql triggers (media_insert_counts, src/schema.sql:127-140) over all media of that entity. Directly above it, the same panel printspurgePreview.total, whichGET /api/blocked/purgecomputes asSELECT COUNT(*) AS n FROM media WHERE is_visible = 0(src/app.ts:1349) and which also includes media hidden by blocked tags. Both numbers are labelled "files".Impact: The two side-by-side counts can disagree: media owned by both a blocked user and a blocked subreddit is counted twice in the inspection total, and blocked-tag media is omitted from it, so the "pending purge" wording can misstate what the purge button will delete.
Suggested fix: Use the purge preview's unique total for the summary wording, or label the inspection count explicitly as per-entity media references (e.g. "N entities, M entity-media references") instead of "files".
Review cards offer Follow to collector users, which the API rejects (web/src/primary-views.tsx:220; medium confidence)
The new review-card actions render
<button onClick={() => void followUser(user.name)}>Follow</button>unconditionally, and theUsertype in this file (web/src/primary-views.tsx:8) is{ id, name, media_count, thumb_media_id }with nois_collectororstatefield to condition on.POST /api/followsreturns 409 for collectors (src/app.ts:2793if (row.is_collector) return reply.code(409)...), andjson()in this file throws on non-ok responses (web/src/primary-views.tsx:21-22), so the failure surfaces as an error alert. The Users view deliberately hides that button:!(view === 'users' && entity.is_collector && entity.state !== 'followed')(web/src/main.tsx:1489).Impact: A collector marked for review (reachable because the review endpoints apply
is_review = 1with no collector/state guard, src/app.ts:2998 and 3034) gets an error alert instead of an action, diverging from the harmonized entity-card behaviour CUR-14 asks for.Suggested fix: Include
is_collector(andstate) in the review view's user payload and hide or disable the Follow button for collectors, matching the Users view's guard.Tests and validation
Questions
blocked_navigation_loaded_msin scripts/benchmark-browser-interaction.mjs be re-pointed at the Settings blocked lists, or removed, so the emitted benchmark output does not report a degenerate duplicate of the initial gallery load?is_reviewfor users already infollowedstate, matching the single-follow route'selse if (type === 'user')branch in src/app.ts?state/is_collectorso its card actions match the Users view's guards, and should the review list exclude users that are no longer triage-eligible?Review limitations
Diff coverage
CHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Response to Automated Review
All findings from the automated review have been addressed:
blocked_navigation_loaded_ms benchmark measurement:
blockedNavMsinscripts/benchmark-browser-interaction.mjsto accurately time navigating to Settings and expanding the blocked inspection list.blockedReviewMsaround clicking a blocked entity and loading its blocked gallery.Bulk follow clearing review for already-followed users:
POST /api/follows/bulkinsrc/app.tsto clearis_review = 0for non-collector users even if they were already infollowedstate, matching the single-follow behavior.tests/review-lifecycle.test.mjsconfirming already-followed users marked for review haveis_reviewcleared on bulk follow.Origin-aware return navigation from blocked inspection:
selectedOrigininweb/src/main.tsxso inspections entered from Users or Subreddits offer "Back to Users" / "Back to Subreddits" and return directly to the originating view, alongside "Exit to Gallery".Settings inspection summary count label:
web/src/main.tsxto explicitly label the summed entity count asentity-media referencesrather thanfilesto distinguish from unique hidden media files reported in the purge preview.Review card Follow action for collectors:
is_collectorin the review viewUsertype inweb/src/primary-views.tsx.user.is_collectoris true, matching the Users view guard and preventing 409 conflict errors.Validation evidence:
npm run build).npm test).npm run test:schema).Automated code review
Reviewed commit:
76b4d72eef7d6cd1e685814ba1c1460fe0eb856dVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The change set relocates blocked-content inspection from the gallery nav into Settings (a collapsible
details.blocked-content-inspectionplus per-entity Browse buttons), adds ablocked-inspection-bannerwith origin-aware return buttons, redesigns the Users-to-review cards as.entity-list/.entity-cardcards with Slideshow/Follow/Block actions, and clearsis_reviewon follow/block insrc/app.ts. I confirmed one type-level defect (an undeclaredPrimaryViewname that the build pipeline cannot catch), plus three behavioural inconsistencies introduced by the new origin/slideshow/action code paths. Theis_reviewclearing itself is consistent with the newtests/review-lifecycle.test.mjsand I found no defect in it. I dropped the previously reported quadratic-lookup claim:/api/blocked/content(src/app.ts:1114-1121) returns only blocked entities withmedia_count > 0, and the scale fixture (scripts/browser-gallery-smoke.mjs:459-465) inserts onlyblockedtable rows, so the supplied evidence does not demonstrate the claimed cost.Blocking findings
None.
Important findings
PrimaryViewin the new selectedOrigin state (web/src/main.tsx:106; high confidence)The added line is
const [selectedOrigin, setSelectedOrigin] = useState<PrimaryView | null>(null);. A search ofweb/srcreturns exactly one occurrence ofPrimaryView(this line); the file declares onlytype View = 'gallery' | 'users' | 'subreddits' | ... | 'settings'at line 55, and no import in the file's import block (lines 1-17) exports aPrimaryView. Values assigned to it are'settings'(line 973),view(lines 664/727) and'users'/'subreddits'comparisons (lines 1393-1398), i.e. theViewdomain.Impact: The annotation references an unresolvable identifier, so any TypeScript check of
web/sources fails.package.jsonbuilds withtsc -p tsconfig.json(tsconfig.json includes onlysrc/**/*.ts) plusvite build(vite.config.ts rootweb, esbuild erases annotations), so neither the reported 217/217 Node run nor the build surfaces it; the origin value's domain is therefore unchecked andswitchView(origin)at line 1396 is not verified againstView.Suggested fix: Annotate
selectedOriginwith the existingViewtype (or export a sharedPrimaryViewsubtype from a module that is imported), so the assignments at lines 664/727/973 and theswitchView(origin)call at line 1396 are type-checked.Suggestions
selectedOriginis not set or cleared on thebrowseMediaEntitypath, so the banner can name a view the user did not come from (web/src/main.tsx:839; medium confidence)browseMediaEntity(line 834) setssetSelected(blockedEntity ?? null)at line 839 with no matchingsetSelectedOrigin, andswitchView(line 923) clearssetSelected(null)at line 930 without clearingselectedOrigin. OnlyviewEntityMedia-style paths (lines 663/664, 726/727) andbrowseBlockedEntity(lines 972/973) set the origin. The banner at lines 1392-1398 then rendersBack to Users/Back to Subreddits/Back to SettingsfromselectedOrigin ?? 'settings'.onBrowseUser(line 1290) andStatsView.onBrowseEntity(line 1292) route throughbrowseMediaEntity, as does the new review card'sView mediabutton (primary-views.tsx:218).Impact: After any prior inspection from Settings leaves
selectedOrigin = 'settings', entering blocked-media inspection throughbrowseMediaEntity(e.g. the new review cards' 'View media', or a stats/favourites user browse) keeps the stale origin, so the banner offers to return to a view the user did not come from.Suggested fix: Set
selectedOrigininbrowseMediaEntityalongsidesetSelected(to the currentview, ornull), and clearselectedOriginwhereverswitchViewclearsselected, so the banner label always matches the actual entry path.Review-card Follow button is not gated on user state; the newly added
statefield is never read (web/src/primary-views.tsx:220; medium confidence)The
Usertype was widened withstate?: string(line 8), but no code in this file reads.state(a search for.stateinweb/src/primary-views.tsxreturns no matches). The review card renders<button onClick={() => void followUser(user.name)}>Follow</button>guarded only by!user.is_collector(line 220) and always renders Block (line 221).POST /api/followsinsrc/app.tsreturns 409 for a user whose state is notnew/seen/followed(src/app.ts:2794-2795,Cannot follow a ${row.state}), andPOST /api/users/:user/review(src/app.ts:3044) setsis_review = 1with no state guard, while the review list filter is onlyusers.is_review = ?(src/app.ts:1801-1802). The standard entity card in main.tsx gates the same action with(entity.state === 'new' || entity.state === 'seen' || entity.state === 'followed')(line 1504).Impact: A review-marked user in a rejected state (e.g. blocked, then re-marked via the review endpoint) shows a Follow button that always fails with a 409 surfaced through
setError, and the importedstatefield suggests state-gating was intended but not implemented.Suggested fix: Use
user.stateto render Follow only fornew/seen/followedstates (mirroring main.tsx:1504-1505), or remove the unusedstatefield if no gating is intended.openUserSlideshowalways queries/api/media, so a blocked review user gets 'No visible media' instead of their blocked media (web/src/main.tsx:686; medium confidence)The new
openUserSlideshow(line 686) hardcodesconst base = '/api/media'withuser: name, and errors withNo visible media for ${name}when the page is empty. The siblingopenEntitySlideshow(line 668) instead selects/api/blocked/content/${type}/${entity.id}/mediawhenentity.state === 'blocked'(lines 670-673). Media of blocked users is excluded from/api/mediabecausem.is_visible = 1is required (src/app.ts:641) and schema.sql setsis_visible = 0for blocked users' media (schema.sql:157-159). The review card's Slideshow button is enabled wheneveruser.media_count !== 0(primary-views.tsx:219), andmedia_countcounts all media, not visible media.Impact: A review-marked user whose state is
blocked(reachable becausePOST /api/users/:user/reviewhas no state guard) gets a Slideshow button that reports 'No visible media' rather than launching their blocked media, unlike the standard entity card's Slideshow.Suggested fix: Reuse the blocked-media endpoint for blocked users in
openUserSlideshow(asopenEntitySlideshowdoes), or gate the review-card Slideshow button on a state that has visible media.Tests and validation
Questions
row.querySelector('button').textContent === 'Unblock'for the first.blocked-list li; the change now inserts a Browse button before Unblock for entities that have media. It currently passes only because the name-sorted first row (u/alpha) has no media. Should that assertion be made order-independent (e.g. select the Unblock button by text) so it does not depend on fixture media counts?is_reviewinsetBlocked,POST /api/followsandPOST /api/follows/bulk. ShouldDELETE /api/follows(unfollow) or marking an entity for deletion also clearis_review, or is clearing intentionally limited to the follow/block transitions?Review limitations
Diff coverage
CHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Response to AI review feedback (commit
76b4d72)The following fixes address all findings and questions from the latest automated review:
Undeclared
PrimaryViewtype inweb/src/main.tsx:106(Important finding):selectedOriginwithView | null, matching the existing view union.selectedOrigintracking and return banner label accuracy (Suggestion):origin: View | null = nullparameter tobrowseMediaEntity, settingselectedOriginwhen browsing blocked entities from Review or Stats.setSelectedOrigin(null)toswitchViewso origins do not persist across top-level navigation.Back to ReviewandBack to StatsalongsideBack to UsersandBack to Subreddits.Gating review-card Follow button on user state (Suggestion):
web/src/primary-views.tsxon!user.is_collector && (user.state === undefined || user.state === 'new' || user.state === 'seen' || user.state === 'followed'), mirroringmain.tsxand preventing 409 errors.Blocked user slideshow support in
openUserSlideshow(Suggestion):openUserSlideshowto check if the target user is blocked and route to/api/blocked/content/user/${blockedEntity.id}/media, matchingopenEntitySlideshow.Smoke test alignment with CUR-12 lifecycle:
scripts/browser-gallery-smoke.mjs, resetReview statustoallbefore verifying blocked entities on/users(since CUR-12 automatically clearedis_reviewon block, movingvisibleout ofreview=true).visiblefor review before the/reviewview check.Validation
npm run build).npm test).npm run test:schema).node scripts/browser-gallery-smoke.mjswith Chromium headless, result: passed).Automated code review
Reviewed commit:
7ab0614e11aa6b63a5a46089a905e72e24ac3297Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Verified the supplied diff against the checked-out sources. The CUR-12
is_review = 0resets insrc/app.ts(setBlocked,POST /api/follows,POST /api/follows/bulkwithclearReviewFollowed) are consistent withtests/review-lifecycle.test.mjs, and/api/blocked/bulkreusessetBlocked, so the bulk-block assertion is covered; the newtests/blocked.test.mjscase matches the actual/api/blocked/contentand/api/blocked/content/:type/:id/mediaresponse shapes insrc/app.ts:1095/1123and themedia_insert_countstriggers inschema.sql:127. The Settings blocked-content inspection markup (details.blocked-content-inspection,.blocked-media-list,.blocked-inspection-banner,.blocked-count) has matching CSS inweb/src/style.css, and no stalenav[aria-label="Gallery views"]selectors remain outside the new negative assertion atscripts/browser-gallery-smoke.mjs:264. Four defects remain: a verified-requirement label regression on the review card's primary action, an unguarded benchmark metric introduced by the newlet blockedNavMs = null, an un-awaited fetch that makes the new review-list smoke sequence race-dependent, and a per-row linear scan added to the CUR-09-scale Settings list.Blocking findings
None.
Important findings
Review-list primary action renamed to "View media", contradicting the verified CUR-10 wording (web/src/primary-views.tsx:218; high confidence)
<button className="primary" onClick={() => onBrowseUser(user.name)}>View media</button>replaces the previousBrowselabel. REQUIREMENTS.md CUR-10 (REQUIREMENTS-TRACE.md: Verified, accepted 2026-10-01) states: "On the review list, Browse immediately opens the gallery filtered to that user's media, shows the active user filter and loads matching items." The updated smoke sequence no longer pins any label for that control; it selects it structurally via.entity-card ... button.primary(scripts/browser-gallery-smoke.mjs:574).Impact: CUR-10 is a Verified requirement whose acceptance text names the control as Browse; after this change that named control no longer exists in the review card, so the recorded acceptance evidence no longer describes the shipped UI, and the structural selector means future label drift would not be caught by the smoke test.
Suggested fix: Keep the label "Browse" on the review-list primary action (CUR-14 only requires retaining review-specific actions, not renaming them), or amend CUR-10's requirement text and re-run its acceptance evidence; either way have the smoke test assert the button's text instead of only
button.primary.Benchmark reports 0 ms for blocked navigation when no blocked entities exist (scripts/benchmark-browser-interaction.mjs:240; high confidence)
The change replaced the always-assigned
const blockedNavMs = performance.now() - initialStarted;withlet blockedNavMs = null;(line 142), assigned only insideif (blockedEntities)(line 144/150). The report line emitsblocked_navigation_loaded_ms: Math.round(blockedNavMs * 100) / 100with no null guard, while its sibling metric is guarded:blocked_review_action_to_render_ms: blockedReviewMs === null ? null : Math.round(blockedReviewMs * 100) / 100(line 241).blockedEntitiesis a library-derived count (line 80), so runs with no blocked entities with media take the null path.Impact: A run with zero blocked entities now reports
blocked_navigation_loaded_ms: 0(null * 100is 0) instead ofnull, so benchmark records used as performance evidence can show a measured-fast Settings navigation that was never measured.Suggested fix: Guard the metric like its sibling:
blocked_navigation_loaded_ms: blockedNavMs === null ? null : Math.round(blockedNavMs * 100) / 100.Smoke test marks a user for review with an un-awaited fetch before opening /review (scripts/browser-gallery-smoke.mjs:567; high confidence)
await evaluate("fetch('/api/users/visible/review', { method: 'POST' }); true")is followed immediately by the/reviewclick (line 568) andwaitFor(... .entity-card .entity-name ... 'visible')(line 569).evaluatesendsRuntime.evaluatewithawaitPromise: true, returnByValue: true(line 90), but the evaluated expression's value is the booleantrue, so the fetch promise is never awaited.FavouritesViewfetches/api/users?review=true&sort=name&limit=60once inside auseEffectkeyed on[mode, sort]and never re-fetches (web/src/primary-views.tsx:135), andwaitForgives up after 150 x 100 ms (line 94). The re-mark is required here because 'visible' was blocked earlier at line 377, which now clearsis_review.Impact: The review list is populated by a race between the un-awaited POST and the view's own GET; if the POST has not completed when the view renders, the assertion at line 569 fails as a 15 s timeout rather than a product defect, making the new CUR-13/CUR-14 smoke coverage flaky.
Suggested fix: Await the request inside the evaluated expression, e.g.
await evaluate("(await fetch('/api/users/visible/review', { method: 'POST' }); true)"), or poll withwaitFor("fetch('/api/users?review=true&q=visible').then(r=>r.json()).then(p=>p.users.some(u=>u.name==='visible'))")before clicking/review.Suggestions
Each rendered row now runs
const entityWithMedia = blocked.find((item) => item.type === type && item.name.toLowerCase() === entry.value.toLowerCase());insideentries.sort(...).map(...), whereentriescomes fromblockedList(/api/blocked) andblockedfromGET /api/blocked/content(main.tsx:191). CUR-09 is a release gate for lists of at least 1,283 users / 1,295 subreddits, and Q-02 covers thousands of blocked entities; the updated benchmark (scripts/benchmark-browser-interaction.mjs:146-150) now exercises this Settings path.Impact: Rendering an open blocked list performs O(rows x entities) comparisons with a
.toLowerCase()allocation per comparison, adding avoidable per-render work on the exact path the CUR-09 usability gate and the new benchmark measure. This is a scaling risk, not a demonstrated failure.Suggested fix: Build a
Mapkeyed bytype+ lower-cased name fromblockedonce per render (outside the.mapcallback) and look up per row instead of scanning the array per row.Tests and validation
Questions
followed(reachable becausePOST /api/users/{user}/reviewre-marks a followed user, as exercised in tests/review-lifecycle.test.mjs), mirroring the label toggle in the Users view?POST /api/follows/bulkcount a user whose review marker was cleared byclearReviewFollowed(already followed, so reported asskipped) differently, or is the unchanged added/skipped contract intended?GET /api/blocked/content?Review limitations
nix build; the 217/217 and 60/60 counts and the red-to-green run described in REQUIREMENTS-TRACE.md are untrusted PR claims.dist/artifacts, so Fastify schema/response-shape consistency for the changed routes was not verified end to end.browseBlockedEntityomitting thesetSlideshow(null)/setTagEditor(null)resets thatbrowseMediaEntityperforms (main.tsx:839-840): the only entry points to it are Settings-scoped Browse buttons, and.slideshow { position: fixed; inset: 0; z-index: 20 }covers the viewport, so I could not demonstrate from the supplied evidence that a slideshow or tag editor can remain open when those buttons are reachable.Diff coverage
CHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Response to AI review feedback (commit
7ab0614)Addressing all 4 findings from review #3:
Review card primary action label (Important finding):
Browseon the review list primary button inweb/src/primary-views.tsx:218, preserving CUR-10 requirement wording.!user.is_collector && (user.state === undefined || user.state === 'new' || user.state === 'seen').scripts/browser-gallery-smoke.mjs:574to explicitly assert that the button's text isBrowse.Benchmark
blocked_navigation_loaded_msnull guard (Important finding):scripts/benchmark-browser-interaction.mjs:240:blockedNavMs === null ? null : Math.round(blockedNavMs * 100) / 100, matching the sibling metric.Smoke test review POST race condition (Important finding):
fetch('/api/users/visible/review', { method: 'POST' }).then(() => true)inscripts/browser-gallery-smoke.mjs:567so the evaluated promise is awaited by CDP before navigating to/review.Settings blocked-content quadratic lookup (Suggestion):
web/src/main.tsx:1630, constructed ablockedMaponce per open category for O(1) row lookups, eliminating O(N^2) scans over CUR-09/Q-02 scale blocked lists.Validation
npm run build).npm test).npm run test:schema).result: passed).Automated code review
Reviewed commit:
a739e5e5937ee892065b33bd31a17acb07bf626aVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Validated the supplied diff against the checked-out code. The server-side CUR-12 changes in src/app.ts are internally consistent: setBlocked (used by POST /api/blocked and /api/blocked/bulk), POST /api/follows and POST /api/follows/bulk all clear is_review for users, including the already-blocked and already-followed cases, and the new tests/review-lifecycle.test.mjs asserts exactly those paths; the collector exclusion in the bulk-follow queries matches the single-follow 409 guard, so no collector/followed divergence exists. The new tests/blocked.test.mjs case matches the existing /api/blocked/content and /api/blocked/content/{type}/{id}/media routes (src/app.ts:1145-1160). VERSION, package.json and CHANGELOG.md agree on 2.7.0-dev8 and retain the 2.6.0-dev7 entry. The new .entity-card/.entity-list/.entity-card-cover/.entity-state rules already exist in web/src/style.css:232-247, so the review card reuses the standard card styling; the removed gallery nav is referenced only by the updated smoke assertion (scripts/browser-gallery-smoke.mjs:264). Remaining issues: client-side review state in the Users view is now stale against the new server behaviour, the review card hides the lifecycle state its own action gating depends on, the review-view User type contradicts the /api/users schema, and a benchmark field name now describes a different interaction. No browser or test run was performed here.
Blocking findings
None.
Important findings
src/app.ts now clears is_review on follow (line 2799/2801) and on block (line 1169/1171), but the client-side state updates behind those actions were not changed: toggleEntityFollow writes only
{ ...item, state: ... }(main.tsx:538) and updateBlockedEntityState writes only{ ...item, state }(main.tsx:1137). Neither bumps entityRevision (only main.tsx:567 and 1563 do), so the entity list is not re-fetched. The Users view then renders the review toggle from that stale value at main.tsx:1525 (toggleReview(entity.name, entity.is_review)/ labelentity.is_review ? 'Unreview' : 'Review'). By contrast reviewMediaUser (main.tsx:594) and the bulk review path (main.tsx:639) do update is_review locally, so this is an omission specific to the new follow/block behaviour.Impact: After following or blocking a review-marked user from the Users view, the card still offers 'Unreview' and the row still appears under the 'Review later' filter (main.tsx:1384-1388) until the list is re-fetched, while the server has already set is_review = 0. The UI shows two contradictory review states for the same entity.
Suggested fix: Set is_review: false for users in the state updates at main.tsx:538 and main.tsx:1137 (and drop the row when reviewFilter === 'reviewed'), or bump entityRevision after a follow/block so the local list matches the server.
Suggestions
Review card hard-codes its state label and hides the lifecycle state its actions depend on (web/src/primary-views.tsx:215; medium confidence)
The review card renders
<span className="entity-state">review later</span>(line 215) while the standard card renders{entity.state.replaceAll('_', ' ')}(main.tsx:1506). The card's own gating uses the fetched state: Follow is shown only forstate === undefined | 'new' | 'seen'(line 220) and Block is unconditional (line 222). POST /api/users/{user}/review (src/app.ts:3044) sets is_review without any state check, so a followed or blocked user can legitimately reappear in the review list (tests/review-lifecycle.test.mjs asserts a followed user can be re-marked), where the card shows no indication of that state and offers Block rather than Unblock.Impact: CUR-14 asks for the standard card layout 'while retaining review-specific actions'; a constant state label means a review-marked user that is also followed or blocked is presented as if it were only pending review, and the visible actions do not match the hidden state.
Suggested fix: Render the real entity state in the entity-state slot (as the standard card does) plus a separate review badge, and offer Unblock for
state === 'blocked'instead of a second Block action.Review-view User type contradicts the /api/users response schema (web/src/primary-views.tsx:8; medium confidence)
type User = { ... is_collector?: number; state?: string }(line 8) types the /api/users?review=true payload, but entityListItemSchema (src/app.ts:108) requires 'state' and declares is_collector as boolean, and the handler returnsis_collector: booleanFlag(is_collector)(src/app.ts:1850). main.tsx's matching Entity type declaresis_collector: boolean(line 51). The optionalstate?also makes theuser.state === undefinedbranch of the Follow guard at line 220 unreachable.Impact: No runtime defect today (0 and false both satisfy
!user.is_collector), but the declared type no longer documents the actual contract, so the Follow guard silently accepts a shape the server never returns.Suggested fix: Declare
is_collector: booleanandstate: stringto match entityListItemSchema, mirroring the Entity type in main.tsx, and drop thestate === undefinedbranch.blocked_navigation_loaded_ms now measures a different interaction under the same field name (scripts/benchmark-browser-interaction.mjs:241; high confidence)
The removed code timed the gallery nav (
document.querySelectorAll('nav[aria-label="Gallery views"] button').length >= ${blockedEntities + 1}). The new code starts a fresh clock, clicksnav[aria-label="Primary views"] a[href="/settings"], opensdetails.blocked-content-inspectionand waits for.blocked-media-list button, then still reports the result asblocked_navigation_loaded_ms(line 241). BENCHMARKS.md:161 records 'the complete blocked navigation after 312 ms' for the previous gallery-nav behaviour.Impact: Values reported under this field are no longer comparable with the recorded numbers, and the name no longer describes what is measured, so the Q-01 browser evidence trail loses continuity across this change.
Suggested fix: Rename the field (e.g. settings_blocked_inspection_opened_ms) and add a BENCHMARKS.md entry stating that the previous gallery-nav measurement is superseded, so the scale evidence stays attributable.
Settings blocked-media inspection list has no cap or paging (web/src/main.tsx:1663; medium confidence)
{blocked.map((entity) => <li ...>)}(main.tsx:1663-1666) renders every entity returned by /api/blocked/content (main.tsx:191-192) as a list item with its own Browse button; the only bound is CSS (max-height: 25rem; overflow: autoin web/src/style.css). The scale fixtures in BENCHMARKS.md contain 2,337 blocked entities (line 80/83) and 3,000 populated blocked entities (lines 145/161/184), and the benchmark now opens this list (scripts/benchmark-browser-interaction.mjs:145-152). Separately,blockedMapis rebuilt from the fullblockedarray on each render of the blocked-category handler (main.tsx:1632).Impact: On the existing scale fixtures this adds thousands of DOM nodes and buttons to Settings, in the area CUR-09 gates for usability at 1,283+ rows; the cost is not measured by any supplied check.
Suggested fix: Reuse the existing collapsible/paginated pattern (counts plus a 'Load more' control) or cap the inspection list to the top N entities by media_count with an explicit 'showing N of M' note, and hoist the blockedMap construction out of the per-render closure.
Tests and validation
Questions
Review limitations
Diff coverage
CHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Response to AI review feedback (commit
a739e5e)All findings from the latest automated review have been addressed:
Client-side review state synchronization on follow/block (Important finding):
toggleEntityFollow,bulkEntityFollow, andupdateBlockedEntityStateinweb/src/main.tsxto setis_review: falselocally for users when followed or blocked.reviewFilter === 'reviewed'so followed or blocked users leave the review list immediately, keeping client UI synchronized with the server's CUR-12 clearing.Review card state visibility and action alignment (Suggestion):
web/src/primary-views.tsx, displayed{user.state.replaceAll('_', ' ')}in the.entity-stateslot to present the actual lifecycle state.unblockUser) whenuser.state === 'blocked'.Strict User contract in review view (Suggestion):
is_collector: booleanandstate: stringinweb/src/primary-views.tsxUsertype, matching/api/usersentityListItemSchema.user.state === undefinedbranch in the Follow action guard.Benchmark metric naming and attributable evidence (Suggestion):
blocked_navigation_loaded_mstosettings_blocked_inspection_opened_msinscripts/benchmark-browser-interaction.mjsto accurately describe measuring the Settings blocked inspection list opening.BENCHMARKS.mdthat the previous gallery-nav measurement is superseded bysettings_blocked_inspection_opened_msfollowing the relocation of blocked inspection in 2.7.0-dev8.Settings blocked inspection scaling and list bounds (Suggestion):
blockedEntityMapconstruction out of the render loop into a top-leveluseMemoinweb/src/main.tsxfor O(1) lookups.Validation
npm run build).npm test).npm run test:schema).node scripts/browser-gallery-smoke.mjswith Chromium headless, result: passed).Automated code review
Reviewed commit:
ee12f3de8313e6372115580d8ecb8544477df130Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Static review of the 2.7.0-dev8 changes: the API-side review clearing in src/app.ts (is_review = 0 on block/follow, plus the new clearReviewFollowed path in POST /api/follows/bulk) is consistent with tests/review-lifecycle.test.mjs and with the client-side mirrors in web/src/main.tsx (toggleEntityFollow, bulkFollowEntities, updateBlockedEntityState) and web/src/primary-views.tsx. The new entity-card markup in the review view matches existing .entity-list/.entity-card/.entity-card-* rules in web/src/style.css, and the new User type fields (state, is_collector) are returned by GET /api/users (entityListItemSchema, booleanFlag-encoded). Two concrete problems remain: the relocated Settings inspection panel is hard-capped at 100 rows in an API order that puts every subreddit before every user, which breaks the benchmark's named-target lookup and shortens the measurement it replaces; and the smoke assertions no longer cover rows that gained a second button. No tests, benchmarks, or browser runs were executed; suite results quoted in the PR text are unverified.
Blocking findings
None.
Important findings
The lookup searches rendered
.blocked-media-list linodes forfixture_blocked_user_00001, but the panel renders onlyblocked.slice(0, 100)(web/src/main.tsx:1675) and GET /api/blocked/content returns rowsORDER BY type, name(src/app.ts:1120), so 'subreddit' rows precede every 'user' row. The fixture used for this scale evidence creates 1,000 blocked subreddits and 2,000 blocked users, each with one retained media item (scripts/augment-blocked-fixture.mjs:15-16 defaults), so all 1,000 rendered rows are subreddits and the optional chain yields undefined; the?? document.querySelector('.blocked-media-list button')fallback then clicks a subreddit row. Separately, the newsettings_blocked_inspection_opened_mswaits only fordocument.querySelector('.blocked-media-list button') !== null(line 149), i.e. the first row of a 100-row list, whereas the removedblocked_navigation_loaded_mswaited for allblockedEntities + 1nav buttons.Impact:
blocked_review_action_to_render_msno longer measures the named blocked user that BENCHMARKS.md attributes the 45 ms figure to, and no measurement any longer covers rendering the full 3,000-blocked-entity set, so the BENCHMARKS.md parenthetical claimingblocked_navigation_loaded_msis 'superseded' is backed by a different, much smaller workload.Suggested fix: Make the target selection explicit and fail loudly instead of falling back (throw if
fixture_blocked_user_00001is not among the rendered rows), and either raise/remove the 100-row cap or add a measurement that waits for the expected row count before declaring the old metric superseded in BENCHMARKS.md.Suggestions
Settings blocked-media inspection is capped at 100 rows and, at the documented scale, shows no blocked users at all (web/src/main.tsx:1675; high confidence)
The new
blocked-content-inspectiondetails element rendersblocked.slice(0, 100)and, when truncated, appends only an informational rowShowing 100 of {blocked.length} entities(main.tsx:1679); there is no search box, cursor, or paging control.blockedis the full un-paged array from GET /api/blocked/content, orderedORDER BY type, name(src/app.ts:1120). With the fixture's 1,000 subreddits and 2,000 users (scripts/augment-blocked-fixture.mjs:15-16), the 100 rendered rows are all subreddits, while the summary text reports the full counts ({blocked.length} entities, all entity-media references). The deleted gallery nav rendered every blocked entity (blocked.map(...)).Impact: The panel's own header counts disagree with what is rendered, and at the Q-02/CUR-03 scale no blocked user's media can be inspected or browsed from this panel; the Browse affordance for entities beyond the first 100 is only reachable through the separate Settings blocked lists (which now add a Browse button at main.tsx:1659), so CUR-03's 'dedicated blocked-content browser ... for selected blocked users/subreddits' is preserved only by a different, less discoverable path.
Suggested fix: Make the panel complete or navigable rather than prefix-truncated: reuse the collapsible/paginated blocked-list machinery already used for the CUR-09 lists, or add a search/cursor control; if a cap is kept, order it so both entity types are represented and state the ordering in the summary.
CUR-09 row assertion checks only the first button, which is no longer 'Unblock' for rows with retained media (scripts/browser-gallery-smoke.mjs:452; medium confidence)
The assertion inspects only
document.querySelector('.blocked-category[data-type=user] .blocked-list li')and requiresrow.querySelector('button').textContent === 'Unblock'. The changed Settings list now inserts aBrowsebutton beforeUnblockwhenever the entity appears inblockedEntityMap(web/src/main.tsx:1659). In this fixture the first row by name sort isu/alpha(asserted at line 451), which is not returned by /api/blocked/content, so the assertion passes without exercising the mixed case; the 1,303-row scale check (lines 460-473) adds onlyblockedtable entries forscale_*names with no media, so no Browse button is exercised at scale either.Impact: The 'each row clearly separates its name, block date and Unblock control' evidence and the 1,303-row scale check do not cover rows that gained a second button, so a per-row button-order or layout regression in populated rows would not be caught.
Suggested fix: Extend the assertion to a row whose entity has retained media (the fixture's
u/blocked, asserted with 5 files earlier in the same script) and locate the Unblock control by text/identity rather than by 'first button', and include at least one media-bearing entity in the large-blocked scale fixture.unblockUser hardcodes the resulting state as 'seen' instead of using the state the API returns (web/src/primary-views.tsx:195; medium confidence)
unblockUsercalls DELETE /api/blocked and then applies{ ...item, state: 'seen' }to the review card, discarding the response body. The same endpoint returns the restored state (setUnblockedreturns{ ok, state }; src/app.ts:1277 route, and web/src/main.tsx:1207 usesconst result = await api('DELETE', '/api/blocked', ...) as { state: string }thenupdateBlockedEntityState(name, type, result.state)). The review card renders this value as<span className="entity-state">{user.state.replaceAll('_',' ')}</span>(primary-views.tsx review card markup).Impact: A review-marked user in
newormarked_for_deletionstate that is unblocked from the review card displays the wrong lifecycle label until the list is re-fetched, weakening the CUR-02 'expose state' evidence for the new card.Suggested fix: Use the state returned by DELETE /api/blocked when updating the card, mirroring main.tsx:1207.
Tests and validation
Questions
clearReviewFollowedrun's.changesare discarded, so such a value is reported asadded: 0, skipped: 1even though the request did changeis_review; tests/review-lifecycle.test.mjs asserts only statusCode 200 and the resulting is_review.blockedstate at all? The new card renders an Unblock action foruser.state === 'blocked', and openUserSlideshow routes those users through /api/blocked/content/user/:id/media, but CUR-12/CUR-13 wording only describes review-list actions on users being triaged.blocked-content-inspectionpanel be ordered or filtered so that blocked users are reachable, given /api/blocked/content returns subreddits first (src/app.ts:1120) and the panel is capped at 100 rows?Review limitations
Diff coverage
BENCHMARKS.md: reviewed — included in a context-limited batchCHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Response to AI review feedback (commit
ee12f3d)All findings from the automated review have been addressed:
Benchmark blocked-user lookup & complete list rendering (Important finding):
web/src/main.tsx, removed the 100-slice cap so all blocked entities pending purge are rendered indetails.blocked-content-inspection, ensuring blocked users are present and inspectable.scripts/benchmark-browser-interaction.mjs, updatedsettings_blocked_inspection_opened_msto wait for allblockedEntitiesrows (.length >= ${blockedEntities}).fixture_blocked_user_00001and throwing immediately if missing or lacking a Browse button, without falling back to a subreddit.Full blocked list completeness in Settings (Suggestion):
Smoke assertions for media-bearing rows and Unblock/Browse button layout (Suggestion):
scripts/browser-gallery-smoke.mjsto assert layout, column-gap, time, and button sequence for bothu/alpha(singleUnblockbutton) andu/blocked(Browsefollowed byUnblock).u/blocked(a media-bearing entity in the scale list) retains bothBrowseandUnblockbuttons in the correct order.Accurate lifecycle state restored on
unblockUser(Suggestion):web/src/primary-views.tsx, updatedunblockUserto readresult.statefrom theDELETE /api/blockedresponse ({ ok: boolean; state: string }), ensuring the restored state (new,seen, etc.) is accurately displayed.Validation
npm run build).npm test).npm run test:schema).node scripts/browser-gallery-smoke.mjswith Chromium headless, result: passed).Automated code review
Reviewed commit:
2587233ae7719c434f0be40ddee942ca6a273d1fVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The API-side review clearing is coherent:
setBlocked(src/app.ts:1169/1171),POST /api/follows(src/app.ts:2799/2801) andPOST /api/follows/bulk(src/app.ts:2842 plus theclearReviewFollowedupdate at 2845) resetis_review = 0for users, including already-blocked/already-followed ones, and/api/blocked/bulk(src/app.ts:1303) reusessetBlocked, sotests/review-lifecycle.test.mjsand the new/api/blocked/contentcase intests/blocked.test.mjscover the routes that changed. The client mirrors this intoggleEntityFollow, the bulk-follow branch andupdateBlockedEntityState, andFavouritesViewremoves the card after follow/block. The relocated Settings inspection (details.blocked-content-inspection,.blocked-media-list,browseBlockedEntity,blocked-inspection-banner/selectedOrigin) is wired in a consistent order (switchViewbeforesetSelected/setSelectedOrigin),'settings'is a validView, the galleryh2still rendersBlocked <type>: <name>for the benchmark's wait condition, andnav[aria-label="Gallery views"]now has exactly one remaining reference, the updated negative smoke assertion. The version metadata is also self-consistent with VERSIONING.md: a feature branch carried2.6.0-dev7, and dev is required to advance beyond the current dev serial, which is why the merge lands at2.7.0-dev8and both changelog entries are kept. The defects I can evidence are a client-state staleness path for the new Settings panel, an over-broad entity filter introduced with the review-state filtering, and missing evidence for the new benchmark metric and the new slideshow handler.Blocking findings
None.
Important findings
blockUser/unblockUser/followUser(primary-views.tsx:165-198) call/api/blockedand/api/followsdirectly and only mutatesetUsers; they never notify the App component. The new Settings panel renders from App'sblockedstate (main.tsx:1669-1680blocked.length > 0 && <details className="blocked-content-inspection">,blocked.map(...)), and that state is populated only by the one-shotuseEffect (...) , []at main.tsx:220-221, by the gallery-only poller at main.tsx:229 (if (view !== 'gallery') return;), and byrefreshBlockedContent()at main.tsx:1194/1209 inside App's ownblockEntity/unblockEntity. The Settings fetch batch at main.tsx:270-277 loads/api/blockedand/api/blocked/purgebut not/api/blocked/content. So review-view -> Settings with no intervening gallery visit renders the pre-action list; the same map feeds theBrowsebuttons added to the.blocked-categoryrows (main.tsx:1146-1152).Impact: Blocking a user from the Users-to-review view leaves that user absent from the Settings inspection list and from the
.blocked-categoryBrowse affordance; unblocking from the review view leaves the entity listed, and itsBrowsebutton callsbrowseBlockedEntity, which routes the gallery to/api/blocked/content/<type>/<id>/media- a route that returns 404 whenstate !== 'blocked'(src/app.ts:1132), surfacing as an error instead of media.Suggested fix: Have the review-view actions refresh the shared state (e.g. route them through App's
blockEntity/unblockEntity/toggleEntityFollow, or callrefreshBlockedContent()plus/api/blockedand/api/blocked/purgeafter a successful action), or fetch/api/blocked/contentwhen entering the settings view so the inspection panel and its Browse buttons are never served from a superseded list.Suggestions
New review-state filter is applied to the whole entity list, not just the acted row (web/src/main.tsx:548; medium confidence)
toggleEntityFollownow ends with.filter((item) => reviewFilter === 'all' || item.is_review === (reviewFilter === 'reviewed'))(main.tsx:548), and the bulk-follow path adds the same filter over all rows (main.tsx:631).reviewFilteris App state (main.tsx:144) changed only by theselect[aria-label="Review status"]that is rendered forview === 'users'(main.tsx:1398), andswitchView(main.tsx:936-948) does not reset it, while the entity fetch applies thereviewparameter only for users (main.tsx:379/874). ContrastupdateBlockedEntityState(main.tsx:1147-1152), which guards the row by name first and therefore only affects the acted entity.Impact: With
reviewFilterleft at 'reviewed' on /users and then acting in the subreddits view, every subreddit row hasis_reviewfalse (src/app.ts:1818 returns'0'for subreddits), so the filter drops the entire subreddit list from the DOM after a follow or block, rather than only the affected row.Suggested fix: Scope the removal to the rows whose state actually changed (as
updateBlockedEntityStatedoes), or resetreviewFilterto 'all' inswitchViewwhen leaving the users view.The new slideshow handler has no automated coverage beyond button presence (scripts/browser-gallery-smoke.mjs:590; medium confidence)
The review-flow assertions stop at button presence (
some(node => node.textContent === 'Slideshow')) and then clickrow.querySelector('button.primary'), i.e. the Browse button, waiting for the gallery user filter.openUserSlideshow(web/src/main.tsx:698-717) and theonSlideshowUserwiring (main.tsx:1308, primary-views.tsx:230) are referenced nowhere else in the repository (grep over the checked-out tree returns only these three source sites plus the REQUIREMENTS-TRACE note), so no test or smoke step exercises the/api/blocked/content/user/<id>/mediavs/api/media?user=branch selection or the.slideshowpanel it produces.Impact: A wrong base URL for a review-marked user, an empty page, or a broken
onSlideshowUserwiring would pass the supplied checks while CUR-13 ('launch full-screen slideshow browsing directly for that user's media') is unverified.Suggested fix: Add a step to the review flow that clicks the Slideshow button and waits for
document.querySelector('.slideshow')with that user's media, and record the run in the CUR-13 row of REQUIREMENTS-TRACE.md alongside the existing 'Awaiting live test' note.BENCHMARKS.md supersedes a metric without recording the replacement (BENCHMARKS.md:161; medium confidence)
The paragraph still reports the gallery-nav figures as the current scale evidence ('the complete blocked navigation after 312 ms'), while scripts/benchmark-browser-interaction.mjs no longer emits
blocked_navigation_loaded_ms: it now navigates to /settings, opensdetails.blocked-content-inspection, waits fordocument.querySelectorAll('.blocked-media-list li').length >= ${blockedEntities}and emitssettings_blocked_inspection_opened_ms(line 243). No value for that key appears anywhere in the supplied material.Impact: The scale evidence for blocked inspection is the superseded gallery-nav measurement; the relocated inspection path that the script now measures has no recorded run, so the 3,000-entity fixture result for the new single
.blocked-media-list(CSS caps it atmax-height: 25rem; overflow: auto, web/src/style.css) is unrecorded.Suggested fix: Run the browser benchmark on the fixture and record
settings_blocked_inspection_opened_ms(andblocked_review_action_to_render_msfor the new Settings entry point) in place of, or beside, the superseded gallery-nav numbers.Tests and validation
Questions
setBlockedListandsetPurgePreview(as App'sblockEntity/unblockEntitydo at main.tsx:1163/1195/1211), so the adjacent Settings blocked-category counts and the purge preview stay correct after a review-list action?.blocked-media-listacceptable at the 3,000-entity fixture, or should the Settings inspection reuse the collapsible/sorted.blocked-categorystructure that CUR-09 requires for 1,283+ rows?Review limitations
2.6.0-dev7changelog entry and the2.6.0-dev6->2.7.0-dev8jump are assessed only against VERSIONING.md ('Concurrent work branches must resolve version/changelog conflicts and advance beyond the current dev version'; 'Preserve changelog entries from both branches'), which explains them;scripts/version.py check_alignmentonly asserts an entry exists for the current version (line 96) and does not order-check the history.useEffectdependency arrays in web/src/main.tsx (lines 220-221, 229-233, 270-277); I read them in the checked-out tree rather than in the diff, and did not inspect the worker's own entity-state updates, which are outside the changed files.Diff coverage
BENCHMARKS.md: reviewed — included in a context-limited batchCHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Response to automated review on commit
25872331. Review-view Block/Unblock synchronization with Settings blocked inspection
FavouritesView'sfollowUser,blockUser, andunblockUserthrough newonFollowUser,onBlockUser, andonUnblockUserprops wired directly to App'stoggleEntityFollow,blockEntity, andunblockEntityinweb/src/main.tsx.blockEntityandunblockEntityinvokerefreshBlockedContent()and update purge previews./api/blocked/contentto thePromise.allbatch inmain.tsxforview === 'settings'to ensure blocked inspection content is never stale when entering Settings.unblockUserfromunblockEntity.2. Review filter scoping
toggleEntityFollow, scopedreviewFilterfiltering to the specific acted row (if (item.name !== name) return [item]), preventing cross-entity removal (such as dropping subreddit rows when acting in subreddits).bulkEntityFollow, scopedreviewFilterfiltering strictly to selected rows (if (!selectedEntityIds.includes(item.id)) return [item]).switchView, resetreviewFilterto'all'.3. Automated coverage for review card slideshow
scripts/browser-gallery-smoke.mjsto click theSlideshowbutton for the review user card, wait fordocument.querySelector('.slideshow') !== null, close the slideshow via the close button, and wait fordocument.querySelector('.slideshow') === null.REQUIREMENTS-TRACE.md(CUR-13 row and summary) with the test evidence.4. Benchmark metric clarification
BENCHMARKS.mdthat the historical 312 ms measurement applied to the gallery navigation under earlier versions, while in2.7.0-dev8scripts/benchmark-browser-interaction.mjsmeasuressettings_blocked_inspection_opened_msandblocked_review_action_to_render_ms. Recorded that re-measuring on the augmented 3.5M fixture will be performed on the benchmark host.Validation evidence
npm run build: Passed cleanly, Vite bundle and OpenAPI regenerated.npm test: 217/217 tests passing.npm run test:schema: 60/60 tests passing.scripts/browser-gallery-smoke.mjs: Passed cleanly in headless Chromium.scripts/version.py check --branch dev: Verified alignment on2.7.0-dev8.Automated code review
Reviewed commit:
9c8640b7bd38e8babc80a26779d65ac657afba9cVerdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
The supplied changes move blocked-content inspection from the gallery nav into Settings, add CUR-12 review-marker clearing on follow/block in src/app.ts, and rebuild the Users-to-review list as .entity-card markup with Slideshow/Follow/Block/Unblock actions. The new tests (tests/review-lifecycle.test.mjs, tests/blocked.test.mjs) and the updated smoke/benchmark scripts exercise the changed API and UI selectors. Three concrete consistency gaps are visible in the checked-out code: the client-side bulk-follow path drops rows from the Users list that the server did not modify; the create-or-follow path (POST /api/users) still sets state='followed' without clearing is_review, so the new CUR-12 invariant is not enforced at every entry point; and the new openUserSlideshow resolves blocked-media routing from a client-side list that is never loaded in the review view. Live-browser acceptance for CUR-12/13/14 and the re-measured benchmark figures are recorded as pending.
Blocking findings
None.
Important findings
Bulk follow drops Users rows from the client list that the server did not modify (web/src/main.tsx:632; medium confidence)
In bulkEntityFollow,
const nextIsReview = follow && view === 'users' && !item.is_collector ? false : item.is_review;is computed for every selected row, and the review-filter dropif (view === 'users' && reviewFilter !== 'all' && nextIsReview !== (reviewFilter === 'reviewed')) return [];runs before the state guards at lines 635-638, which only apply the change to rows in state 'new'/'seen'/'followed'. The server in src/app.ts:2840-2846 only clears review forstate IN ('new','seen') AND is_collector = 0plus the already-'followed' fallback, so a selected blocked or marked-for-deletion user (reachable with entityStateFilter 'all'/'blocked' combined with the 'Review status' select at main.tsx:1412, and reachable because POST /api/users/:user/review at src/app.ts:3044 sets is_review=1 regardless of state) is removed from the client entity list while its is_review is unchanged in the database.Impact: After 'Follow selected' on a Users list filtered by review status, blocked or marked-for-deletion rows are silently dropped from the displayed list even though the server left them in review; they reappear on the next list refresh, so the client and server disagree about which users are in the review triage state.
Suggested fix: Compute the review-filter drop only for rows whose state predicate matches the server's update (state 'new'/'seen'/'followed' and not a collector), or re-read the affected rows from /api/users after the bulk call instead of predicting the outcome client-side.
Create-or-follow path still leaves a followed user marked for review (src/app.ts:1895; medium confidence)
The change adds
is_review = 0to the UPDATEs inPOST /api/blocked(src/app.ts:1169),POST /api/follows(src/app.ts:2799) andPOST /api/follows/bulk(src/app.ts:2842), butregisterEntityCreation(the handler forPOST /api/users, reached from the Users view 'Add user' form with the 'Follow for future rips' checkbox at web/src/main.tsx:1371-1376) still runsUPDATE ${table} SET state='followed',followed_at=COALESCE(...),state_updated_at=...,updated_at=... WHERE id=?with nois_reviewreset, andPOST /api/curation/import(src/app.ts:2396) does the same.POST /api/users/:user/review(src/app.ts:3044) setsis_review = 1regardless of state, so a followed user can legitimately holdis_review = 1.Impact: A user already marked for review who is followed through the create-or-follow form (or restored as followed by curation import) stays in the 'Users to review' list and in
GET /api/users?review=truewhile already being followed, contradicting the CUR-12 statement in REQUIREMENTS.md that review is an active triage state alongside lifecycle states; the review card then offers Block/Unreview but no Follow for an already-followed user.Suggested fix: Apply the same
is_review = 0reset in the followed branch ofregisterEntityCreation, decide explicitly whetherPOST /api/curation/importshould preserve or clear imported review markers, and extend tests/review-lifecycle.test.mjs to cover the create-or-follow entry point.Review-card Slideshow resolves blocked-media routing from a list that is not loaded in the review view (web/src/main.tsx:706; medium confidence)
openUserSlideshow(name)chooses/api/blocked/content/user/<id>/mediaonly when it finds the user in the client-sideblockedstate (blocked.find((item) => item.type === 'user' && ...)). That state is populated only by the view-gated loadersif (view !== 'gallery') return;(main.tsx:229-241) andif (view !== 'settings') return;(main.tsx:266-273), plus refreshBlockedContent calls in gallery paths; nothing loads it in the review view, which is a direct, refreshable route (nav[aria-label="Primary views"] a[href="/review"]). /api/media excludes media of blocked users (src/app.ts:139-140), so the fallback/api/media?user=returns nothing and the handler reportsNo visible media for ${name}. The review card explicitly renders blocked users (user.state === 'blocked' ? Unblock : Blockin web/src/primary-views.tsx) and enables the Slideshow button wheneveruser.media_count !== 0.Impact: On a direct visit to /review, Slideshow on a blocked user marked for review shows an error instead of launching the full-screen slideshow over that user's blocked media, so CUR-13's smoke-test pass (which reaches /review only after visiting Settings and Gallery) does not cover the direct-route case.
Suggested fix: Derive the blocked case from the entity's own
state(already available in the review card's User type) rather than the client-sideblockedlist, or load /api/blocked/content for the review view, and add a direct /review slideshow case to scripts/browser-gallery-smoke.mjs.Suggestions
None.
Tests and validation
Questions
## 2.6.0-dev7section while VERSION and package.json move directly from 2.6.0-dev6 to 2.7.0-dev8; should the blocked-inspection relocation be recorded under 2.7.0-dev8, since the dev branch never carried 2.6.0-dev7?settings_blocked_inspection_opened_ms'will be performed on the benchmark host'; is the published figure expected to stay as-is until that run happens, or is the renamed metric meant to supersede it in the same paragraph?Review limitations
Diff coverage
AGENTS.md: reviewed — included in a context-limited batchBENCHMARKS.md: reviewed — included in a context-limited batchCHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Response to automated review on commit
9c8640b1. Bulk follow review filter scoping
web/src/main.tsx(bulkEntityFollow), guardedreviewFilterfiltering so it only drops rows that are actually follow-eligible and updated by the server (!item.is_collector && (['new', 'seen'].includes(item.state) || item.state === 'followed')). Unmodified rows (such as blocked or marked-for-deletion users) remain in the client list unchanged.2. Create-or-follow and curation import review clearing
src/app.ts, updatedregisterEntityCreation(POST /api/users) to resetis_review = 0when following an existing user.src/app.ts, updatedPOST /api/curation/importto resetis_review = 0when importing users with desired statefollowed.tests/review-lifecycle.test.mjswith test assertions verifying that bothPOST /api/users(create-or-follow) andPOST /api/curation/import(importing followed users) clear existing review markers.3. Review-card Slideshow for blocked users on direct
/reviewrouteweb/src/primary-views.tsx, updated the review card'sonSlideshowUserinvocation to passuser.state === 'blocked'anduser.id.web/src/main.tsx, updatedopenUserSlideshowto acceptisBlockedandentityId, with fallback lookup to ensure the/api/blocked/content/user/:id/mediaroute is chosen even when navigating directly to/review.web/src/main.tsx, added a view-changeuseEffectwhen enteringview === 'review'to fetch/api/blocked/content.scripts/browser-gallery-smoke.mjs, added a direct navigation to/reviewwith a blocked user marked for review, testing that its Slideshow button opens the full-screen slideshow and closes cleanly.Validation evidence
npm run build: Built successfully, client bundle and OpenAPI generated.npm test: 217/217 passed.npm run test:schema: 60/60 passed.scripts/browser-gallery-smoke.mjs: Passed cleanly in headless Chromium including the direct/reviewblocked user slideshow test.scripts/version.py check --branch dev: Verified alignment on2.7.0-dev8.Code review — MR #25
Reviewed commit:
4c5b4e9130Verdict: Requires further work
Reviewed against .forgejo/ai-review.md, AGENTS.md and the MR diff targeting dev. The three findings from the previous automated review are addressed in this head. Three additional UI consistency defects remain.
Blocking findings
None.
Important findings
Failed Follow removes the user from the review list
Location: web/src/primary-views.tsx:170–179; web/src/main.tsx:1337
Confidence: High
The onFollowUser callback delegates to toggleEntityFollow, which catches API errors without rethrowing or returning a failure result. FavouritesView therefore treats the resolved callback as success and removes the card.
Reproduced in Chromium by returning HTTP 503 for POST /api/follows: the error appeared and the card disappeared, while GET /api/users still returned state="seen", is_review=true.
Suggested correction: propagate failure through the callback and remove the card only after confirmed success. Add a browser regression asserting that a failed Follow retains the card and its retry action.
Failed Unblock changes the card to an unblocked state
Location: web/src/primary-views.tsx:200–214
Confidence: High
App.unblockEntity returns null on failure. FavouritesView.unblockUser ignores that failure and applies its default state="seen". The card replaces Unblock with Follow/Block even though the server still considers the user blocked.
Reproduced in Chromium by returning HTTP 503 for DELETE /api/blocked: the card displayed "seen" and offered Follow, while GET /api/users returned state="blocked".
Suggested correction: return immediately when the callback returns null, or propagate the error. Update the card only when an authoritative state is returned. Add a browser regression for failed Unblock.
Following from the new slideshow leaves a stale review card
Location: web/src/primary-views.tsx:249; web/src/main.tsx:1333–1339
Confidence: High
The slideshow opens over the mounted FavouritesView. Its Follow action updates the server and App state, but FavouritesView keeps its independent users array and receives no refresh signal when the slideshow closes.
Reproduced in Chromium: open Slideshow for a review-marked user, click Follow user, then close. The card remains with state="seen" and a Follow button, while the API returns state="followed", is_review=false. This makes a completed CUR-12 triage action appear unfinished.
Suggested correction: synchronize review-list data after slideshow curation, for example through a revision prop or shared state. Add a browser regression covering Follow → close slideshow → card absent.
Validation
Independently passed:
Current-head CI:
The latest posted automated review targets the preceding commit,
9c8640b; it does not establish readiness for this head.Limitations
CUR-12, CUR-13 and CUR-14 still await user live acceptance in REQUIREMENTS-TRACE.md. The production-scale browser benchmark was not rerun. Passing package and smoke checks do not cover the defects reproduced above.
Automated Review Follow-up & Remediation
Addressed all three review findings on review view card actions and slideshow synchronization:
Failed Follow retention:
FavouritesView.followUserto checkconst ok = await onFollowUser(name); if (!ok) return;instead of unconditionally removing the user card.toggleEntityFollowinweb/src/main.tsxto returntrueon success andfalseon failure.POST /api/followsfails, the user card remains visible with theFollowbutton available for retry.Failed Unblock retention:
FavouritesView.unblockUserto only update card state when an authoritative non-null state is returned (if (!returnedState) return;/ fallbackif (!result.state) return;).DELETE /api/blockedfails, the user card retains itsblockedstate and theUnblockbutton remains available.Slideshow Follow synchronization with review list:
revision?: numberprop toFavouritesViewwired intouseEffectdependencies[mode, sort, revision].web/src/main.tsx, incrementedgalleryRevisionupon closing the slideshow (onClose={() => { setSlideshow(null); setGalleryRevision((r) => r + 1); }}) as well as intoggleEntityFollow/followMediaUser./api/users?review=true, synchronizing the review list and removing the followed user card.Verification & Evidence
scripts/browser-gallery-smoke.mjs):POST /api/followswith simulated 503: confirmed user card remains visible andFollowaction remains clickable.DELETE /api/blockedwith simulated 503: confirmed user card retainsblockedstate andUnblockaction remains clickable.result: "passed").npm test: 217 passing tests.npm run test:schema: 60 passing tests.python3 scripts/version.py check --branch dev: aligned at2.7.0-dev8.npm run buildsucceeded without manual openapi edits.Code review follow-up — MR #25
Reviewed commit:
c12947acab85152fd3fa8fbe85df2b0d80681552Compared with previously reviewed commit:
4c5b4e913005f0d259f4e2b04d0f6033e8648cbcVerdict: Requires further work
Previous findings
All three previous findings are addressed:
The updated Chromium smoke test passed, including all three regression scenarios.
Blocking findings
None.
Important findings
[P2] Closing any slideshow now clears gallery selections and reshuffles Random browsing
Location:
web/src/main.tsx:1848(also the new revision increments at lines 564 and 609)Confidence: High; independently reproduced in Chromium.
The new shared slideshow
onClosealways incrementsgalleryRevision, including when the slideshow was opened from the ordinary gallery and no curation action occurred. The gallery effect at lines 400–455 responds by clearing media, selected media IDs and the pagination cursor, then requesting a fresh first page. For Random sorting, the new request has no cursor and therefore receives a new random seed.Reproduction:
Observed in the disposable browser fixture: selected count changed from 1 to 0; the first media IDs changed from
37,74,2,111,39to97,25,62,99,27. A separate pagination probe confirmed a fresh first-page request on closing an unchanged slideshow. I did not establish a persistent scroll-position loss, so I am not claiming one.This refresh was added to synchronize the review list, but its shared gallery revision also resets unrelated gallery browsing. Use a separate revision for FavouritesView/review data, or scope the refresh to the view/data actually changed. Preserve the ordinary gallery's current seed, cursor, loaded items and selections when closing an unchanged slideshow. Add a regression covering Random order and selection retention across open → close.
Required repository housekeeping
The correction commit changes three implementation/test files but leaves VERSION, package.json and CHANGELOG.md at
2.7.0-dev8. AGENTS.md and VERSIONING.md require each completed development update to advance the dev serial throughscripts/version.py. Before the next push, run the appropriate fix bump (currently this would advance to2.7.0-dev9, subject to concurrent development) and retain aligned metadata.REQUIREMENTS-TRACE.md also remains unchanged by this correction. Record the new browser regression evidence and its remaining acceptance limits there, including failing-before/passing-after evidence required by AGENTS.md. The version alignment check passes because it checks existing alignment; that does not demonstrate a per-update bump occurred.
Validation
Independently passed on this head:
nix build --no-link --print-build-logs .#redview, including 217/217 Node tests, 60/60 Python tests and installation checks.npm run build.scripts/browser-gallery-smoke.mjs.python3 scripts/version.py check --branch feature/review-and-blocked-inspection.git diff --check.Additional disposable Chromium probes reproduced the new selection/Random-order regression and confirmed the extra gallery reload after slideshow close.
Current-head CI at posting:
Review limits
This follow-up inspected all three files changed by the latest push and their affected gallery/review/slideshow paths, building on the preceding full-MR review. CUR-12/13/14 still await user live acceptance; the production-scale browser benchmark was not rerun. No tracked files were changed, and no merge or push was performed.
Response to Code Review Follow-up (commit
c12947a)Addressing all findings and repository housekeeping from review follow-up #3544:
Preserve gallery browsing state, selection, and Random ordering across slideshow close (Important finding):
reviewRevisionstate inweb/src/main.tsx, passed specifically to<FavouritesView revision={reviewRevision} />.Slideshow.onClosetosetSlideshow(null)so opening and closing an unchanged slideshow does not triggergalleryRevisionor reload gallery data.setGalleryRevisionfromtoggleEntityFollowandfollowMediaUser, directing user follow invalidation exclusively toreviewRevision.reviewRevisionbumps to entity curation handlers (blockEntity,unblockEntity,reviewMediaUser,bulkEntityFollow,bulkUserReview,toggleMediaFavourite,deleteMedia) to keepFavouritesViewand review cards synchronized while isolating the media gallery.scripts/browser-gallery-smoke.mjsverifying that selecting a media card and opening/closing an unchanged slideshow underRandomsorting preserves the selection count and exact media ordering without requesting a new random seed.Repository housekeeping & metadata alignment:
2.7.0-dev8to2.7.0-dev9viapython3 scripts/version.py bump fix --note "Preserve gallery browsing on slideshow close and scope review synchronization". AlignedVERSION,package.json, andCHANGELOG.md.REQUIREMENTS-TRACE.md.Validation Evidence
scripts/browser-gallery-smoke.mjs): Passed cleanly in headless Chromium (result: "passed"), verifying selection retention, Random ordering preservation, review-card retry on failed Follow/Unblock, and slideshow follow review removal.npm test): 217/217 passed.npm run test:schema): 60/60 passed.npm run build): Rebuilt cleanly without manual openapi edits.python3 scripts/version.py check --branch dev): Clean at2.7.0-dev9.Code review follow-up — MR #25
Reviewed commit:
a7fdd7eec98972a705cf189bf9cda93095a654ff(2.7.0-dev9)Compared with previous reviewed head:
c12947acab85152fd3fa8fbe85df2b0d80681552Verdict: Requires further work
Previous findings
The previous gallery reset regression is fixed. An independent Chromium probe verified that an unchanged slideshow preserves both the selected card and the same Random order after closing, including after waiting for asynchronous work to settle.
The version bump, aligned changelog/package metadata and REQUIREMENTS-TRACE.md update are present. The earlier failed Follow, failed Unblock and review-card synchronization regressions remain covered by the passing browser smoke test.
Blocking findings
None.
Important findings
[P2] Following clears server review state but leaves the slideshow and review-filtered gallery stale
Location:
web/src/main.tsx:601–613, especially the narrowed refresh at line 612; affected slideshow handler:web/src/slideshow.tsx:197–202Confidence: High; independently reproduced in Chromium.
The separate review revision correctly refreshes FavouritesView, but followMediaUser only updates entity state and the followed-user set. It does not clear the corresponding local
is_review/is_user_reviewflags or reconcile media that no longer match the active Review filter. Slideshow also keeps its own items array and does not clear its review flags after a successful Follow. Closing the slideshow now correctly avoids an unconditional gallery reload, which means that stale gallery membership persists.Reproduction on this head:
visiblefor review.Remove review: visible.Gallery (125), whileGET /api/media?review=truereturnstotal: 0.Impact: a completed triage action leaves media in a filter they no longer match, and the slideshow's review toggle acts on stale state. Its next review action removes an already-cleared marker instead of offering Review later.
Suggested correction: on successful follow, clear review flags for the affected user in relevant entity/media and slideshow state. If the active gallery filters on review, reconcile those items, counts and pagination with the new membership. Preserve unrelated Random order, selections and loaded pages; do not restore the unconditional refresh on slideshow close. Add browser coverage for Follow from a review-filtered gallery/slideshow, asserting both the updated review action and gallery membership after closing.
Validation
Independently passed on this head:
nix build --no-link --print-build-logs .#redview: 217/217 Node tests, 60/60 Python tests, and installation checks.npm run build.scripts/browser-gallery-smoke.mjs.git diff --check.A separate disposable Chromium probe reproduced the remaining review-state inconsistency above. The existing smoke test follows from the Users to review view and checks the resulting card list; it does not cover this Review-filtered gallery case or the slideshow's review button after Follow.
Current-head CI: branch/package checks and cache build succeeded; automated review is pending.
Review limits
Reviewed all six files changed by the latest push and the affected follow/review/gallery/slideshow paths, building on the preceding full-MR review. CUR-12/13/14 user live acceptance and the production-scale benchmark remain pending. No tracked files changed; no push or merge performed.
Response to Code Review Follow-up (commit
a7fdd7e)Addressing review finding regarding slideshow review action synchronization and review-filtered gallery reconciliation:
Slideshow review action synchronization:
web/src/slideshow.tsx(toggleFollowUser), whenonFollowUsersucceeds for a user being followed (!following), all slideshow items for that user haveis_user_reviewupdated tofalse.Remove review: <user>toReview later: <user>, keeping the in-slideshow triage state accurate and preventing subsequent actions on stale review state.Review-filtered gallery reconciliation:
web/src/main.tsx, addedclearUserReviewMedia(userName)invoked byfollowMediaUser,toggleEntityFollow, andbulkEntityFollow.filterReviewis active, following a user clears their matching media rows, reconcilesselectedMediaIds, updatesnextCursor, and queries the authoritative server total via/api/media?review=true&limit=1(emptying the gallery toGallery (0)when no items remain).filterReviewis inactive,clearUserReviewMediaupdatesis_user_review: falsein place on loaded media without removing items, clearing selections, resetting cursors, or altering Random order.Repository housekeeping & version bump:
2.7.0-dev9to2.7.0-dev10viapython3 scripts/version.py bump fix --note "Reconcile slideshow review state and review-filtered gallery on follow". AlignedVERSION,package.json, andCHANGELOG.md.REQUIREMENTS-TRACE.md.Validation Evidence
scripts/browser-gallery-smoke.mjs): Passed cleanly in headless Chromium (result: "passed"), verifying:Gallery (125)).Remove review: visibleis rendered.Follow user: visibleand verifying the review button immediately updates toReview later: visible.Gallery (0)with 0 media tiles, consistent withGET /api/media?review=truereturningtotal: 0.npm test): 217/217 passed.npm run test:schema): 60/60 passed.npm run build): Rebuilt cleanly without manual openapi edits.python3 scripts/version.py check --branch dev): Clean at2.7.0-dev10.Code review follow-up — MR #25
Reviewed commit:
f8560b987fbf9082bf7ffd3aa08353897c0a08e5(2.7.0-dev10)Compared with previous reviewed head:
a7fdd7eec98972a705cf189bf9cda93095a654ffVerdict: Requires further work
Previous findings
The previous follow/review synchronization finding is addressed: slideshow Follow now clears its local review flags, and the review-filtered gallery removes the followed user's loaded media and refreshes its count. The updated browser smoke test passes its new assertions for the slideshow review button and an empty review-filtered gallery.
Version/package/changelog alignment is correct and REQUIREMENTS-TRACE.md describes the correction. The prior unchanged-slideshow preservation regression remains covered.
Blocking findings
None.
Important findings
[P2] Review reconciliation rebases pagination without resetting the page loader
Location:
web/src/main.tsx:553–561Confidence: High; two independent Chromium reproductions.
clearUserReviewMedia removes loaded cards, rebases nextCursor and increments galleryEpoch, but does not reset pageLoader or loadingMore. The page loader maintains its own completed-cursor cache and request generation independently of galleryEpoch.
Two confirmed failure modes:
A rebased cursor can equal a previously completed cursor, making Load more a permanent no-op. With 125 reviewed media split between ReviewA (newest 50) and ReviewB (older 75), load 100 cards, then follow ReviewA. The gallery correctly becomes
Gallery (75)with 50 loaded ReviewB cards. Its next offset rebases from 100 to 50, but createPageLoader remembers offset 50 as its last completed request and immediately skips it. Scrolling and manually clicking the enabled Load more button both leave only IDs 75–26 displayed; the remaining 25 matching media cannot be reached without refreshing.An in-flight page request can leave loading permanently true. Hold the second page response, follow ReviewA, then release that response. The old page loader generation still allows its callback to append the response, while loadMore's finally block refuses to clear loadingMore because galleryEpoch changed. Chromium showed 50 cards against 75 server matches with a permanently disabled
Loading…button after the request had completed.Suggested correction: invalidate/reset the page loader and its loading/error state as part of review-membership reconciliation, before applying the rebased cursor. Ensure stale page callbacks cannot append after reconciliation and that the rebased cursor can be requested again. Preserve the existing Random seed and unrelated loaded cards. Add multi-user, multi-page browser coverage for both a cursor collision and an in-flight page request; the current single-user test ends at total=0 and cannot expose these failures.
Suggestions
Use the actual unfollow route in smoke-test cleanup and check the response.
Location:
scripts/browser-gallery-smoke.mjs:296Confidence: High.
The new cleanup sends DELETE to
/api/follows/visible, but the application defines DELETE/api/followswith a JSON body containing type/value. Fetch resolves on HTTP errors, so.then(() => true)silently accepts the nonexistent route and leaves the fixture user followed. Use the defined endpoint with{ type: 'user', value: 'visible' }and assert response.ok, so later scenarios start from the intended state.Validation
Independently passed on this head:
nix build --no-link --print-build-logs .#redview: 217/217 Node tests, 60/60 Python tests and installation checks.npm run build.scripts/browser-gallery-smoke.mjs.git diff --check.Separate disposable Chromium probes reproduced both pagination failures above.
Current-head CI: branch/package checks and cache build succeeded; automated review remains pending.
Review limits
Reviewed all seven files changed by this push and the affected follow, slideshow and pagination paths, building on the earlier full-MR review. User live acceptance and production-scale benchmark remain pending. No tracked files changed; no push or merge performed.
Automated code review
Reviewed commit:
f8560b987fbf9082bf7ffd3aa08353897c0a08e5Verdict: Requires further work
Resolve the blocking or important findings and investigate failed deterministic checks before merging.
Overall assessment
Supplied evidence covers: relocation of blocked-content inspection from the gallery nav into Settings (new
/api/blocked/contentand/api/blocked/content/:type/:id/mediaconsumers, a collapsibledetails.blocked-content-inspectionlist plus per-row Browse buttons), CUR-12is_reviewclearing across the follow/block entry points insrc/app.ts, and CUR-13/CUR-14 restructuring of the review list onto the shared.entity-list/.entity-cardmarkup with a direct Slideshow action and a newreviewRevisionsignal. I traced the changed routes and callers:setBlocked(src/app.ts:1166-1180) is shared by single and bulk block,registerEntityCreation,POST /api/follows(2801) andPOST /api/follows/bulk(2844-2862, with the addedclearReviewFollowedupdate for already-followed users) all clearis_review, matching the newtests/review-lifecycle.test.mjs. Three concrete issues are visible in the changed files: a smoke-test cleanup step that calls an unregistered route, a review-list reload trigger fired by media actions reachable from the review view's own slideshow, and an unbounded Settings inspection list. I did not execute the Node/Python suites or the browser/benchmark scripts, so test-pass and timing claims are taken from the supplied documents as untrusted evidence.Blocking findings
None.
Important findings
Line 296 runs
fetch('/api/follows/visible', { method: 'DELETE' }).then(() => true).src/app.tsregisters onlyapp.get('/api/follows')(2779),app.post('/api/follows')(2789),app.delete('/api/follows')(2811, body-based{type, value}) and/api/follows/bulk(2838/2862); there is no path-parameterized/api/follows/{value}route, so the request resolves to a 404 whose result.then(() => true)discards. The next step (line 297) re-clicks the Review filter checkbox, turningfilterReviewoff, so the line 298 wait forGallery (125)passes whether or notvisiblewas unfollowed.Impact: The intended state restoration never occurs:
visiblestays followed for the rest of the run, and the following assertion does not test the follow state it appears to intend. A genuine follow-state regression in this region could pass unnoticed, and later steps that re-markvisible(e.g. line ~617) mask the leftover follow.Suggested fix: Use the registered route with its body, e.g.
fetch('/api/follows', { method: 'DELETE', headers: {'content-type':'application/json'}, body: JSON.stringify({type:'user',value:'visible'}) }), and assert the removal viafetch('/api/follows')(the pattern already used at lines 221 and 250) before re-enabling the review filter.Suggestions
Favourite/delete actions bump reviewRevision, discarding loaded review-list pages from the review view's own slideshow (web/src/main.tsx:497; medium confidence)
toggleMediaFavourite(main.tsx:493) callssetReviewRevision((r) => r + 1)at line 497 anddeleteMediadoes the same at line 517. Both are wired into the slideshow (onFavouriteat main.tsx:1902,onDeleteat 1907).reviewRevisionis passed toFavouritesViewasrevision(main.tsx:1406) and is a dependency of that component's load effect:}, [mode, sort, revision]);(primary-views.tsx:138), whose body runssetMedia([]); setUsers([]); setCursor(null); setBusy(true)(primary-views.tsx:129).openUserSlideshow(main.tsx:~776) setssetSlideshow(...)without callingswitchView, so the review card's Slideshow action (primary-views.tsx) keepsview === 'review'rendered while the slideshow is open.Impact: Favouriting or deleting media from a slideshow opened on the Users to review view re-fetches the review list from page one and discards already-loaded pages and the pagination cursor, even though those actions do not change review membership. This is avoidable request churn and visible list resets during a browsing session.
Suggested fix: Restrict
setReviewRevisionto actions that change review membership (the follow/block/unblock/review toggles at lines 606, 657, 671, 721, 734, 1284, 1302) and drop it fromtoggleMediaFavourite/deleteMedia, or gate the reload on a review-membership signal rather than any media mutation.Settings blocked-media inspection list renders every blocked entity with media in one unpaginated subtree (web/src/main.tsx:1770; medium confidence)
The new Content cleanup block renders
{blocked.map((entity) => <li key={...}> ... <button onClick={() => browseBlockedEntity(entity)}>Browse</button></li>)}with no cursor or page limit, whereblockedis the full/api/blocked/contentpayload (src/app.ts:1095 returns every blocked user/subreddit withmedia_count > 0). The only bound is CSS:.blocked-media-list { max-height: 25rem; overflow: auto; }(web/src/style.css), so all rows are in the DOM.scripts/benchmark-browser-interaction.mjsnow waits fordocument.querySelectorAll('.blocked-media-list li').length >= ${blockedEntities}on the 3,000-blocked-entity fixture, and BENCHMARKS.md states thatsettings_blocked_inspection_opened_ms'will be performed on the benchmark host', i.e. no measurement is supplied for the 3.5M fixture.Impact: Unlike the adjacent
.blocked-categorylists, which are paginated by the CUR-09 scale gate evidence (1,302 users/1,302 subreddits verified), this list materializes every blocked entity with media at once, and the relocated measurement is explicitly still pending, so nothing in the supplied evidence shows the relocated inspection stays usable at production size.Suggested fix: Consider paginating or capping the inspection list with a 'show more' control (reusing the existing cursor pattern) and re-measuring
settings_blocked_inspection_opened_mson the 3.5M fixture before treating the relocation as scale-accepted.Tests and validation
Questions
state === 'new' || state === 'seen'(web/src/primary-views.tsx) whilePOST /api/users/:user/reviewhas no state guard, so an already-followed user can be re-marked for review and shown without a Follow action. Is that triage state intentionally reachable from the review view, and should the card offer a way to act on such users?view === 'review'active (openUserSlideshow does not call switchView), so that gallery-state preservation rules for slideshow close (2.7.0-dev9) apply to the review list as well as to the gallery?blockedEntityMap/selectedOriginnavigation, is 'Back to Settings' the intended fallback whenselectedOriginis null (main.tsx:~1502 banner), including for a user browsed from the Users or Review view whose blocked entry was not found?Review limitations
settings_blocked_inspection_opened_msis stated as pending.npm run buildand is not in the supplied material, so I could not confirm the generated schema for the changed routes or that no hand-edited openapi.json was committed.Diff coverage
AGENTS.md: reviewed — included in a context-limited batchBENCHMARKS.md: reviewed — included in a context-limited batchCHANGELOG.md: reviewed — included in a context-limited batchREQUIREMENTS-TRACE.md: reviewed — included in a context-limited batchREQUIREMENTS.md: reviewed — included in a context-limited batchVERSION: reviewed — included in a context-limited batchpackage.json: reviewed — included in a context-limited batchscripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batchscripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batchsrc/app.ts: reviewed — included in a context-limited batchtests/blocked.test.mjs: reviewed — included in a context-limited batchtests/review-lifecycle.test.mjs: reviewed — included in a context-limited batchweb/src/main.tsx: reviewed — included in a context-limited batchweb/src/primary-views.tsx: reviewed — included in a context-limited batchweb/src/slideshow.tsx: reviewed — included in a context-limited batchweb/src/style.css: reviewed — included in a context-limited batchReview metadata
Review Feedback Follow-up (Commit
8912580, Version 2.7.0-dev11)Addressed findings from review comment #3550:
[P2] Page loader reset and state cleanup during review reconciliation:
web/src/main.tsx(clearUserReviewMedia),pageLoader.current.reset(),setLoadingMore(false), andsetLoadMoreError(false)are now called whenever review media reconciliation occurs.reset()clearslastCompletedCursor, preventing subsequent requests from being discarded as duplicate when an offset is rebased back to a previously loaded cursor offset (e.g. 100 -> 50).galleryEpochincrements, preventingloadingMorefrom getting permanently stuck attrue.tests/gallery-pagination.test.mjsverifying that rebasing a cursor offset back to an already-completed offset is permitted and fetched afterloader.reset().Fixed smoke-test unfollow cleanup route:
scripts/browser-gallery-smoke.mjs, corrected the unfollow call fromDELETE /api/follows/visible(invalid route) tofetch('/api/follows', { method: 'DELETE', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ type: 'user', value: 'visible' }) })and assertedresponse.ok.Multi-user / multi-page review pagination browser test:
scripts/browser-gallery-smoke.mjstesting two review users with media spanning multiple pages.Gallery (30)), rebases the cursor, resets the loader, and pagination seamlessly fetches the remaining cards for the other user from the rebased offset without dropping cards or stalling.Verification Evidence:
nix develop --command npm run build: built cleanly (v2.7.0-dev11).nix develop --command node tests/gallery-pagination.test.mjs: 4/4 passing.PATH=... nix develop --command node scripts/browser-gallery-smoke.mjs: passed completely.nix develop --command npm test: 218/218 passing.nix develop --command npm run test:schema: 60/60 passing.nix develop --command python3 scripts/version.py check --branch dev: clean alignment at2.7.0-dev11.REQUIREMENTS-TRACE.md,CHANGELOG.md,VERSION, andpackage.jsonaligned.Code review follow-up — MR #25
Reviewed commit:
89125801d001d7074aa3f9d1033ec4295c39c769(2.7.0-dev11)Compared with previous reviewed head:
f8560b987fbf9082bf7ffd3aa08353897c0a08e5Verdict: No actionable code findings in this review.
Previous findings resolved
/api/followswith the correct JSON payload and asserts response.ok.The new pagination regression test, expanded multi-user browser scenario, version bump and trace update are present. Inspection of the latest changes found no additional concrete defect warranting a correction.
Independently verified on this head
nix build --no-link --print-build-logs .#redview: 218/218 Node tests, 60/60 Python tests, and installation checks passed.npm run build: passed.scripts/browser-gallery-smoke.mjs: passed, including review actions, multi-user pagination and unchanged-slideshow Random/selection preservation.git diff --check: passed.Readiness and limits
Current-head branch/package CI and cache build succeeded. The automated review workflow is still pending; this comment is an independent manual review, not confirmation of that workflow's result.
CUR-12/13/14 user live acceptance and the documented production-scale benchmark remain pending. No further code corrections are requested by this review; those acceptance limits remain as recorded in REQUIREMENTS-TRACE.md.
Reviewed all seven files changed by this push and the affected pagination paths, building on the earlier full-MR review. No tracked files changed; no push or merge performed.