Relocate blocked inspection to Settings and enhance user review lifecycle #25

Merged
nimmo merged 17 commits from feature/review-and-blocked-inspection into dev 2026-10-16 00:03:15 +01:00
Owner

Relocate blocked-content inspection to Settings and enhance user review lifecycle (2.7.0-dev8)

Summary of changes:

  1. Blocked-content inspection:

    • Moved blocked users/subreddits/tags access from gallery header to Settings view.
    • Preserves explicit blocked gallery inspection and unblocking workflows while keeping primary gallery navigation focused.
  2. User review lifecycle and layout enhancements (CUR-12, CUR-13, CUR-14):

    • CUR-12: Following or blocking a user automatically clears their review marker (is_review = 0), treating review as an active triage state.
    • CUR-13: Added direct Slideshow button to review user cards to start full-screen slideshow browsing directly for that user.
    • CUR-14: Harmonized review user card layout to match standard entity cards (.entity-list and .entity-card) with thumbnail cover, metadata, and review actions.
  3. Target alignment:

    • Aligned post-2.6.0 development target to 2.7.0-dev8 in VERSION, package.json, and CHANGELOG.md.

Validation:

  • Full Node test suite passing: 217/217 tests.
  • Python schema test suite passing: 60/60 tests.
  • Nix package build (nix build .#redview) passes with clean install checks.
  • Requirements trace verified (python3 tests/test_requirements_trace.py).
  • Version policy checks passing (python3 scripts/version.py check --branch dev).
Relocate blocked-content inspection to Settings and enhance user review lifecycle (2.7.0-dev8) Summary of changes: 1. Blocked-content inspection: - Moved blocked users/subreddits/tags access from gallery header to Settings view. - Preserves explicit blocked gallery inspection and unblocking workflows while keeping primary gallery navigation focused. 2. User review lifecycle and layout enhancements (CUR-12, CUR-13, CUR-14): - CUR-12: Following or blocking a user automatically clears their review marker (is_review = 0), treating review as an active triage state. - CUR-13: Added direct Slideshow button to review user cards to start full-screen slideshow browsing directly for that user. - CUR-14: Harmonized review user card layout to match standard entity cards (.entity-list and .entity-card) with thumbnail cover, metadata, and review actions. 3. Target alignment: - Aligned post-2.6.0 development target to 2.7.0-dev8 in VERSION, package.json, and CHANGELOG.md. Validation: - Full Node test suite passing: 217/217 tests. - Python schema test suite passing: 60/60 tests. - Nix package build (nix build .#redview) passes with clean install checks. - Requirements trace verified (python3 tests/test_requirements_trace.py). - Version policy checks passing (python3 scripts/version.py check --branch dev).
clankbot left a comment

Automated code review

Reviewed commit: 9aec4ecd50ab4317f84bc0b213b1fdefc0a1f759

Verdict: 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 no is_review column in schema.sql), /api/blocked/bulk reuses setBlocked so 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

  • blocked_navigation_loaded_ms no longer measures anything (scripts/benchmark-browser-interaction.mjs:142; high confidence)
    The diff deletes the await waitFor(...nav[aria-label="Gallery views"] button... >= blockedEntities + 1) that previously sat between const initialMs = ... (line 141) and const blockedNavMs = performance.now() - initialStarted; (line 142). In the checked-out file there is no await or other work between the two statements, so blockedNavMs is always equal to initialMs, yet it is still emitted at line 238 as blocked_navigation_loaded_ms. The relocated path (Settings link click, details.blocked-content-inspection wait, summary click, .blocked-media-list button wait) is now timed only inside blockedReviewMs.
    Impact: The reported field silently duplicates initial_gallery_50_cards_ms regardless of blocked_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 blockedNavMs after a waitFor asserting 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-followed user is counted as skipped and keeps is_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 because POST /api/users/{user}/review (src/app.ts:3034) and POST /api/review/bulk (src/app.ts:2998) apply is_review = 1 with 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 = 0 for state = '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>, but selected is still set from unchanged non-Settings paths: viewEntityMedia (if (blockedEntity) setSelected(blockedEntity), main.tsx:661) and viewCrossReferenceMedia (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 selected is 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 with media_count > 0 (src/app.ts:1114) and whose media_count is 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 prints purgePreview.total, which GET /api/blocked/purge computes as SELECT 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 the User type in this file (web/src/primary-views.tsx:8) is { id, name, media_count, thumb_media_id } with no is_collector or state field to condition on. POST /api/follows returns 409 for collectors (src/app.ts:2793 if (row.is_collector) return reply.code(409)...), and json() 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 = 1 with 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 (and state) 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

  • package-checks: success

Questions

  • Should blocked_navigation_loaded_ms in 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?
  • Should bulk follow clear is_review for users already in followed state, matching the single-follow route's else if (type === 'user') branch in src/app.ts?
  • Should the review view's user payload carry state/is_collector so its card actions match the Users view's guards, and should the review list exclude users that are no longer triage-eligible?

Review limitations

  • I did not run the build, the Node/Python suites, the smoke scripts, the benchmark script, or the Nix package check; test counts and pass results quoted in REQUIREMENTS-TRACE.md and the pull-request text are untrusted evidence, not verified by me.
  • Only files present in the checked-out working tree and the supplied diff were inspected; unchanged code outside them (e.g. dist/app.js build output, the generated OpenAPI schema, and the slideshow component internals in web/src/slideshow) was not verified.
  • CUR-12, CUR-13 and CUR-14 are recorded as "Awaiting live test" in REQUIREMENTS-TRACE.md; no supplied evidence shows the rendered result, so the layout/UX findings are derived from source markup and CSS selectors only.
  • No claim is made about requirements or behaviour outside the changed files (REQUIREMENTS.md CUR-12..CUR-14, VERSION, package.json, CHANGELOG.md alignment beyond the version strings shown in the diff).

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 6
  • Previous automated review: none found
  • Findings: 5
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `9aec4ecd50ab4317f84bc0b213b1fdefc0a1f759` ## Verdict: 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 no `is_review` column in schema.sql), `/api/blocked/bulk` reuses `setBlocked` so 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 - **blocked_navigation_loaded_ms no longer measures anything** (scripts/benchmark-browser-interaction.mjs:142; high confidence) The diff deletes the `await waitFor(...nav[aria-label="Gallery views"] button... >= blockedEntities + 1)` that previously sat between `const initialMs = ...` (line 141) and `const blockedNavMs = performance.now() - initialStarted;` (line 142). In the checked-out file there is no await or other work between the two statements, so `blockedNavMs` is always equal to `initialMs`, yet it is still emitted at line 238 as `blocked_navigation_loaded_ms`. The relocated path (Settings link click, `details.blocked-content-inspection` wait, summary click, `.blocked-media-list button` wait) is now timed only inside `blockedReviewMs`. Impact: The reported field silently duplicates `initial_gallery_50_cards_ms` regardless of `blocked_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 `blockedNavMs` after a `waitFor` asserting 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-`followed` user is counted as `skipped` and keeps `is_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 because `POST /api/users/{user}/review` (src/app.ts:3034) and `POST /api/review/bulk` (src/app.ts:2998) apply `is_review = 1` with 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 = 0` for `state = '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>`, but `selected` is still set from unchanged non-Settings paths: `viewEntityMedia` (`if (blockedEntity) setSelected(blockedEntity)`, main.tsx:661) and `viewCrossReferenceMedia` (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 `selected` is 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 with `media_count > 0` (src/app.ts:1114) and whose `media_count` is 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 prints `purgePreview.total`, which `GET /api/blocked/purge` computes as `SELECT 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 the `User` type in this file (web/src/primary-views.tsx:8) is `{ id, name, media_count, thumb_media_id }` with no `is_collector` or `state` field to condition on. `POST /api/follows` returns 409 for collectors (src/app.ts:2793 `if (row.is_collector) return reply.code(409)...`), and `json()` 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 = 1` with 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` (and `state`) 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 - package-checks: **success** ### Questions - Should `blocked_navigation_loaded_ms` in 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? - Should bulk follow clear `is_review` for users already in `followed` state, matching the single-follow route's `else if (type === 'user')` branch in src/app.ts? - Should the review view's user payload carry `state`/`is_collector` so its card actions match the Users view's guards, and should the review list exclude users that are no longer triage-eligible? ### Review limitations - I did not run the build, the Node/Python suites, the smoke scripts, the benchmark script, or the Nix package check; test counts and pass results quoted in REQUIREMENTS-TRACE.md and the pull-request text are untrusted evidence, not verified by me. - Only files present in the checked-out working tree and the supplied diff were inspected; unchanged code outside them (e.g. dist/app.js build output, the generated OpenAPI schema, and the slideshow component internals in web/src/slideshow) was not verified. - CUR-12, CUR-13 and CUR-14 are recorded as "Awaiting live test" in REQUIREMENTS-TRACE.md; no supplied evidence shows the rendered result, so the layout/UX findings are derived from source markup and CSS selectors only. - No claim is made about requirements or behaviour outside the changed files (REQUIREMENTS.md CUR-12..CUR-14, VERSION, package.json, CHANGELOG.md alignment beyond the version strings shown in the diff). ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 6 - Previous automated review: none found - Findings: 5 </details>
Author
Owner

Response to Automated Review

All findings from the automated review have been addressed:

  1. blocked_navigation_loaded_ms benchmark measurement:

    • Re-pointed blockedNavMs in scripts/benchmark-browser-interaction.mjs to accurately time navigating to Settings and expanding the blocked inspection list.
    • Timed blockedReviewMs around clicking a blocked entity and loading its blocked gallery.
  2. Bulk follow clearing review for already-followed users:

    • Updated POST /api/follows/bulk in src/app.ts to clear is_review = 0 for non-collector users even if they were already in followed state, matching the single-follow behavior.
    • Added test assertion in tests/review-lifecycle.test.mjs confirming already-followed users marked for review have is_review cleared on bulk follow.
  3. Origin-aware return navigation from blocked inspection:

    • Tracked selectedOrigin in web/src/main.tsx so inspections entered from Users or Subreddits offer "Back to Users" / "Back to Subreddits" and return directly to the originating view, alongside "Exit to Gallery".
  4. Settings inspection summary count label:

    • Updated the count summary in web/src/main.tsx to explicitly label the summed entity count as entity-media references rather than files to distinguish from unique hidden media files reported in the purge preview.
  5. Review card Follow action for collectors:

    • Included is_collector in the review view User type in web/src/primary-views.tsx.
    • Hidden the Follow button on review cards when user.is_collector is true, matching the Users view guard and preventing 409 conflict errors.

Validation evidence:

  • TypeScript build & Vite bundling: clean build (npm run build).
  • Node test suite: 217/217 passed (npm test).
  • Python schema suite: 60/60 passed (npm run test:schema).
### Response to Automated Review All findings from the automated review have been addressed: 1. **blocked_navigation_loaded_ms benchmark measurement**: - Re-pointed `blockedNavMs` in `scripts/benchmark-browser-interaction.mjs` to accurately time navigating to Settings and expanding the blocked inspection list. - Timed `blockedReviewMs` around clicking a blocked entity and loading its blocked gallery. 2. **Bulk follow clearing review for already-followed users**: - Updated `POST /api/follows/bulk` in `src/app.ts` to clear `is_review = 0` for non-collector users even if they were already in `followed` state, matching the single-follow behavior. - Added test assertion in `tests/review-lifecycle.test.mjs` confirming already-followed users marked for review have `is_review` cleared on bulk follow. 3. **Origin-aware return navigation from blocked inspection**: - Tracked `selectedOrigin` in `web/src/main.tsx` so inspections entered from Users or Subreddits offer "Back to Users" / "Back to Subreddits" and return directly to the originating view, alongside "Exit to Gallery". 4. **Settings inspection summary count label**: - Updated the count summary in `web/src/main.tsx` to explicitly label the summed entity count as `entity-media references` rather than `files` to distinguish from unique hidden media files reported in the purge preview. 5. **Review card Follow action for collectors**: - Included `is_collector` in the review view `User` type in `web/src/primary-views.tsx`. - Hidden the Follow button on review cards when `user.is_collector` is true, matching the Users view guard and preventing 409 conflict errors. **Validation evidence**: - TypeScript build & Vite bundling: clean build (`npm run build`). - Node test suite: 217/217 passed (`npm test`). - Python schema suite: 60/60 passed (`npm run test:schema`).
Address automated review feedback on review lifecycle, benchmark, and UX
All checks were successful
Build and Push Attic Cache / build (pull_request) Successful in 45s
Branch and package checks / check (pull_request) Successful in 49s
AI pull-request review / review (pull_request) Successful in 13m0s
76b4d72eef
clankbot left a comment

Automated code review

Reviewed commit: 76b4d72eef7d6cd1e685814ba1c1460fe0eb856d

Verdict: 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-inspection plus per-entity Browse buttons), adds a blocked-inspection-banner with origin-aware return buttons, redesigns the Users-to-review cards as .entity-list/.entity-card cards with Slideshow/Follow/Block actions, and clears is_review on follow/block in src/app.ts. I confirmed one type-level defect (an undeclared PrimaryView name that the build pipeline cannot catch), plus three behavioural inconsistencies introduced by the new origin/slideshow/action code paths. The is_review clearing itself is consistent with the new tests/review-lifecycle.test.mjs and 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 with media_count > 0, and the scale fixture (scripts/browser-gallery-smoke.mjs:459-465) inserts only blocked table rows, so the supplied evidence does not demonstrate the claimed cost.

Blocking findings

None.

Important findings

  • Undeclared type name PrimaryView in the new selectedOrigin state (web/src/main.tsx:106; high confidence)
    The added line is const [selectedOrigin, setSelectedOrigin] = useState<PrimaryView | null>(null);. A search of web/src returns exactly one occurrence of PrimaryView (this line); the file declares only type View = 'gallery' | 'users' | 'subreddits' | ... | 'settings' at line 55, and no import in the file's import block (lines 1-17) exports a PrimaryView. Values assigned to it are 'settings' (line 973), view (lines 664/727) and 'users'/'subreddits' comparisons (lines 1393-1398), i.e. the View domain.
    Impact: The annotation references an unresolvable identifier, so any TypeScript check of web/ sources fails. package.json builds with tsc -p tsconfig.json (tsconfig.json includes only src/**/*.ts) plus vite build (vite.config.ts root web, esbuild erases annotations), so neither the reported 217/217 Node run nor the build surfaces it; the origin value's domain is therefore unchecked and switchView(origin) at line 1396 is not verified against View.
    Suggested fix: Annotate selectedOrigin with the existing View type (or export a shared PrimaryView subtype from a module that is imported), so the assignments at lines 664/727/973 and the switchView(origin) call at line 1396 are type-checked.

Suggestions

  • selectedOrigin is not set or cleared on the browseMediaEntity path, so the banner can name a view the user did not come from (web/src/main.tsx:839; medium confidence)
    browseMediaEntity (line 834) sets setSelected(blockedEntity ?? null) at line 839 with no matching setSelectedOrigin, and switchView (line 923) clears setSelected(null) at line 930 without clearing selectedOrigin. Only viewEntityMedia-style paths (lines 663/664, 726/727) and browseBlockedEntity (lines 972/973) set the origin. The banner at lines 1392-1398 then renders Back to Users / Back to Subreddits / Back to Settings from selectedOrigin ?? 'settings'. onBrowseUser (line 1290) and StatsView.onBrowseEntity (line 1292) route through browseMediaEntity, as does the new review card's View media button (primary-views.tsx:218).
    Impact: After any prior inspection from Settings leaves selectedOrigin = 'settings', entering blocked-media inspection through browseMediaEntity (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 selectedOrigin in browseMediaEntity alongside setSelected (to the current view, or null), and clear selectedOrigin wherever switchView clears selected, so the banner label always matches the actual entry path.

  • Review-card Follow button is not gated on user state; the newly added state field is never read (web/src/primary-views.tsx:220; medium confidence)
    The User type was widened with state?: string (line 8), but no code in this file reads .state (a search for .state in web/src/primary-views.tsx returns 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/follows in src/app.ts returns 409 for a user whose state is not new/seen/followed (src/app.ts:2794-2795, Cannot follow a ${row.state}), and POST /api/users/:user/review (src/app.ts:3044) sets is_review = 1 with no state guard, while the review list filter is only users.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 imported state field suggests state-gating was intended but not implemented.
    Suggested fix: Use user.state to render Follow only for new/seen/followed states (mirroring main.tsx:1504-1505), or remove the unused state field if no gating is intended.

  • openUserSlideshow always 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) hardcodes const base = '/api/media' with user: name, and errors with No visible media for ${name} when the page is empty. The sibling openEntitySlideshow (line 668) instead selects /api/blocked/content/${type}/${entity.id}/media when entity.state === 'blocked' (lines 670-673). Media of blocked users is excluded from /api/media because m.is_visible = 1 is required (src/app.ts:641) and schema.sql sets is_visible = 0 for blocked users' media (schema.sql:157-159). The review card's Slideshow button is enabled whenever user.media_count !== 0 (primary-views.tsx:219), and media_count counts all media, not visible media.
    Impact: A review-marked user whose state is blocked (reachable because POST /api/users/:user/review has 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 (as openEntitySlideshow does), or gate the review-card Slideshow button on a state that has visible media.

Tests and validation

  • package-checks: success

Questions

  • scripts/browser-gallery-smoke.mjs:451 asserts 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?
  • CUR-12 says review is cleared 'when a user marked for review is followed or blocked'; the change clears is_review in setBlocked, POST /api/follows and POST /api/follows/bulk. Should DELETE /api/follows (unfollow) or marking an entity for deletion also clear is_review, or is clearing intentionally limited to the follow/block transitions?
  • Should the banner's return button ever offer 'Back to Review' for entry through the new review cards' 'View media', or is 'Back to Settings' the only documented return path now that the gallery nav was removed?

Review limitations

  • Only the supplied diff and the checked-out repository files were inspected; nothing was executed, no test suite or Chromium script was run, and no live browser acceptance was performed.
  • CUR-12/CUR-13/CUR-14 are recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md; I cannot confirm or deny the rendered browser behaviour of the review cards, the Slideshow button, or the relocated Settings inspection beyond reading the source.
  • The reported 217/217 Node and 60/60 Python results and the package check were taken from the supplied evidence only; I did not verify them.
  • No assessment is made of OpenAPI generation, migrations, scheduler/worker ownership, authentication, or file-access containment: the supplied changes do not touch those areas, and unchanged code outside the diff was not inferred to be defective.

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 7
  • Previous automated review: none found
  • Findings: 4
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `76b4d72eef7d6cd1e685814ba1c1460fe0eb856d` ## Verdict: 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-inspection` plus per-entity Browse buttons), adds a `blocked-inspection-banner` with origin-aware return buttons, redesigns the Users-to-review cards as `.entity-list`/`.entity-card` cards with Slideshow/Follow/Block actions, and clears `is_review` on follow/block in `src/app.ts`. I confirmed one type-level defect (an undeclared `PrimaryView` name that the build pipeline cannot catch), plus three behavioural inconsistencies introduced by the new origin/slideshow/action code paths. The `is_review` clearing itself is consistent with the new `tests/review-lifecycle.test.mjs` and 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 with `media_count > 0`, and the scale fixture (scripts/browser-gallery-smoke.mjs:459-465) inserts only `blocked` table rows, so the supplied evidence does not demonstrate the claimed cost. ### Blocking findings None. ### Important findings - **Undeclared type name `PrimaryView` in the new selectedOrigin state** (web/src/main.tsx:106; high confidence) The added line is `const [selectedOrigin, setSelectedOrigin] = useState<PrimaryView | null>(null);`. A search of `web/src` returns exactly one occurrence of `PrimaryView` (this line); the file declares only `type View = 'gallery' | 'users' | 'subreddits' | ... | 'settings'` at line 55, and no import in the file's import block (lines 1-17) exports a `PrimaryView`. Values assigned to it are `'settings'` (line 973), `view` (lines 664/727) and `'users'`/`'subreddits'` comparisons (lines 1393-1398), i.e. the `View` domain. Impact: The annotation references an unresolvable identifier, so any TypeScript check of `web/` sources fails. `package.json` builds with `tsc -p tsconfig.json` (tsconfig.json includes only `src/**/*.ts`) plus `vite build` (vite.config.ts root `web`, esbuild erases annotations), so neither the reported 217/217 Node run nor the build surfaces it; the origin value's domain is therefore unchecked and `switchView(origin)` at line 1396 is not verified against `View`. Suggested fix: Annotate `selectedOrigin` with the existing `View` type (or export a shared `PrimaryView` subtype from a module that is imported), so the assignments at lines 664/727/973 and the `switchView(origin)` call at line 1396 are type-checked. ### Suggestions - **`selectedOrigin` is not set or cleared on the `browseMediaEntity` path, so the banner can name a view the user did not come from** (web/src/main.tsx:839; medium confidence) `browseMediaEntity` (line 834) sets `setSelected(blockedEntity ?? null)` at line 839 with no matching `setSelectedOrigin`, and `switchView` (line 923) clears `setSelected(null)` at line 930 without clearing `selectedOrigin`. Only `viewEntityMedia`-style paths (lines 663/664, 726/727) and `browseBlockedEntity` (lines 972/973) set the origin. The banner at lines 1392-1398 then renders `Back to Users` / `Back to Subreddits` / `Back to Settings` from `selectedOrigin ?? 'settings'`. `onBrowseUser` (line 1290) and `StatsView.onBrowseEntity` (line 1292) route through `browseMediaEntity`, as does the new review card's `View media` button (primary-views.tsx:218). Impact: After any prior inspection from Settings leaves `selectedOrigin = 'settings'`, entering blocked-media inspection through `browseMediaEntity` (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 `selectedOrigin` in `browseMediaEntity` alongside `setSelected` (to the current `view`, or `null`), and clear `selectedOrigin` wherever `switchView` clears `selected`, so the banner label always matches the actual entry path. - **Review-card Follow button is not gated on user state; the newly added `state` field is never read** (web/src/primary-views.tsx:220; medium confidence) The `User` type was widened with `state?: string` (line 8), but no code in this file reads `.state` (a search for `.state` in `web/src/primary-views.tsx` returns 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/follows` in `src/app.ts` returns 409 for a user whose state is not `new`/`seen`/`followed` (src/app.ts:2794-2795, `Cannot follow a ${row.state}`), and `POST /api/users/:user/review` (src/app.ts:3044) sets `is_review = 1` with no state guard, while the review list filter is only `users.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 imported `state` field suggests state-gating was intended but not implemented. Suggested fix: Use `user.state` to render Follow only for `new`/`seen`/`followed` states (mirroring main.tsx:1504-1505), or remove the unused `state` field if no gating is intended. - **`openUserSlideshow` always 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) hardcodes `const base = '/api/media'` with `user: name`, and errors with `No visible media for ${name}` when the page is empty. The sibling `openEntitySlideshow` (line 668) instead selects `/api/blocked/content/${type}/${entity.id}/media` when `entity.state === 'blocked'` (lines 670-673). Media of blocked users is excluded from `/api/media` because `m.is_visible = 1` is required (src/app.ts:641) and schema.sql sets `is_visible = 0` for blocked users' media (schema.sql:157-159). The review card's Slideshow button is enabled whenever `user.media_count !== 0` (primary-views.tsx:219), and `media_count` counts all media, not visible media. Impact: A review-marked user whose state is `blocked` (reachable because `POST /api/users/:user/review` has 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` (as `openEntitySlideshow` does), or gate the review-card Slideshow button on a state that has visible media. ### Tests and validation - package-checks: **success** ### Questions - scripts/browser-gallery-smoke.mjs:451 asserts `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? - CUR-12 says review is cleared 'when a user marked for review is followed or blocked'; the change clears `is_review` in `setBlocked`, `POST /api/follows` and `POST /api/follows/bulk`. Should `DELETE /api/follows` (unfollow) or marking an entity for deletion also clear `is_review`, or is clearing intentionally limited to the follow/block transitions? - Should the banner's return button ever offer 'Back to Review' for entry through the new review cards' 'View media', or is 'Back to Settings' the only documented return path now that the gallery nav was removed? ### Review limitations - Only the supplied diff and the checked-out repository files were inspected; nothing was executed, no test suite or Chromium script was run, and no live browser acceptance was performed. - CUR-12/CUR-13/CUR-14 are recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md; I cannot confirm or deny the rendered browser behaviour of the review cards, the Slideshow button, or the relocated Settings inspection beyond reading the source. - The reported 217/217 Node and 60/60 Python results and the package check were taken from the supplied evidence only; I did not verify them. - No assessment is made of OpenAPI generation, migrations, scheduler/worker ownership, authentication, or file-access containment: the supplied changes do not touch those areas, and unchanged code outside the diff was not inferred to be defective. ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 7 - Previous automated review: none found - Findings: 4 </details>
Author
Owner

Response to AI review feedback (commit 76b4d72)

The following fixes address all findings and questions from the latest automated review:

  1. Undeclared PrimaryView type in web/src/main.tsx:106 (Important finding):

    • Annotated selectedOrigin with View | null, matching the existing view union.
  2. selectedOrigin tracking and return banner label accuracy (Suggestion):

    • Added origin: View | null = null parameter to browseMediaEntity, setting selectedOrigin when browsing blocked entities from Review or Stats.
    • Added setSelectedOrigin(null) to switchView so origins do not persist across top-level navigation.
    • Enhanced the banner return button to support Back to Review and Back to Stats alongside Back to Users and Back to Subreddits.
  3. Gating review-card Follow button on user state (Suggestion):

    • Gated the Follow button in web/src/primary-views.tsx on !user.is_collector && (user.state === undefined || user.state === 'new' || user.state === 'seen' || user.state === 'followed'), mirroring main.tsx and preventing 409 errors.
  4. Blocked user slideshow support in openUserSlideshow (Suggestion):

    • Updated openUserSlideshow to check if the target user is blocked and route to /api/blocked/content/user/${blockedEntity.id}/media, matching openEntitySlideshow.
  5. Smoke test alignment with CUR-12 lifecycle:

    • In scripts/browser-gallery-smoke.mjs, reset Review status to all before verifying blocked entities on /users (since CUR-12 automatically cleared is_review on block, moving visible out of review=true).
    • Re-marked visible for review before the /review view check.

Validation

  • TypeScript compilation & Vite bundle: Passed (npm run build).
  • OpenAPI generator: Passed (auto-generated in build).
  • Node unit suite: 217/217 passed (npm test).
  • Python schema suite: 60/60 passed (npm run test:schema).
  • Browser gallery smoke suite: Passed (node scripts/browser-gallery-smoke.mjs with Chromium headless, result: passed).
### Response to AI review feedback (commit 76b4d72) The following fixes address all findings and questions from the latest automated review: 1. **Undeclared `PrimaryView` type in `web/src/main.tsx:106` (Important finding):** - Annotated `selectedOrigin` with `View | null`, matching the existing view union. 2. **`selectedOrigin` tracking and return banner label accuracy (Suggestion):** - Added `origin: View | null = null` parameter to `browseMediaEntity`, setting `selectedOrigin` when browsing blocked entities from Review or Stats. - Added `setSelectedOrigin(null)` to `switchView` so origins do not persist across top-level navigation. - Enhanced the banner return button to support `Back to Review` and `Back to Stats` alongside `Back to Users` and `Back to Subreddits`. 3. **Gating review-card Follow button on user state (Suggestion):** - Gated the Follow button in `web/src/primary-views.tsx` on `!user.is_collector && (user.state === undefined || user.state === 'new' || user.state === 'seen' || user.state === 'followed')`, mirroring `main.tsx` and preventing 409 errors. 4. **Blocked user slideshow support in `openUserSlideshow` (Suggestion):** - Updated `openUserSlideshow` to check if the target user is blocked and route to `/api/blocked/content/user/${blockedEntity.id}/media`, matching `openEntitySlideshow`. 5. **Smoke test alignment with CUR-12 lifecycle:** - In `scripts/browser-gallery-smoke.mjs`, reset `Review status` to `all` before verifying blocked entities on `/users` (since CUR-12 automatically cleared `is_review` on block, moving `visible` out of `review=true`). - Re-marked `visible` for review before the `/review` view check. ### Validation - **TypeScript compilation & Vite bundle:** Passed (`npm run build`). - **OpenAPI generator:** Passed (auto-generated in build). - **Node unit suite:** 217/217 passed (`npm test`). - **Python schema suite:** 60/60 passed (`npm run test:schema`). - **Browser gallery smoke suite:** Passed (`node scripts/browser-gallery-smoke.mjs` with Chromium headless, result: passed).
Address automated review feedback on types, origin navigation, and smoke test
All checks were successful
Branch and package checks / check (pull_request) Successful in 35s
Build and Push Attic Cache / build (pull_request) Successful in 36s
AI pull-request review / review (pull_request) Successful in 15m16s
7ab0614e11
clankbot left a comment

Automated code review

Reviewed commit: 7ab0614e11aa6b63a5a46089a905e72e24ac3297

Verdict: 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 = 0 resets in src/app.ts (setBlocked, POST /api/follows, POST /api/follows/bulk with clearReviewFollowed) are consistent with tests/review-lifecycle.test.mjs, and /api/blocked/bulk reuses setBlocked, so the bulk-block assertion is covered; the new tests/blocked.test.mjs case matches the actual /api/blocked/content and /api/blocked/content/:type/:id/media response shapes in src/app.ts:1095/1123 and the media_insert_counts triggers in schema.sql:127. The Settings blocked-content inspection markup (details.blocked-content-inspection, .blocked-media-list, .blocked-inspection-banner, .blocked-count) has matching CSS in web/src/style.css, and no stale nav[aria-label="Gallery views"] selectors remain outside the new negative assertion at scripts/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 new let 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 previous Browse label. 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; with let blockedNavMs = null; (line 142), assigned only inside if (blockedEntities) (line 144/150). The report line emits blocked_navigation_loaded_ms: Math.round(blockedNavMs * 100) / 100 with 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). blockedEntities is 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 * 100 is 0) instead of null, 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 /review click (line 568) and waitFor(... .entity-card .entity-name ... 'visible') (line 569). evaluate sends Runtime.evaluate with awaitPromise: true, returnByValue: true (line 90), but the evaluated expression's value is the boolean true, so the fetch promise is never awaited. FavouritesView fetches /api/users?review=true&sort=name&limit=60 once inside a useEffect keyed on [mode, sort] and never re-fetches (web/src/primary-views.tsx:135), and waitFor gives up after 150 x 100 ms (line 94). The re-mark is required here because 'visible' was blocked earlier at line 377, which now clears is_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 with waitFor("fetch('/api/users?review=true&q=visible').then(r=>r.json()).then(p=>p.users.some(u=>u.name==='visible'))") before clicking /review.

Suggestions

  • Per-row blocked-entity lookup in the Settings blocked lists is quadratic at the CUR-09/Q-02 scale (web/src/main.tsx:1640; medium confidence)
    Each rendered row now runs const entityWithMedia = blocked.find((item) => item.type === type && item.name.toLowerCase() === entry.value.toLowerCase()); inside entries.sort(...).map(...), where entries comes from blockedList (/api/blocked) and blocked from GET /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 Map keyed by type + lower-cased name from blocked once per render (outside the .map callback) and look up per row instead of scanning the array per row.

Tests and validation

  • package-checks: success

Questions

  • Should the review card offer an "Unfollow" action for users already in state followed (reachable because POST /api/users/{user}/review re-marks a followed user, as exercised in tests/review-lifecycle.test.mjs), mirroring the label toggle in the Users view?
  • Should POST /api/follows/bulk count a user whose review marker was cleared by clearReviewFollowed (already followed, so reported as skipped) differently, or is the unchanged added/skipped contract intended?
  • Should the relocated blocked-content inspection surface tag-blocked media, given CUR-03 describes the dedicated blocked-content browser as including tag-blocked media for selected blocked users/subreddits while the new Settings panel is driven only by GET /api/blocked/content?

Review limitations

  • I did not execute the Node or Python suites, the smoke/benchmark scripts, or nix build; the 217/217 and 60/60 counts and the red-to-green run described in REQUIREMENTS-TRACE.md are untrusted PR claims.
  • No live browser behavior was observed, so all layout/interaction claims are inferred from source and CSS, not from rendered UI.
  • The supplied diff is partial (elided hunks in src/app.ts, web/src/main.tsx and the scripts); I read only the specific regions cited and may have missed related handling elsewhere.
  • I did not inspect the generated OpenAPI output or built dist/ artifacts, so Fastify schema/response-shape consistency for the changed routes was not verified end to end.
  • I did not report a finding for browseBlockedEntity omitting the setSlideshow(null)/setTagEditor(null) resets that browseMediaEntity performs (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 batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 8
  • Previous automated review: none found
  • Findings: 4
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `7ab0614e11aa6b63a5a46089a905e72e24ac3297` ## Verdict: 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 = 0` resets in `src/app.ts` (`setBlocked`, `POST /api/follows`, `POST /api/follows/bulk` with `clearReviewFollowed`) are consistent with `tests/review-lifecycle.test.mjs`, and `/api/blocked/bulk` reuses `setBlocked`, so the bulk-block assertion is covered; the new `tests/blocked.test.mjs` case matches the actual `/api/blocked/content` and `/api/blocked/content/:type/:id/media` response shapes in `src/app.ts:1095`/`1123` and the `media_insert_counts` triggers in `schema.sql:127`. The Settings blocked-content inspection markup (`details.blocked-content-inspection`, `.blocked-media-list`, `.blocked-inspection-banner`, `.blocked-count`) has matching CSS in `web/src/style.css`, and no stale `nav[aria-label="Gallery views"]` selectors remain outside the new negative assertion at `scripts/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 new `let 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 previous `Browse` label. 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;` with `let blockedNavMs = null;` (line 142), assigned only inside `if (blockedEntities)` (line 144/150). The report line emits `blocked_navigation_loaded_ms: Math.round(blockedNavMs * 100) / 100` with 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). `blockedEntities` is 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 * 100` is 0) instead of `null`, 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 `/review` click (line 568) and `waitFor(... .entity-card .entity-name ... 'visible')` (line 569). `evaluate` sends `Runtime.evaluate` with `awaitPromise: true, returnByValue: true` (line 90), but the evaluated expression's value is the boolean `true`, so the fetch promise is never awaited. `FavouritesView` fetches `/api/users?review=true&sort=name&limit=60` once inside a `useEffect` keyed on `[mode, sort]` and never re-fetches (web/src/primary-views.tsx:135), and `waitFor` gives up after 150 x 100 ms (line 94). The re-mark is required here because 'visible' was blocked earlier at line 377, which now clears `is_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 with `waitFor("fetch('/api/users?review=true&q=visible').then(r=>r.json()).then(p=>p.users.some(u=>u.name==='visible'))")` before clicking `/review`. ### Suggestions - **Per-row blocked-entity lookup in the Settings blocked lists is quadratic at the CUR-09/Q-02 scale** (web/src/main.tsx:1640; medium confidence) Each rendered row now runs `const entityWithMedia = blocked.find((item) => item.type === type && item.name.toLowerCase() === entry.value.toLowerCase());` inside `entries.sort(...).map(...)`, where `entries` comes from `blockedList` (`/api/blocked`) and `blocked` from `GET /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 `Map` keyed by `type` + lower-cased name from `blocked` once per render (outside the `.map` callback) and look up per row instead of scanning the array per row. ### Tests and validation - package-checks: **success** ### Questions - Should the review card offer an "Unfollow" action for users already in state `followed` (reachable because `POST /api/users/{user}/review` re-marks a followed user, as exercised in tests/review-lifecycle.test.mjs), mirroring the label toggle in the Users view? - Should `POST /api/follows/bulk` count a user whose review marker was cleared by `clearReviewFollowed` (already followed, so reported as `skipped`) differently, or is the unchanged added/skipped contract intended? - Should the relocated blocked-content inspection surface tag-blocked media, given CUR-03 describes the dedicated blocked-content browser as including tag-blocked media for selected blocked users/subreddits while the new Settings panel is driven only by `GET /api/blocked/content`? ### Review limitations - I did not execute the Node or Python suites, the smoke/benchmark scripts, or `nix build`; the 217/217 and 60/60 counts and the red-to-green run described in REQUIREMENTS-TRACE.md are untrusted PR claims. - No live browser behavior was observed, so all layout/interaction claims are inferred from source and CSS, not from rendered UI. - The supplied diff is partial (elided hunks in src/app.ts, web/src/main.tsx and the scripts); I read only the specific regions cited and may have missed related handling elsewhere. - I did not inspect the generated OpenAPI output or built `dist/` artifacts, so Fastify schema/response-shape consistency for the changed routes was not verified end to end. - I did not report a finding for `browseBlockedEntity` omitting the `setSlideshow(null)`/`setTagEditor(null)` resets that `browseMediaEntity` performs (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 batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 8 - Previous automated review: none found - Findings: 4 </details>
Author
Owner

Response to AI review feedback (commit 7ab0614)

Addressing all 4 findings from review #3:

  1. Review card primary action label (Important finding):

    • Restored Browse on the review list primary button in web/src/primary-views.tsx:218, preserving CUR-10 requirement wording.
    • Refined the Follow button state guard to !user.is_collector && (user.state === undefined || user.state === 'new' || user.state === 'seen').
    • Updated scripts/browser-gallery-smoke.mjs:574 to explicitly assert that the button's text is Browse.
  2. Benchmark blocked_navigation_loaded_ms null guard (Important finding):

    • Added null guard in scripts/benchmark-browser-interaction.mjs:240: blockedNavMs === null ? null : Math.round(blockedNavMs * 100) / 100, matching the sibling metric.
  3. Smoke test review POST race condition (Important finding):

    • Changed fetch('/api/users/visible/review', { method: 'POST' }).then(() => true) in scripts/browser-gallery-smoke.mjs:567 so the evaluated promise is awaited by CDP before navigating to /review.
  4. Settings blocked-content quadratic lookup (Suggestion):

    • In web/src/main.tsx:1630, constructed a blockedMap once per open category for O(1) row lookups, eliminating O(N^2) scans over CUR-09/Q-02 scale blocked lists.

Validation

  • Build & TypeScript: Passed (npm run build).
  • OpenAPI generator: Generated cleanly.
  • Node tests: 217/217 passed (npm test).
  • Python schema tests: 60/60 passed (npm run test:schema).
  • Chromium headless browser smoke test: Passed (result: passed).
### Response to AI review feedback (commit 7ab0614) Addressing all 4 findings from review #3: 1. **Review card primary action label (Important finding):** - Restored `Browse` on the review list primary button in `web/src/primary-views.tsx:218`, preserving CUR-10 requirement wording. - Refined the Follow button state guard to `!user.is_collector && (user.state === undefined || user.state === 'new' || user.state === 'seen')`. - Updated `scripts/browser-gallery-smoke.mjs:574` to explicitly assert that the button's text is `Browse`. 2. **Benchmark `blocked_navigation_loaded_ms` null guard (Important finding):** - Added null guard in `scripts/benchmark-browser-interaction.mjs:240`: `blockedNavMs === null ? null : Math.round(blockedNavMs * 100) / 100`, matching the sibling metric. 3. **Smoke test review POST race condition (Important finding):** - Changed `fetch('/api/users/visible/review', { method: 'POST' }).then(() => true)` in `scripts/browser-gallery-smoke.mjs:567` so the evaluated promise is awaited by CDP before navigating to `/review`. 4. **Settings blocked-content quadratic lookup (Suggestion):** - In `web/src/main.tsx:1630`, constructed a `blockedMap` once per open category for O(1) row lookups, eliminating O(N^2) scans over CUR-09/Q-02 scale blocked lists. ### Validation - **Build & TypeScript:** Passed (`npm run build`). - **OpenAPI generator:** Generated cleanly. - **Node tests:** 217/217 passed (`npm test`). - **Python schema tests:** 60/60 passed (`npm run test:schema`). - **Chromium headless browser smoke test:** Passed (`result: passed`).
Address review feedback on review button label, benchmark metric, and Settings lookup
All checks were successful
Branch and package checks / check (pull_request) Successful in 35s
Build and Push Attic Cache / build (pull_request) Successful in 37s
AI pull-request review / review (pull_request) Successful in 16m16s
a739e5e593
clankbot left a comment

Automated code review

Reviewed commit: a739e5e5937ee892065b33bd31a17acb07bf626a

Verdict: 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

  • Users view keeps a stale review marker after the new follow/block clearing (web/src/main.tsx:538; high confidence)
    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) / label entity.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 for state === 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 returns is_collector: booleanFlag(is_collector) (src/app.ts:1850). main.tsx's matching Entity type declares is_collector: boolean (line 51). The optional state? also makes the user.state === undefined branch 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: boolean and state: string to match entityListItemSchema, mirroring the Entity type in main.tsx, and drop the state === undefined branch.

  • 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, clicks nav[aria-label="Primary views"] a[href="/settings"], opens details.blocked-content-inspection and waits for .blocked-media-list button, then still reports the result as blocked_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: auto in 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, blockedMap is rebuilt from the full blocked array 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

  • package-checks: success

Questions

  • Should unblocking a user restore the review marker they had before being blocked (previous_state is already recorded in the blocked table), or is one-way clearing the intended triage semantics for CUR-12?
  • Given CUR-12 makes review an active triage state, should POST /api/users/{user}/review and /api/users/review/bulk reject users that are already followed or blocked? tests/review-lifecycle.test.mjs currently asserts a followed user can be re-marked for review, which is how a followed/blocked user can reach the review card.
  • Should the review card expose the entity's real lifecycle state (new/seen/followed/blocked) alongside the review badge, and offer Unblock for followed/blocked users so they can leave the review list?

Review limitations

  • No live browser or Chromium run was performed; CUR-12, CUR-13 and CUR-14 are recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md, and the smoke/benchmark selectors were only checked statically against the rendered markup.
  • The stated validation results (217/217 Node tests, 60/60 Python tests, nix build .#redview, version policy checks) come from the pull-request text; no commands were executed and no CI logs were inspected.
  • Generated OpenAPI was not inspected (it is build-generated), so route schema completeness for the changed endpoints was assessed only from the Fastify schemas in src/app.ts.
  • Only files present in this checkout and the supplied diff were examined; no access to issue discussions, prior PR reviews, or other branch behaviour was available.

Diff coverage

  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 9
  • Previous automated review: none found
  • Findings: 5
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `a739e5e5937ee892065b33bd31a17acb07bf626a` ## Verdict: 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 - **Users view keeps a stale review marker after the new follow/block clearing** (web/src/main.tsx:538; high confidence) 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)` / label `entity.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 for `state === 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 returns `is_collector: booleanFlag(is_collector)` (src/app.ts:1850). main.tsx's matching Entity type declares `is_collector: boolean` (line 51). The optional `state?` also makes the `user.state === undefined` branch 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: boolean` and `state: string` to match entityListItemSchema, mirroring the Entity type in main.tsx, and drop the `state === undefined` branch. - **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, clicks `nav[aria-label="Primary views"] a[href="/settings"]`, opens `details.blocked-content-inspection` and waits for `.blocked-media-list button`, then still reports the result as `blocked_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: auto` in 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, `blockedMap` is rebuilt from the full `blocked` array 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 - package-checks: **success** ### Questions - Should unblocking a user restore the review marker they had before being blocked (previous_state is already recorded in the blocked table), or is one-way clearing the intended triage semantics for CUR-12? - Given CUR-12 makes review an active triage state, should POST /api/users/{user}/review and /api/users/review/bulk reject users that are already followed or blocked? tests/review-lifecycle.test.mjs currently asserts a followed user can be re-marked for review, which is how a followed/blocked user can reach the review card. - Should the review card expose the entity's real lifecycle state (new/seen/followed/blocked) alongside the review badge, and offer Unblock for followed/blocked users so they can leave the review list? ### Review limitations - No live browser or Chromium run was performed; CUR-12, CUR-13 and CUR-14 are recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md, and the smoke/benchmark selectors were only checked statically against the rendered markup. - The stated validation results (217/217 Node tests, 60/60 Python tests, nix build .#redview, version policy checks) come from the pull-request text; no commands were executed and no CI logs were inspected. - Generated OpenAPI was not inspected (it is build-generated), so route schema completeness for the changed endpoints was assessed only from the Fastify schemas in src/app.ts. - Only files present in this checkout and the supplied diff were examined; no access to issue discussions, prior PR reviews, or other branch behaviour was available. ### Diff coverage - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 9 - Previous automated review: none found - Findings: 5 </details>
Author
Owner

Response to AI review feedback (commit a739e5e)

All findings from the latest automated review have been addressed:

  1. Client-side review state synchronization on follow/block (Important finding):

    • Updated toggleEntityFollow, bulkEntityFollow, and updateBlockedEntityState in web/src/main.tsx to set is_review: false locally for users when followed or blocked.
    • Filtered local entities when reviewFilter === 'reviewed' so followed or blocked users leave the review list immediately, keeping client UI synchronized with the server's CUR-12 clearing.
  2. Review card state visibility and action alignment (Suggestion):

    • In web/src/primary-views.tsx, displayed {user.state.replaceAll('_', ' ')} in the .entity-state slot to present the actual lifecycle state.
    • Replaced the Block button with an Unblock button (unblockUser) when user.state === 'blocked'.
  3. Strict User contract in review view (Suggestion):

    • Declared is_collector: boolean and state: string in web/src/primary-views.tsx User type, matching /api/users entityListItemSchema.
    • Removed unreachable user.state === undefined branch in the Follow action guard.
  4. Benchmark metric naming and attributable evidence (Suggestion):

    • Renamed blocked_navigation_loaded_ms to settings_blocked_inspection_opened_ms in scripts/benchmark-browser-interaction.mjs to accurately describe measuring the Settings blocked inspection list opening.
    • Documented in BENCHMARKS.md that the previous gallery-nav measurement is superseded by settings_blocked_inspection_opened_ms following the relocation of blocked inspection in 2.7.0-dev8.
  5. Settings blocked inspection scaling and list bounds (Suggestion):

    • Capped the Settings blocked inspection list to the top 100 entities with a "Showing 100 of N entities" count note to prevent DOM bloat on large libraries.
    • Hoisted blockedEntityMap construction out of the render loop into a top-level useMemo in web/src/main.tsx for O(1) lookups.

Validation

  • TypeScript compilation & Vite bundle: Passed (npm run build).
  • OpenAPI generator: Generated cleanly.
  • Node unit suite: 217/217 passed (npm test).
  • Python schema suite: 60/60 passed (npm run test:schema).
  • Browser gallery smoke suite: Passed (node scripts/browser-gallery-smoke.mjs with Chromium headless, result: passed).
### Response to AI review feedback (commit a739e5e) All findings from the latest automated review have been addressed: 1. **Client-side review state synchronization on follow/block (Important finding):** - Updated `toggleEntityFollow`, `bulkEntityFollow`, and `updateBlockedEntityState` in `web/src/main.tsx` to set `is_review: false` locally for users when followed or blocked. - Filtered local entities when `reviewFilter === 'reviewed'` so followed or blocked users leave the review list immediately, keeping client UI synchronized with the server's CUR-12 clearing. 2. **Review card state visibility and action alignment (Suggestion):** - In `web/src/primary-views.tsx`, displayed `{user.state.replaceAll('_', ' ')}` in the `.entity-state` slot to present the actual lifecycle state. - Replaced the Block button with an Unblock button (`unblockUser`) when `user.state === 'blocked'`. 3. **Strict User contract in review view (Suggestion):** - Declared `is_collector: boolean` and `state: string` in `web/src/primary-views.tsx` `User` type, matching `/api/users` `entityListItemSchema`. - Removed unreachable `user.state === undefined` branch in the Follow action guard. 4. **Benchmark metric naming and attributable evidence (Suggestion):** - Renamed `blocked_navigation_loaded_ms` to `settings_blocked_inspection_opened_ms` in `scripts/benchmark-browser-interaction.mjs` to accurately describe measuring the Settings blocked inspection list opening. - Documented in `BENCHMARKS.md` that the previous gallery-nav measurement is superseded by `settings_blocked_inspection_opened_ms` following the relocation of blocked inspection in 2.7.0-dev8. 5. **Settings blocked inspection scaling and list bounds (Suggestion):** - Capped the Settings blocked inspection list to the top 100 entities with a "Showing 100 of N entities" count note to prevent DOM bloat on large libraries. - Hoisted `blockedEntityMap` construction out of the render loop into a top-level `useMemo` in `web/src/main.tsx` for O(1) lookups. ### Validation - **TypeScript compilation & Vite bundle:** Passed (`npm run build`). - **OpenAPI generator:** Generated cleanly. - **Node unit suite:** 217/217 passed (`npm test`). - **Python schema suite:** 60/60 passed (`npm run test:schema`). - **Browser gallery smoke suite:** Passed (`node scripts/browser-gallery-smoke.mjs` with Chromium headless, result: passed).
Synchronize client review state on follow/block and align review card actions
All checks were successful
Branch and package checks / check (pull_request) Successful in 35s
Build and Push Attic Cache / build (pull_request) Successful in 37s
AI pull-request review / review (pull_request) Successful in 20m17s
ee12f3de83
clankbot left a comment

Automated code review

Reviewed commit: ee12f3de8313e6372115580d8ecb8544477df130

Verdict: 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

  • Benchmark's blocked-user lookup silently falls back to a subreddit because the target is never rendered (scripts/benchmark-browser-interaction.mjs:154; high confidence)
    The lookup searches rendered .blocked-media-list li nodes for fixture_blocked_user_00001, but the panel renders only blocked.slice(0, 100) (web/src/main.tsx:1675) and GET /api/blocked/content returns rows ORDER 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 new settings_blocked_inspection_opened_ms waits only for document.querySelector('.blocked-media-list button') !== null (line 149), i.e. the first row of a 100-row list, whereas the removed blocked_navigation_loaded_ms waited for all blockedEntities + 1 nav buttons.
    Impact: blocked_review_action_to_render_ms no 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 claiming blocked_navigation_loaded_ms is '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_00001 is 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-inspection details element renders blocked.slice(0, 100) and, when truncated, appends only an informational row Showing 100 of {blocked.length} entities (main.tsx:1679); there is no search box, cursor, or paging control. blocked is the full un-paged array from GET /api/blocked/content, ordered ORDER 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 requires row.querySelector('button').textContent === 'Unblock'. The changed Settings list now inserts a Browse button before Unblock whenever the entity appears in blockedEntityMap (web/src/main.tsx:1659). In this fixture the first row by name sort is u/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 only blocked table entries for scale_* 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)
    unblockUser calls DELETE /api/blocked and then applies { ...item, state: 'seen' } to the review card, discarding the response body. The same endpoint returns the restored state (setUnblocked returns { ok, state }; src/app.ts:1277 route, and web/src/main.tsx:1207 uses const result = await api('DELETE', '/api/blocked', ...) as { state: string } then updateBlockedEntityState(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 new or marked_for_deletion state 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

  • package-checks: success

Questions

  • For POST /api/follows/bulk, is it intended that clearing the review marker of an already-followed user is not counted in the response? The new clearReviewFollowed run's .changes are discarded, so such a value is reported as added: 0, skipped: 1 even though the request did change is_review; tests/review-lifecycle.test.mjs asserts only statusCode 200 and the resulting is_review.
  • Should the review list show users in blocked state at all? The new card renders an Unblock action for user.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.
  • Should the Settings blocked-content-inspection panel 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

  • No test suite, benchmark, browser script, or Nix build was executed; the 217/217 Node, 60/60 Python, and package-check results quoted in REQUIREMENTS-TRACE.md and the PR text are unverified evidence, not observed output.
  • CUR-12, CUR-13 and CUR-14 are recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md; nothing supplied demonstrates the rendered review-card layout, the Slideshow action, or the Q-01/Q-02 scale gates.
  • Only the supplied diff and the files opened for context (src/app.ts routes and schemas, web/src/main.tsx, web/src/primary-views.tsx, web/src/style.css, scripts/browser-.mjs, scripts/augment-blocked-fixture.mjs, tests/) were inspected; no claim is made about behaviour elsewhere.
  • Version-policy conclusions (VERSION vs package.json vs CHANGELOG alignment) were read as supplied text only and were not checked against scripts/version.py.

Diff coverage

  • BENCHMARKS.md: reviewed — included in a context-limited batch
  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 10
  • Previous automated review: none found
  • Findings: 4
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `ee12f3de8313e6372115580d8ecb8544477df130` ## Verdict: 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 - **Benchmark's blocked-user lookup silently falls back to a subreddit because the target is never rendered** (scripts/benchmark-browser-interaction.mjs:154; high confidence) The lookup searches rendered `.blocked-media-list li` nodes for `fixture_blocked_user_00001`, but the panel renders only `blocked.slice(0, 100)` (web/src/main.tsx:1675) and GET /api/blocked/content returns rows `ORDER 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 new `settings_blocked_inspection_opened_ms` waits only for `document.querySelector('.blocked-media-list button') !== null` (line 149), i.e. the first row of a 100-row list, whereas the removed `blocked_navigation_loaded_ms` waited for all `blockedEntities + 1` nav buttons. Impact: `blocked_review_action_to_render_ms` no 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 claiming `blocked_navigation_loaded_ms` is '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_00001` is 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-inspection` details element renders `blocked.slice(0, 100)` and, when truncated, appends only an informational row `Showing 100 of {blocked.length} entities` (main.tsx:1679); there is no search box, cursor, or paging control. `blocked` is the full un-paged array from GET /api/blocked/content, ordered `ORDER 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 requires `row.querySelector('button').textContent === 'Unblock'`. The changed Settings list now inserts a `Browse` button before `Unblock` whenever the entity appears in `blockedEntityMap` (web/src/main.tsx:1659). In this fixture the first row by name sort is `u/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 only `blocked` table entries for `scale_*` 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) `unblockUser` calls DELETE /api/blocked and then applies `{ ...item, state: 'seen' }` to the review card, discarding the response body. The same endpoint returns the restored state (`setUnblocked` returns `{ ok, state }`; src/app.ts:1277 route, and web/src/main.tsx:1207 uses `const result = await api('DELETE', '/api/blocked', ...) as { state: string }` then `updateBlockedEntityState(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 `new` or `marked_for_deletion` state 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 - package-checks: **success** ### Questions - For POST /api/follows/bulk, is it intended that clearing the review marker of an already-followed user is not counted in the response? The new `clearReviewFollowed` run's `.changes` are discarded, so such a value is reported as `added: 0, skipped: 1` even though the request did change `is_review`; tests/review-lifecycle.test.mjs asserts only statusCode 200 and the resulting is_review. - Should the review list show users in `blocked` state at all? The new card renders an Unblock action for `user.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. - Should the Settings `blocked-content-inspection` panel 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 - No test suite, benchmark, browser script, or Nix build was executed; the 217/217 Node, 60/60 Python, and package-check results quoted in REQUIREMENTS-TRACE.md and the PR text are unverified evidence, not observed output. - CUR-12, CUR-13 and CUR-14 are recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md; nothing supplied demonstrates the rendered review-card layout, the Slideshow action, or the Q-01/Q-02 scale gates. - Only the supplied diff and the files opened for context (src/app.ts routes and schemas, web/src/main.tsx, web/src/primary-views.tsx, web/src/style.css, scripts/browser-*.mjs, scripts/augment-blocked-fixture.mjs, tests/*) were inspected; no claim is made about behaviour elsewhere. - Version-policy conclusions (VERSION vs package.json vs CHANGELOG alignment) were read as supplied text only and were not checked against scripts/version.py. ### Diff coverage - `BENCHMARKS.md`: **reviewed** — included in a context-limited batch - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 10 - Previous automated review: none found - Findings: 4 </details>
Author
Owner

Response to AI review feedback (commit ee12f3d)

All findings from the automated review have been addressed:

  1. Benchmark blocked-user lookup & complete list rendering (Important finding):

    • In web/src/main.tsx, removed the 100-slice cap so all blocked entities pending purge are rendered in details.blocked-content-inspection, ensuring blocked users are present and inspectable.
    • In scripts/benchmark-browser-interaction.mjs, updated settings_blocked_inspection_opened_ms to wait for all blockedEntities rows (.length >= ${blockedEntities}).
    • Made target row selection in the benchmark explicit: looking up fixture_blocked_user_00001 and throwing immediately if missing or lacking a Browse button, without falling back to a subreddit.
  2. Full blocked list completeness in Settings (Suggestion):

    • With the 100-slice cap removed, the inspection panel now shows both users and subreddits at scale without prefix truncation.
  3. Smoke assertions for media-bearing rows and Unblock/Browse button layout (Suggestion):

    • Extended scripts/browser-gallery-smoke.mjs to assert layout, column-gap, time, and button sequence for both u/alpha (single Unblock button) and u/blocked (Browse followed by Unblock).
    • Added an assertion in the 1,303 scale list check verifying that u/blocked (a media-bearing entity in the scale list) retains both Browse and Unblock buttons in the correct order.
  4. Accurate lifecycle state restored on unblockUser (Suggestion):

    • In web/src/primary-views.tsx, updated unblockUser to read result.state from the DELETE /api/blocked response ({ ok: boolean; state: string }), ensuring the restored state (new, seen, etc.) is accurately displayed.

Validation

  • TypeScript compilation & Vite bundle: Passed (npm run build).
  • OpenAPI generator: Generated cleanly.
  • Node unit suite: 217/217 passed (npm test).
  • Python schema suite: 60/60 passed (npm run test:schema).
  • Browser gallery smoke suite: Passed (node scripts/browser-gallery-smoke.mjs with Chromium headless, result: passed).
### Response to AI review feedback (commit ee12f3d) All findings from the automated review have been addressed: 1. **Benchmark blocked-user lookup & complete list rendering (Important finding):** - In `web/src/main.tsx`, removed the 100-slice cap so all blocked entities pending purge are rendered in `details.blocked-content-inspection`, ensuring blocked users are present and inspectable. - In `scripts/benchmark-browser-interaction.mjs`, updated `settings_blocked_inspection_opened_ms` to wait for all `blockedEntities` rows (`.length >= ${blockedEntities}`). - Made target row selection in the benchmark explicit: looking up `fixture_blocked_user_00001` and throwing immediately if missing or lacking a Browse button, without falling back to a subreddit. 2. **Full blocked list completeness in Settings (Suggestion):** - With the 100-slice cap removed, the inspection panel now shows both users and subreddits at scale without prefix truncation. 3. **Smoke assertions for media-bearing rows and Unblock/Browse button layout (Suggestion):** - Extended `scripts/browser-gallery-smoke.mjs` to assert layout, column-gap, time, and button sequence for both `u/alpha` (single `Unblock` button) and `u/blocked` (`Browse` followed by `Unblock`). - Added an assertion in the 1,303 scale list check verifying that `u/blocked` (a media-bearing entity in the scale list) retains both `Browse` and `Unblock` buttons in the correct order. 4. **Accurate lifecycle state restored on `unblockUser` (Suggestion):** - In `web/src/primary-views.tsx`, updated `unblockUser` to read `result.state` from the `DELETE /api/blocked` response (`{ ok: boolean; state: string }`), ensuring the restored state (`new`, `seen`, etc.) is accurately displayed. ### Validation - **TypeScript compilation & Vite bundle:** Passed (`npm run build`). - **OpenAPI generator:** Generated cleanly. - **Node unit suite:** 217/217 passed (`npm test`). - **Python schema suite:** 60/60 passed (`npm run test:schema`). - **Browser gallery smoke suite:** Passed (`node scripts/browser-gallery-smoke.mjs` with Chromium headless, result: passed).
Address review feedback on benchmark target lookup, complete inspection list, and button order assertions
All checks were successful
Branch and package checks / check (pull_request) Successful in 35s
Build and Push Attic Cache / build (pull_request) Successful in 35s
AI pull-request review / review (pull_request) Successful in 24m2s
2587233ae7
clankbot left a comment

Automated code review

Reviewed commit: 2587233ae7719c434f0be40ddee942ca6a273d1f

Verdict: 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) and POST /api/follows/bulk (src/app.ts:2842 plus the clearReviewFollowed update at 2845) reset is_review = 0 for users, including already-blocked/already-followed ones, and /api/blocked/bulk (src/app.ts:1303) reuses setBlocked, so tests/review-lifecycle.test.mjs and the new /api/blocked/content case in tests/blocked.test.mjs cover the routes that changed. The client mirrors this in toggleEntityFollow, the bulk-follow branch and updateBlockedEntityState, and FavouritesView removes 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 (switchView before setSelected/setSelectedOrigin), 'settings' is a valid View, the gallery h2 still renders Blocked <type>: <name> for the benchmark's wait condition, and nav[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 carried 2.6.0-dev7, and dev is required to advance beyond the current dev serial, which is why the merge lands at 2.7.0-dev8 and 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

  • Review-view Block/Unblock leaves the new Settings blocked-media inspection stale (web/src/primary-views.tsx:176; high confidence)
    blockUser/unblockUser/followUser (primary-views.tsx:165-198) call /api/blocked and /api/follows directly and only mutate setUsers; they never notify the App component. The new Settings panel renders from App's blocked state (main.tsx:1669-1680 blocked.length > 0 && <details className="blocked-content-inspection">, blocked.map(...)), and that state is populated only by the one-shot useEffect (...) , [] at main.tsx:220-221, by the gallery-only poller at main.tsx:229 (if (view !== 'gallery') return;), and by refreshBlockedContent() at main.tsx:1194/1209 inside App's own blockEntity/unblockEntity. The Settings fetch batch at main.tsx:270-277 loads /api/blocked and /api/blocked/purge but not /api/blocked/content. So review-view -> Settings with no intervening gallery visit renders the pre-action list; the same map feeds the Browse buttons added to the .blocked-category rows (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-category Browse affordance; unblocking from the review view leaves the entity listed, and its Browse button calls browseBlockedEntity, which routes the gallery to /api/blocked/content/<type>/<id>/media - a route that returns 404 when state !== '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 call refreshBlockedContent() plus /api/blocked and /api/blocked/purge after a successful action), or fetch /api/blocked/content when 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)
    toggleEntityFollow now 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). reviewFilter is App state (main.tsx:144) changed only by the select[aria-label="Review status"] that is rendered for view === 'users' (main.tsx:1398), and switchView (main.tsx:936-948) does not reset it, while the entity fetch applies the review parameter only for users (main.tsx:379/874). Contrast updateBlockedEntityState (main.tsx:1147-1152), which guards the row by name first and therefore only affects the acted entity.
    Impact: With reviewFilter left at 'reviewed' on /users and then acting in the subreddits view, every subreddit row has is_review false (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 updateBlockedEntityState does), or reset reviewFilter to 'all' in switchView when 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 click row.querySelector('button.primary'), i.e. the Browse button, waiting for the gallery user filter. openUserSlideshow (web/src/main.tsx:698-717) and the onSlideshowUser wiring (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>/media vs /api/media?user= branch selection or the .slideshow panel it produces.
    Impact: A wrong base URL for a review-marked user, an empty page, or a broken onSlideshowUser wiring 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, opens details.blocked-content-inspection, waits for document.querySelectorAll('.blocked-media-list li').length >= ${blockedEntities} and emits settings_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 at max-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 (and blocked_review_action_to_render_ms for the new Settings entry point) in place of, or beside, the superseded gallery-nav numbers.

Tests and validation

  • package-checks: success

Questions

  • BENCHMARKS.md attributes the blocked-inspection relocation to 2.7.0-dev8 while CHANGELOG.md records it under 2.6.0-dev7 (the feature-branch serial). Which version should the benchmark note cite for the change that was measured after the merge into dev?
  • Should the review-view Follow/Block/Unblock actions also refresh setBlockedList and setPurgePreview (as App's blockEntity/unblockEntity do at main.tsx:1163/1195/1211), so the adjacent Settings blocked-category counts and the purge preview stay correct after a review-list action?
  • Is the unbounded .blocked-media-list acceptable at the 3,000-entity fixture, or should the Settings inspection reuse the collapsible/sorted .blocked-category structure that CUR-09 requires for 1,283+ rows?

Review limitations

  • Branch history was not supplied: I cannot see the feature-branch commits, so the 2.6.0-dev7 changelog entry and the 2.6.0-dev6 -> 2.7.0-dev8 jump 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_alignment only asserts an entry exists for the current version (line 96) and does not order-check the history.
  • I did not run the build, the Node/Python suites, the Nix package check, or any browser script; the reported 217/217 and 60/60 results and 'package-checks: success' come from the pull-request text, not from executed evidence.
  • Live browser behaviour for CUR-12/CUR-13/CUR-14 is recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md and cannot be assessed from the supplied material.
  • The staleness finding depends on the unchanged useEffect dependency 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 batch
  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 11
  • Previous automated review: none found
  • Findings: 4
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `2587233ae7719c434f0be40ddee942ca6a273d1f` ## Verdict: 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) and `POST /api/follows/bulk` (src/app.ts:2842 plus the `clearReviewFollowed` update at 2845) reset `is_review = 0` for users, including already-blocked/already-followed ones, and `/api/blocked/bulk` (src/app.ts:1303) reuses `setBlocked`, so `tests/review-lifecycle.test.mjs` and the new `/api/blocked/content` case in `tests/blocked.test.mjs` cover the routes that changed. The client mirrors this in `toggleEntityFollow`, the bulk-follow branch and `updateBlockedEntityState`, and `FavouritesView` removes 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 (`switchView` before `setSelected`/`setSelectedOrigin`), `'settings'` is a valid `View`, the gallery `h2` still renders `Blocked <type>: <name>` for the benchmark's wait condition, and `nav[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 carried `2.6.0-dev7`, and dev is required to advance beyond the current dev serial, which is why the merge lands at `2.7.0-dev8` and 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 - **Review-view Block/Unblock leaves the new Settings blocked-media inspection stale** (web/src/primary-views.tsx:176; high confidence) `blockUser`/`unblockUser`/`followUser` (primary-views.tsx:165-198) call `/api/blocked` and `/api/follows` directly and only mutate `setUsers`; they never notify the App component. The new Settings panel renders from App's `blocked` state (main.tsx:1669-1680 `blocked.length > 0 && <details className="blocked-content-inspection">`, `blocked.map(...)`), and that state is populated only by the one-shot `useEffect (...) , []` at main.tsx:220-221, by the gallery-only poller at main.tsx:229 (`if (view !== 'gallery') return;`), and by `refreshBlockedContent()` at main.tsx:1194/1209 inside App's own `blockEntity`/`unblockEntity`. The Settings fetch batch at main.tsx:270-277 loads `/api/blocked` and `/api/blocked/purge` but not `/api/blocked/content`. So review-view -> Settings with no intervening gallery visit renders the pre-action list; the same map feeds the `Browse` buttons added to the `.blocked-category` rows (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-category` Browse affordance; unblocking from the review view leaves the entity listed, and its `Browse` button calls `browseBlockedEntity`, which routes the gallery to `/api/blocked/content/<type>/<id>/media` - a route that returns 404 when `state !== '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 call `refreshBlockedContent()` plus `/api/blocked` and `/api/blocked/purge` after a successful action), or fetch `/api/blocked/content` when 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) `toggleEntityFollow` now 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). `reviewFilter` is App state (main.tsx:144) changed only by the `select[aria-label="Review status"]` that is rendered for `view === 'users'` (main.tsx:1398), and `switchView` (main.tsx:936-948) does not reset it, while the entity fetch applies the `review` parameter only for users (main.tsx:379/874). Contrast `updateBlockedEntityState` (main.tsx:1147-1152), which guards the row by name first and therefore only affects the acted entity. Impact: With `reviewFilter` left at 'reviewed' on /users and then acting in the subreddits view, every subreddit row has `is_review` false (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 `updateBlockedEntityState` does), or reset `reviewFilter` to 'all' in `switchView` when 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 click `row.querySelector('button.primary')`, i.e. the Browse button, waiting for the gallery user filter. `openUserSlideshow` (web/src/main.tsx:698-717) and the `onSlideshowUser` wiring (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>/media` vs `/api/media?user=` branch selection or the `.slideshow` panel it produces. Impact: A wrong base URL for a review-marked user, an empty page, or a broken `onSlideshowUser` wiring 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, opens `details.blocked-content-inspection`, waits for `document.querySelectorAll('.blocked-media-list li').length >= ${blockedEntities}` and emits `settings_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 at `max-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` (and `blocked_review_action_to_render_ms` for the new Settings entry point) in place of, or beside, the superseded gallery-nav numbers. ### Tests and validation - package-checks: **success** ### Questions - BENCHMARKS.md attributes the blocked-inspection relocation to 2.7.0-dev8 while CHANGELOG.md records it under 2.6.0-dev7 (the feature-branch serial). Which version should the benchmark note cite for the change that was measured after the merge into dev? - Should the review-view Follow/Block/Unblock actions also refresh `setBlockedList` and `setPurgePreview` (as App's `blockEntity`/`unblockEntity` do at main.tsx:1163/1195/1211), so the adjacent Settings blocked-category counts and the purge preview stay correct after a review-list action? - Is the unbounded `.blocked-media-list` acceptable at the 3,000-entity fixture, or should the Settings inspection reuse the collapsible/sorted `.blocked-category` structure that CUR-09 requires for 1,283+ rows? ### Review limitations - Branch history was not supplied: I cannot see the feature-branch commits, so the `2.6.0-dev7` changelog entry and the `2.6.0-dev6` -> `2.7.0-dev8` jump 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_alignment` only asserts an entry exists for the current version (line 96) and does not order-check the history. - I did not run the build, the Node/Python suites, the Nix package check, or any browser script; the reported 217/217 and 60/60 results and 'package-checks: success' come from the pull-request text, not from executed evidence. - Live browser behaviour for CUR-12/CUR-13/CUR-14 is recorded as 'Awaiting live test' in REQUIREMENTS-TRACE.md and cannot be assessed from the supplied material. - The staleness finding depends on the unchanged `useEffect` dependency 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 batch - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 11 - Previous automated review: none found - Findings: 4 </details>
Author
Owner

Response to automated review on commit 2587233

1. Review-view Block/Unblock synchronization with Settings blocked inspection

  • Routed FavouritesView's followUser, blockUser, and unblockUser through new onFollowUser, onBlockUser, and onUnblockUser props wired directly to App's toggleEntityFollow, blockEntity, and unblockEntity in web/src/main.tsx.
  • App's blockEntity and unblockEntity invoke refreshBlockedContent() and update purge previews.
  • Added /api/blocked/content to the Promise.all batch in main.tsx for view === 'settings' to ensure blocked inspection content is never stale when entering Settings.
  • Captured restored lifecycle state in unblockUser from unblockEntity.

2. Review filter scoping

  • In toggleEntityFollow, scoped reviewFilter filtering to the specific acted row (if (item.name !== name) return [item]), preventing cross-entity removal (such as dropping subreddit rows when acting in subreddits).
  • In bulkEntityFollow, scoped reviewFilter filtering strictly to selected rows (if (!selectedEntityIds.includes(item.id)) return [item]).
  • In switchView, reset reviewFilter to 'all'.

3. Automated coverage for review card slideshow

  • Extended scripts/browser-gallery-smoke.mjs to click the Slideshow button for the review user card, wait for document.querySelector('.slideshow') !== null, close the slideshow via the close button, and wait for document.querySelector('.slideshow') === null.
  • Updated REQUIREMENTS-TRACE.md (CUR-13 row and summary) with the test evidence.

4. Benchmark metric clarification

  • Clarified in BENCHMARKS.md that the historical 312 ms measurement applied to the gallery navigation under earlier versions, while in 2.7.0-dev8 scripts/benchmark-browser-interaction.mjs measures settings_blocked_inspection_opened_ms and blocked_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 on 2.7.0-dev8.
### Response to automated review on commit `2587233` #### 1. Review-view Block/Unblock synchronization with Settings blocked inspection - Routed `FavouritesView`'s `followUser`, `blockUser`, and `unblockUser` through new `onFollowUser`, `onBlockUser`, and `onUnblockUser` props wired directly to App's `toggleEntityFollow`, `blockEntity`, and `unblockEntity` in `web/src/main.tsx`. - App's `blockEntity` and `unblockEntity` invoke `refreshBlockedContent()` and update purge previews. - Added `/api/blocked/content` to the `Promise.all` batch in `main.tsx` for `view === 'settings'` to ensure blocked inspection content is never stale when entering Settings. - Captured restored lifecycle state in `unblockUser` from `unblockEntity`. #### 2. Review filter scoping - In `toggleEntityFollow`, scoped `reviewFilter` filtering to the specific acted row (`if (item.name !== name) return [item]`), preventing cross-entity removal (such as dropping subreddit rows when acting in subreddits). - In `bulkEntityFollow`, scoped `reviewFilter` filtering strictly to selected rows (`if (!selectedEntityIds.includes(item.id)) return [item]`). - In `switchView`, reset `reviewFilter` to `'all'`. #### 3. Automated coverage for review card slideshow - Extended `scripts/browser-gallery-smoke.mjs` to click the `Slideshow` button for the review user card, wait for `document.querySelector('.slideshow') !== null`, close the slideshow via the close button, and wait for `document.querySelector('.slideshow') === null`. - Updated `REQUIREMENTS-TRACE.md` (CUR-13 row and summary) with the test evidence. #### 4. Benchmark metric clarification - Clarified in `BENCHMARKS.md` that the historical 312 ms measurement applied to the gallery navigation under earlier versions, while in `2.7.0-dev8` `scripts/benchmark-browser-interaction.mjs` measures `settings_blocked_inspection_opened_ms` and `blocked_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 on `2.7.0-dev8`.
Synchronize review actions with Settings blocked state, scope review filter, and add slideshow smoke test
All checks were successful
Branch and package checks / check (pull_request) Successful in 36s
Build and Push Attic Cache / build (pull_request) Successful in 37s
AI pull-request review / review (pull_request) Successful in 14m59s
9c8640b7bd
clankbot left a comment

Automated code review

Reviewed commit: 9c8640b7bd38e8babc80a26779d65ac657afba9c

Verdict: 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 drop if (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 for state IN ('new','seen') AND is_collector = 0 plus 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 = 0 to the UPDATEs in POST /api/blocked (src/app.ts:1169), POST /api/follows (src/app.ts:2799) and POST /api/follows/bulk (src/app.ts:2842), but registerEntityCreation (the handler for POST /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 runs UPDATE ${table} SET state='followed',followed_at=COALESCE(...),state_updated_at=...,updated_at=... WHERE id=? with no is_review reset, and POST /api/curation/import (src/app.ts:2396) does the same. POST /api/users/:user/review (src/app.ts:3044) sets is_review = 1 regardless of state, so a followed user can legitimately hold is_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=true while 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 = 0 reset in the followed branch of registerEntityCreation, decide explicitly whether POST /api/curation/import should 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>/media only when it finds the user in the client-side blocked state (blocked.find((item) => item.type === 'user' && ...)). That state is populated only by the view-gated loaders if (view !== 'gallery') return; (main.tsx:229-241) and if (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 reports No visible media for ${name}. The review card explicitly renders blocked users (user.state === 'blocked' ? Unblock : Block in web/src/primary-views.tsx) and enables the Slideshow button whenever user.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-side blocked list, 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

  • package-checks: success

Questions

  • CHANGELOG.md adds a ## 2.6.0-dev7 section 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?
  • BENCHMARKS.md keeps the historical 312 ms figure and states that 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

  • Only the supplied diff, PR text and checked-out repository files were available; no commands were run, so the reported test results (217/217 Node, 60/60 Python, nix build success) are taken from the PR description and not independently verified.
  • CUR-12, CUR-13 and CUR-14 are recorded in REQUIREMENTS-TRACE.md as 'Awaiting live test'; no supplied evidence demonstrates live browser behaviour, so the findings above concern code paths and state consistency, not observed UI defects.
  • The OpenAPI document is generated and was not inspected; no defect was assessed in code outside the supplied diff and the files reachable from it.
  • The benchmark script's new Settings-based measurement path was read but not executed, so its timing values and 3.5M fixture behaviour remain unverified.

Diff coverage

  • AGENTS.md: reviewed — included in a context-limited batch
  • BENCHMARKS.md: reviewed — included in a context-limited batch
  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 12
  • Previous automated review: none found
  • Findings: 3
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `9c8640b7bd38e8babc80a26779d65ac657afba9c` ## Verdict: 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 drop `if (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 for `state IN ('new','seen') AND is_collector = 0` plus 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 = 0` to the UPDATEs in `POST /api/blocked` (src/app.ts:1169), `POST /api/follows` (src/app.ts:2799) and `POST /api/follows/bulk` (src/app.ts:2842), but `registerEntityCreation` (the handler for `POST /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 runs `UPDATE ${table} SET state='followed',followed_at=COALESCE(...),state_updated_at=...,updated_at=... WHERE id=?` with no `is_review` reset, and `POST /api/curation/import` (src/app.ts:2396) does the same. `POST /api/users/:user/review` (src/app.ts:3044) sets `is_review = 1` regardless of state, so a followed user can legitimately hold `is_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=true` while 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 = 0` reset in the followed branch of `registerEntityCreation`, decide explicitly whether `POST /api/curation/import` should 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>/media` only when it finds the user in the client-side `blocked` state (`blocked.find((item) => item.type === 'user' && ...)`). That state is populated only by the view-gated loaders `if (view !== 'gallery') return;` (main.tsx:229-241) and `if (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 reports `No visible media for ${name}`. The review card explicitly renders blocked users (`user.state === 'blocked' ? Unblock : Block` in web/src/primary-views.tsx) and enables the Slideshow button whenever `user.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-side `blocked` list, 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 - package-checks: **success** ### Questions - CHANGELOG.md adds a `## 2.6.0-dev7` section 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? - BENCHMARKS.md keeps the historical 312 ms figure and states that `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 - Only the supplied diff, PR text and checked-out repository files were available; no commands were run, so the reported test results (217/217 Node, 60/60 Python, nix build success) are taken from the PR description and not independently verified. - CUR-12, CUR-13 and CUR-14 are recorded in REQUIREMENTS-TRACE.md as 'Awaiting live test'; no supplied evidence demonstrates live browser behaviour, so the findings above concern code paths and state consistency, not observed UI defects. - The OpenAPI document is generated and was not inspected; no defect was assessed in code outside the supplied diff and the files reachable from it. - The benchmark script's new Settings-based measurement path was read but not executed, so its timing values and 3.5M fixture behaviour remain unverified. ### Diff coverage - `AGENTS.md`: **reviewed** — included in a context-limited batch - `BENCHMARKS.md`: **reviewed** — included in a context-limited batch - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 12 - Previous automated review: none found - Findings: 3 </details>
Author
Owner

Response to automated review on commit 9c8640b

1. Bulk follow review filter scoping

  • In web/src/main.tsx (bulkEntityFollow), guarded reviewFilter filtering 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

  • In src/app.ts, updated registerEntityCreation (POST /api/users) to reset is_review = 0 when following an existing user.
  • In src/app.ts, updated POST /api/curation/import to reset is_review = 0 when importing users with desired state followed.
  • Extended tests/review-lifecycle.test.mjs with test assertions verifying that both POST /api/users (create-or-follow) and POST /api/curation/import (importing followed users) clear existing review markers.

3. Review-card Slideshow for blocked users on direct /review route

  • In web/src/primary-views.tsx, updated the review card's onSlideshowUser invocation to pass user.state === 'blocked' and user.id.
  • In web/src/main.tsx, updated openUserSlideshow to accept isBlocked and entityId, with fallback lookup to ensure the /api/blocked/content/user/:id/media route is chosen even when navigating directly to /review.
  • In web/src/main.tsx, added a view-change useEffect when entering view === 'review' to fetch /api/blocked/content.
  • In scripts/browser-gallery-smoke.mjs, added a direct navigation to /review with 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 /review blocked user slideshow test.
  • scripts/version.py check --branch dev: Verified alignment on 2.7.0-dev8.
### Response to automated review on commit `9c8640b` #### 1. Bulk follow review filter scoping - In `web/src/main.tsx` (`bulkEntityFollow`), guarded `reviewFilter` filtering 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 - In `src/app.ts`, updated `registerEntityCreation` (`POST /api/users`) to reset `is_review = 0` when following an existing user. - In `src/app.ts`, updated `POST /api/curation/import` to reset `is_review = 0` when importing users with desired state `followed`. - Extended `tests/review-lifecycle.test.mjs` with test assertions verifying that both `POST /api/users` (create-or-follow) and `POST /api/curation/import` (importing followed users) clear existing review markers. #### 3. Review-card Slideshow for blocked users on direct `/review` route - In `web/src/primary-views.tsx`, updated the review card's `onSlideshowUser` invocation to pass `user.state === 'blocked'` and `user.id`. - In `web/src/main.tsx`, updated `openUserSlideshow` to accept `isBlocked` and `entityId`, with fallback lookup to ensure the `/api/blocked/content/user/:id/media` route is chosen even when navigating directly to `/review`. - In `web/src/main.tsx`, added a view-change `useEffect` when entering `view === 'review'` to fetch `/api/blocked/content`. - In `scripts/browser-gallery-smoke.mjs`, added a direct navigation to `/review` with 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 `/review` blocked user slideshow test. - `scripts/version.py check --branch dev`: Verified alignment on `2.7.0-dev8`.
Clear review marker on create-or-follow and curation import, scope bulk-follow filter, and support direct review blocked slideshow
Some checks failed
Branch and package checks / check (pull_request) Successful in 36s
Build and Push Attic Cache / build (pull_request) Successful in 36s
AI pull-request review / review (pull_request) Has been cancelled
4c5b4e9130
Author
Owner

Code review — MR #25

Reviewed commit: 4c5b4e9130
Verdict: 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

  1. 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.

  2. 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.

  3. 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:

  • nix build --no-link --print-build-logs .#redview
  • All 217 Node tests and 60 Python tests within the package build
  • Package installation checks
  • npm run build
  • Existing Chromium gallery smoke test
  • Disposable Chromium probes reproducing all three findings
  • git diff --check

Current-head CI:

  • Branch and package checks: success
  • Build and Push Attic Cache: success
  • AI pull-request review: failure

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.

## Code review — MR #25 Reviewed commit: 4c5b4e913005f0d259f4e2b04d0f6033e8648cbc Verdict: 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 1. 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. 2. 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. 3. 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: - nix build --no-link --print-build-logs .#redview - All 217 Node tests and 60 Python tests within the package build - Package installation checks - npm run build - Existing Chromium gallery smoke test - Disposable Chromium probes reproducing all three findings - git diff --check Current-head CI: - Branch and package checks: success - Build and Push Attic Cache: success - AI pull-request review: failure 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.
Author
Owner

Automated Review Follow-up & Remediation

Addressed all three review findings on review view card actions and slideshow synchronization:

  1. Failed Follow retention:

    • Updated FavouritesView.followUser to check const ok = await onFollowUser(name); if (!ok) return; instead of unconditionally removing the user card.
    • Updated toggleEntityFollow in web/src/main.tsx to return true on success and false on failure.
    • If POST /api/follows fails, the user card remains visible with the Follow button available for retry.
  2. Failed Unblock retention:

    • Updated FavouritesView.unblockUser to only update card state when an authoritative non-null state is returned (if (!returnedState) return; / fallback if (!result.state) return;).
    • If DELETE /api/blocked fails, the user card retains its blocked state and the Unblock button remains available.
  3. Slideshow Follow synchronization with review list:

    • Added revision?: number prop to FavouritesView wired into useEffect dependencies [mode, sort, revision].
    • In web/src/main.tsx, incremented galleryRevision upon closing the slideshow (onClose={() => { setSlideshow(null); setGalleryRevision((r) => r + 1); }}) as well as in toggleEntityFollow/followMediaUser.
    • Closing a slideshow after following a user immediately re-fetches /api/users?review=true, synchronizing the review list and removing the followed user card.

Verification & Evidence

  • Smoke test regressions (scripts/browser-gallery-smoke.mjs):
    • Intercepted POST /api/follows with simulated 503: confirmed user card remains visible and Follow action remains clickable.
    • Intercepted DELETE /api/blocked with simulated 503: confirmed user card retains blocked state and Unblock action remains clickable.
    • Launched slideshow over review card, followed user in slideshow, and closed slideshow: confirmed review list re-fetches and removes the followed user.
    • Browser smoke test passed (result: "passed").
  • Test suite validation:
    • npm test: 217 passing tests.
    • npm run test:schema: 60 passing tests.
    • python3 scripts/version.py check --branch dev: aligned at 2.7.0-dev8.
  • Build: npm run build succeeded without manual openapi edits.
### Automated Review Follow-up & Remediation Addressed all three review findings on review view card actions and slideshow synchronization: 1. **Failed Follow retention:** - Updated `FavouritesView.followUser` to check `const ok = await onFollowUser(name); if (!ok) return;` instead of unconditionally removing the user card. - Updated `toggleEntityFollow` in `web/src/main.tsx` to return `true` on success and `false` on failure. - If `POST /api/follows` fails, the user card remains visible with the `Follow` button available for retry. 2. **Failed Unblock retention:** - Updated `FavouritesView.unblockUser` to only update card state when an authoritative non-null state is returned (`if (!returnedState) return;` / fallback `if (!result.state) return;`). - If `DELETE /api/blocked` fails, the user card retains its `blocked` state and the `Unblock` button remains available. 3. **Slideshow Follow synchronization with review list:** - Added `revision?: number` prop to `FavouritesView` wired into `useEffect` dependencies `[mode, sort, revision]`. - In `web/src/main.tsx`, incremented `galleryRevision` upon closing the slideshow (`onClose={() => { setSlideshow(null); setGalleryRevision((r) => r + 1); }}`) as well as in `toggleEntityFollow`/`followMediaUser`. - Closing a slideshow after following a user immediately re-fetches `/api/users?review=true`, synchronizing the review list and removing the followed user card. #### Verification & Evidence - **Smoke test regressions (`scripts/browser-gallery-smoke.mjs`):** - Intercepted `POST /api/follows` with simulated 503: confirmed user card remains visible and `Follow` action remains clickable. - Intercepted `DELETE /api/blocked` with simulated 503: confirmed user card retains `blocked` state and `Unblock` action remains clickable. - Launched slideshow over review card, followed user in slideshow, and closed slideshow: confirmed review list re-fetches and removes the followed user. - Browser smoke test passed (`result: "passed"`). - **Test suite validation:** - `npm test`: 217 passing tests. - `npm run test:schema`: 60 passing tests. - `python3 scripts/version.py check --branch dev`: aligned at `2.7.0-dev8`. - **Build:** `npm run build` succeeded without manual openapi edits.
Handle failed follow/unblock safely and synchronize review card on slideshow follow
Some checks failed
Branch and package checks / check (pull_request) Successful in 35s
Build and Push Attic Cache / build (pull_request) Successful in 40s
AI pull-request review / review (pull_request) Has been cancelled
c12947acab
Author
Owner

Code review follow-up — MR #25

Reviewed commit: c12947acab85152fd3fa8fbe85df2b0d80681552
Compared with previously reviewed commit: 4c5b4e913005f0d259f4e2b04d0f6033e8648cbc

Verdict: Requires further work

Previous findings

All three previous findings are addressed:

  • Failed Follow now returns false and retains the review card.
  • Failed Unblock returns without applying a fabricated state.
  • Review cards refresh after slideshow curation through the revision prop.

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 onClose always increments galleryRevision, 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:

  1. Open the gallery and choose Random.
  2. Select one media card.
  3. Open a media slideshow and close it without changing anything.
  4. The selection is cleared and the gallery order changes.

Observed in the disposable browser fixture: selected count changed from 1 to 0; the first media IDs changed from 37,74,2,111,39 to 97,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 through scripts/version.py. Before the next push, run the appropriate fix bump (currently this would advance to 2.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.
  • Updated 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:

  • Branch and package checks: success.
  • Build and Push Attic Cache: success.
  • AI pull-request review: pending.

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.

## Code review follow-up — MR #25 Reviewed commit: `c12947acab85152fd3fa8fbe85df2b0d80681552` Compared with previously reviewed commit: `4c5b4e913005f0d259f4e2b04d0f6033e8648cbc` **Verdict: Requires further work** ### Previous findings All three previous findings are addressed: - Failed Follow now returns false and retains the review card. - Failed Unblock returns without applying a fabricated state. - Review cards refresh after slideshow curation through the revision prop. 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 `onClose` always increments `galleryRevision`, 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: 1. Open the gallery and choose Random. 2. Select one media card. 3. Open a media slideshow and close it without changing anything. 4. The selection is cleared and the gallery order changes. Observed in the disposable browser fixture: selected count changed from 1 to 0; the first media IDs changed from `37,74,2,111,39` to `97,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 through `scripts/version.py`. Before the next push, run the appropriate fix bump (currently this would advance to `2.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`. - Updated `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: - Branch and package checks: success. - Build and Push Attic Cache: success. - AI pull-request review: pending. ### 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.
Author
Owner

Response to Code Review Follow-up (commit c12947a)

Addressing all findings and repository housekeeping from review follow-up #3544:

  1. Preserve gallery browsing state, selection, and Random ordering across slideshow close (Important finding):

    • Introduced a dedicated reviewRevision state in web/src/main.tsx, passed specifically to <FavouritesView revision={reviewRevision} />.
    • Restored Slideshow.onClose to setSlideshow(null) so opening and closing an unchanged slideshow does not trigger galleryRevision or reload gallery data.
    • Removed setGalleryRevision from toggleEntityFollow and followMediaUser, directing user follow invalidation exclusively to reviewRevision.
    • Added reviewRevision bumps to entity curation handlers (blockEntity, unblockEntity, reviewMediaUser, bulkEntityFollow, bulkUserReview, toggleMediaFavourite, deleteMedia) to keep FavouritesView and review cards synchronized while isolating the media gallery.
    • Added an end-to-end browser regression in scripts/browser-gallery-smoke.mjs verifying that selecting a media card and opening/closing an unchanged slideshow under Random sorting preserves the selection count and exact media ordering without requesting a new random seed.
  2. Repository housekeeping & metadata alignment:

    • Advanced the dev serial from 2.7.0-dev8 to 2.7.0-dev9 via python3 scripts/version.py bump fix --note "Preserve gallery browsing on slideshow close and scope review synchronization". Aligned VERSION, package.json, and CHANGELOG.md.
    • Recorded review follow-up test evidence, regression details, and remaining acceptance limits in REQUIREMENTS-TRACE.md.

Validation Evidence

  • Browser gallery smoke suite (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.
  • Node test suite (npm test): 217/217 passed.
  • Python schema suite (npm run test:schema): 60/60 passed.
  • Build & OpenAPI (npm run build): Rebuilt cleanly without manual openapi edits.
  • Version alignment (python3 scripts/version.py check --branch dev): Clean at 2.7.0-dev9.
### Response to Code Review Follow-up (commit `c12947a`) Addressing all findings and repository housekeeping from review follow-up #3544: 1. **Preserve gallery browsing state, selection, and Random ordering across slideshow close (Important finding):** - Introduced a dedicated `reviewRevision` state in `web/src/main.tsx`, passed specifically to `<FavouritesView revision={reviewRevision} />`. - Restored `Slideshow.onClose` to `setSlideshow(null)` so opening and closing an unchanged slideshow does not trigger `galleryRevision` or reload gallery data. - Removed `setGalleryRevision` from `toggleEntityFollow` and `followMediaUser`, directing user follow invalidation exclusively to `reviewRevision`. - Added `reviewRevision` bumps to entity curation handlers (`blockEntity`, `unblockEntity`, `reviewMediaUser`, `bulkEntityFollow`, `bulkUserReview`, `toggleMediaFavourite`, `deleteMedia`) to keep `FavouritesView` and review cards synchronized while isolating the media gallery. - Added an end-to-end browser regression in `scripts/browser-gallery-smoke.mjs` verifying that selecting a media card and opening/closing an unchanged slideshow under `Random` sorting preserves the selection count and exact media ordering without requesting a new random seed. 2. **Repository housekeeping & metadata alignment:** - Advanced the dev serial from `2.7.0-dev8` to `2.7.0-dev9` via `python3 scripts/version.py bump fix --note "Preserve gallery browsing on slideshow close and scope review synchronization"`. Aligned `VERSION`, `package.json`, and `CHANGELOG.md`. - Recorded review follow-up test evidence, regression details, and remaining acceptance limits in `REQUIREMENTS-TRACE.md`. #### Validation Evidence - **Browser gallery smoke suite (`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. - **Node test suite (`npm test`):** 217/217 passed. - **Python schema suite (`npm run test:schema`):** 60/60 passed. - **Build & OpenAPI (`npm run build`):** Rebuilt cleanly without manual openapi edits. - **Version alignment (`python3 scripts/version.py check --branch dev`):** Clean at `2.7.0-dev9`.
Preserve gallery browsing on slideshow close and scope review synchronization (2.7.0-dev9)
Some checks failed
Branch and package checks / check (pull_request) Successful in 42s
Build and Push Attic Cache / build (pull_request) Successful in 42s
AI pull-request review / review (pull_request) Failing after 30m46s
a7fdd7eec9
Author
Owner

Code review follow-up — MR #25

Reviewed commit: a7fdd7eec98972a705cf189bf9cda93095a654ff (2.7.0-dev9)
Compared with previous reviewed head: c12947acab85152fd3fa8fbe85df2b0d80681552

Verdict: 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–202
Confidence: 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_review flags 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:

  1. Mark user visible for review.
  2. Open the gallery and enable the Review filter.
  3. Open a media slideshow for that user and click Follow user.
  4. The API clears review, but the slideshow still offers Remove review: visible.
  5. Close the slideshow. The Review filter remains checked, the gallery still displays 50 cards and Gallery (125), while GET /api/media?review=true returns total: 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.
  • Updated scripts/browser-gallery-smoke.mjs.
  • Independent Random-order/selection preservation probe.
  • Version alignment/branch check and 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.

## Code review follow-up — MR #25 Reviewed commit: `a7fdd7eec98972a705cf189bf9cda93095a654ff` (`2.7.0-dev9`) Compared with previous reviewed head: `c12947acab85152fd3fa8fbe85df2b0d80681552` **Verdict: 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–202` Confidence: 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_review` flags 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: 1. Mark user `visible` for review. 2. Open the gallery and enable the Review filter. 3. Open a media slideshow for that user and click Follow user. 4. The API clears review, but the slideshow still offers `Remove review: visible`. 5. Close the slideshow. The Review filter remains checked, the gallery still displays 50 cards and `Gallery (125)`, while `GET /api/media?review=true` returns `total: 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`. - Updated `scripts/browser-gallery-smoke.mjs`. - Independent Random-order/selection preservation probe. - Version alignment/branch check and `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.
Author
Owner

Response to Code Review Follow-up (commit a7fdd7e)

Addressing review finding regarding slideshow review action synchronization and review-filtered gallery reconciliation:

  1. Slideshow review action synchronization:

    • In web/src/slideshow.tsx (toggleFollowUser), when onFollowUser succeeds for a user being followed (!following), all slideshow items for that user have is_user_review updated to false.
    • The slideshow review action button immediately updates from Remove review: <user> to Review later: <user>, keeping the in-slideshow triage state accurate and preventing subsequent actions on stale review state.
  2. Review-filtered gallery reconciliation:

    • In web/src/main.tsx, added clearUserReviewMedia(userName) invoked by followMediaUser, toggleEntityFollow, and bulkEntityFollow.
    • When filterReview is active, following a user clears their matching media rows, reconciles selectedMediaIds, updates nextCursor, and queries the authoritative server total via /api/media?review=true&limit=1 (emptying the gallery to Gallery (0) when no items remain).
    • When filterReview is inactive, clearUserReviewMedia updates is_user_review: false in place on loaded media without removing items, clearing selections, resetting cursors, or altering Random order.
  3. Repository housekeeping & version bump:

    • Bumped dev serial from 2.7.0-dev9 to 2.7.0-dev10 via python3 scripts/version.py bump fix --note "Reconcile slideshow review state and review-filtered gallery on follow". Aligned VERSION, package.json, and CHANGELOG.md.
    • Recorded test evidence and acceptance limits in REQUIREMENTS-TRACE.md.

Validation Evidence

  • Browser gallery smoke suite (scripts/browser-gallery-smoke.mjs): Passed cleanly in headless Chromium (result: "passed"), verifying:
    • Opening a review-filtered gallery (Gallery (125)).
    • Launching slideshow and verifying Remove review: visible is rendered.
    • Clicking Follow user: visible and verifying the review button immediately updates to Review later: visible.
    • Closing the slideshow and verifying the gallery is updated to Gallery (0) with 0 media tiles, consistent with GET /api/media?review=true returning total: 0.
  • Node test suite (npm test): 217/217 passed.
  • Python schema suite (npm run test:schema): 60/60 passed.
  • Build & OpenAPI (npm run build): Rebuilt cleanly without manual openapi edits.
  • Version alignment (python3 scripts/version.py check --branch dev): Clean at 2.7.0-dev10.
### Response to Code Review Follow-up (commit `a7fdd7e`) Addressing review finding regarding slideshow review action synchronization and review-filtered gallery reconciliation: 1. **Slideshow review action synchronization:** - In `web/src/slideshow.tsx` (`toggleFollowUser`), when `onFollowUser` succeeds for a user being followed (`!following`), all slideshow items for that user have `is_user_review` updated to `false`. - The slideshow review action button immediately updates from `Remove review: <user>` to `Review later: <user>`, keeping the in-slideshow triage state accurate and preventing subsequent actions on stale review state. 2. **Review-filtered gallery reconciliation:** - In `web/src/main.tsx`, added `clearUserReviewMedia(userName)` invoked by `followMediaUser`, `toggleEntityFollow`, and `bulkEntityFollow`. - When `filterReview` is active, following a user clears their matching media rows, reconciles `selectedMediaIds`, updates `nextCursor`, and queries the authoritative server total via `/api/media?review=true&limit=1` (emptying the gallery to `Gallery (0)` when no items remain). - When `filterReview` is inactive, `clearUserReviewMedia` updates `is_user_review: false` in place on loaded media without removing items, clearing selections, resetting cursors, or altering Random order. 3. **Repository housekeeping & version bump:** - Bumped dev serial from `2.7.0-dev9` to `2.7.0-dev10` via `python3 scripts/version.py bump fix --note "Reconcile slideshow review state and review-filtered gallery on follow"`. Aligned `VERSION`, `package.json`, and `CHANGELOG.md`. - Recorded test evidence and acceptance limits in `REQUIREMENTS-TRACE.md`. #### Validation Evidence - **Browser gallery smoke suite (`scripts/browser-gallery-smoke.mjs`):** Passed cleanly in headless Chromium (`result: "passed"`), verifying: - Opening a review-filtered gallery (`Gallery (125)`). - Launching slideshow and verifying `Remove review: visible` is rendered. - Clicking `Follow user: visible` and verifying the review button immediately updates to `Review later: visible`. - Closing the slideshow and verifying the gallery is updated to `Gallery (0)` with 0 media tiles, consistent with `GET /api/media?review=true` returning `total: 0`. - **Node test suite (`npm test`):** 217/217 passed. - **Python schema suite (`npm run test:schema`):** 60/60 passed. - **Build & OpenAPI (`npm run build`):** Rebuilt cleanly without manual openapi edits. - **Version alignment (`python3 scripts/version.py check --branch dev`):** Clean at `2.7.0-dev10`.
Reconcile slideshow review state and review-filtered gallery on follow (2.7.0-dev10)
All checks were successful
Branch and package checks / check (pull_request) Successful in 38s
Build and Push Attic Cache / build (pull_request) Successful in 40s
AI pull-request review / review (pull_request) Successful in 24m1s
f8560b987f
Author
Owner

Code review follow-up — MR #25

Reviewed commit: f8560b987fbf9082bf7ffd3aa08353897c0a08e5 (2.7.0-dev10)
Compared with previous reviewed head: a7fdd7eec98972a705cf189bf9cda93095a654ff

Verdict: 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–561
Confidence: 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:

  1. 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.

  2. 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:296
Confidence: High.

The new cleanup sends DELETE to /api/follows/visible, but the application defines DELETE /api/follows with 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.
  • Updated scripts/browser-gallery-smoke.mjs.
  • Version alignment/branch check and 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.

## Code review follow-up — MR #25 Reviewed commit: `f8560b987fbf9082bf7ffd3aa08353897c0a08e5` (`2.7.0-dev10`) Compared with previous reviewed head: `a7fdd7eec98972a705cf189bf9cda93095a654ff` **Verdict: 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–561` Confidence: 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: 1. **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. 2. **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:296` Confidence: High. The new cleanup sends DELETE to `/api/follows/visible`, but the application defines DELETE `/api/follows` with 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`. - Updated `scripts/browser-gallery-smoke.mjs`. - Version alignment/branch check and `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.
clankbot left a comment

Automated code review

Reviewed commit: f8560b987fbf9082bf7ffd3aa08353897c0a08e5

Verdict: 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/content and /api/blocked/content/:type/:id/media consumers, a collapsible details.blocked-content-inspection list plus per-row Browse buttons), CUR-12 is_review clearing across the follow/block entry points in src/app.ts, and CUR-13/CUR-14 restructuring of the review list onto the shared .entity-list/.entity-card markup with a direct Slideshow action and a new reviewRevision signal. 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) and POST /api/follows/bulk (2844-2862, with the added clearReviewFollowed update for already-followed users) all clear is_review, matching the new tests/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

  • Smoke test unfollows through a route that does not exist, so the cleanup step is a silent no-op (scripts/browser-gallery-smoke.mjs:296; high confidence)
    Line 296 runs fetch('/api/follows/visible', { method: 'DELETE' }).then(() => true). src/app.ts registers only app.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, turning filterReview off, so the line 298 wait for Gallery (125) passes whether or not visible was unfollowed.
    Impact: The intended state restoration never occurs: visible stays 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-mark visible (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 via fetch('/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) calls setReviewRevision((r) => r + 1) at line 497 and deleteMedia does the same at line 517. Both are wired into the slideshow (onFavourite at main.tsx:1902, onDelete at 1907). reviewRevision is passed to FavouritesView as revision (main.tsx:1406) and is a dependency of that component's load effect: }, [mode, sort, revision]); (primary-views.tsx:138), whose body runs setMedia([]); setUsers([]); setCursor(null); setBusy(true) (primary-views.tsx:129). openUserSlideshow (main.tsx:~776) sets setSlideshow(...) without calling switchView, so the review card's Slideshow action (primary-views.tsx) keeps view === '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 setReviewRevision to actions that change review membership (the follow/block/unblock/review toggles at lines 606, 657, 671, 721, 734, 1284, 1302) and drop it from toggleMediaFavourite/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, where blocked is the full /api/blocked/content payload (src/app.ts:1095 returns every blocked user/subreddit with media_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.mjs now waits for document.querySelectorAll('.blocked-media-list li').length >= ${blockedEntities} on the 3,000-blocked-entity fixture, and BENCHMARKS.md states that settings_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-category lists, 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_ms on the 3.5M fixture before treating the relocation as scale-accepted.

Tests and validation

  • package-checks: success

Questions

  • The review card renders Follow only for state === 'new' || state === 'seen' (web/src/primary-views.tsx) while POST /api/users/:user/review has 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?
  • Is the review view's Slideshow action expected to keep 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?
  • For the added blockedEntityMap/selectedOrigin navigation, is 'Back to Settings' the intended fallback when selectedOrigin is null (main.tsx:~1502 banner), including for a user browsed from the Users or Review view whose blocked entry was not found?

Review limitations

  • Only the supplied diff and the checked-out repository were available; I did not execute the Node or Python suites, the browser smoke scripts, or the benchmark, so the reported 217/217 and 60/60 test results and all timing figures are taken from the supplied documents as untrusted evidence.
  • No live-browser or production-scale evidence is supplied for CUR-12, CUR-13 or CUR-14; REQUIREMENTS-TRACE.md marks all three as 'Awaiting live test', and the 3.5M re-measurement of settings_blocked_inspection_opened_ms is stated as pending.
  • The OpenAPI schema is generated by npm run build and 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.
  • I did not verify the Nix package or install-check output beyond the supplied material; no CI or package-check output was included in this prompt.
  • No PR description text was supplied in this prompt, so version-target alignment (VERSION and package.json set to 2.7.0-dev10 against CHANGELOG entries for 2.7.0-dev8/9/10) was assessed only against the diff itself, which is internally consistent.

Diff coverage

  • AGENTS.md: reviewed — included in a context-limited batch
  • BENCHMARKS.md: reviewed — included in a context-limited batch
  • CHANGELOG.md: reviewed — included in a context-limited batch
  • REQUIREMENTS-TRACE.md: reviewed — included in a context-limited batch
  • REQUIREMENTS.md: reviewed — included in a context-limited batch
  • VERSION: reviewed — included in a context-limited batch
  • package.json: reviewed — included in a context-limited batch
  • scripts/benchmark-browser-interaction.mjs: reviewed — included in a context-limited batch
  • scripts/browser-gallery-smoke.mjs: reviewed — included in a context-limited batch
  • src/app.ts: reviewed — included in a context-limited batch
  • tests/blocked.test.mjs: reviewed — included in a context-limited batch
  • tests/review-lifecycle.test.mjs: reviewed — included in a context-limited batch
  • web/src/main.tsx: reviewed — included in a context-limited batch
  • web/src/primary-views.tsx: reviewed — included in a context-limited batch
  • web/src/slideshow.tsx: reviewed — included in a context-limited batch
  • web/src/style.css: reviewed — included in a context-limited batch
Review metadata
  • Reviewer: forgejo-ai-review v1
  • Model: strata/strata
  • Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md
  • Commits considered: 16
  • Previous automated review: none found
  • Findings: 3
<!-- forgejo-ai-review:v1 --> ## Automated code review Reviewed commit: `f8560b987fbf9082bf7ffd3aa08353897c0a08e5` ## Verdict: 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/content` and `/api/blocked/content/:type/:id/media` consumers, a collapsible `details.blocked-content-inspection` list plus per-row Browse buttons), CUR-12 `is_review` clearing across the follow/block entry points in `src/app.ts`, and CUR-13/CUR-14 restructuring of the review list onto the shared `.entity-list`/`.entity-card` markup with a direct Slideshow action and a new `reviewRevision` signal. 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) and `POST /api/follows/bulk` (2844-2862, with the added `clearReviewFollowed` update for already-followed users) all clear `is_review`, matching the new `tests/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 - **Smoke test unfollows through a route that does not exist, so the cleanup step is a silent no-op** (scripts/browser-gallery-smoke.mjs:296; high confidence) Line 296 runs `fetch('/api/follows/visible', { method: 'DELETE' }).then(() => true)`. `src/app.ts` registers only `app.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, turning `filterReview` off, so the line 298 wait for `Gallery (125)` passes whether or not `visible` was unfollowed. Impact: The intended state restoration never occurs: `visible` stays 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-mark `visible` (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 via `fetch('/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) calls `setReviewRevision((r) => r + 1)` at line 497 and `deleteMedia` does the same at line 517. Both are wired into the slideshow (`onFavourite` at main.tsx:1902, `onDelete` at 1907). `reviewRevision` is passed to `FavouritesView` as `revision` (main.tsx:1406) and is a dependency of that component's load effect: `}, [mode, sort, revision]);` (primary-views.tsx:138), whose body runs `setMedia([]); setUsers([]); setCursor(null); setBusy(true)` (primary-views.tsx:129). `openUserSlideshow` (main.tsx:~776) sets `setSlideshow(...)` without calling `switchView`, so the review card's Slideshow action (primary-views.tsx) keeps `view === '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 `setReviewRevision` to actions that change review membership (the follow/block/unblock/review toggles at lines 606, 657, 671, 721, 734, 1284, 1302) and drop it from `toggleMediaFavourite`/`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, where `blocked` is the full `/api/blocked/content` payload (src/app.ts:1095 returns every blocked user/subreddit with `media_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.mjs` now waits for `document.querySelectorAll('.blocked-media-list li').length >= ${blockedEntities}` on the 3,000-blocked-entity fixture, and BENCHMARKS.md states that `settings_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-category` lists, 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_ms` on the 3.5M fixture before treating the relocation as scale-accepted. ### Tests and validation - package-checks: **success** ### Questions - The review card renders Follow only for `state === 'new' || state === 'seen'` (web/src/primary-views.tsx) while `POST /api/users/:user/review` has 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? - Is the review view's Slideshow action expected to keep `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? - For the added `blockedEntityMap`/`selectedOrigin` navigation, is 'Back to Settings' the intended fallback when `selectedOrigin` is null (main.tsx:~1502 banner), including for a user browsed from the Users or Review view whose blocked entry was not found? ### Review limitations - Only the supplied diff and the checked-out repository were available; I did not execute the Node or Python suites, the browser smoke scripts, or the benchmark, so the reported 217/217 and 60/60 test results and all timing figures are taken from the supplied documents as untrusted evidence. - No live-browser or production-scale evidence is supplied for CUR-12, CUR-13 or CUR-14; REQUIREMENTS-TRACE.md marks all three as 'Awaiting live test', and the 3.5M re-measurement of `settings_blocked_inspection_opened_ms` is stated as pending. - The OpenAPI schema is generated by `npm run build` and 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. - I did not verify the Nix package or install-check output beyond the supplied material; no CI or package-check output was included in this prompt. - No PR description text was supplied in this prompt, so version-target alignment (VERSION and package.json set to 2.7.0-dev10 against CHANGELOG entries for 2.7.0-dev8/9/10) was assessed only against the diff itself, which is internally consistent. ### Diff coverage - `AGENTS.md`: **reviewed** — included in a context-limited batch - `BENCHMARKS.md`: **reviewed** — included in a context-limited batch - `CHANGELOG.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS-TRACE.md`: **reviewed** — included in a context-limited batch - `REQUIREMENTS.md`: **reviewed** — included in a context-limited batch - `VERSION`: **reviewed** — included in a context-limited batch - `package.json`: **reviewed** — included in a context-limited batch - `scripts/benchmark-browser-interaction.mjs`: **reviewed** — included in a context-limited batch - `scripts/browser-gallery-smoke.mjs`: **reviewed** — included in a context-limited batch - `src/app.ts`: **reviewed** — included in a context-limited batch - `tests/blocked.test.mjs`: **reviewed** — included in a context-limited batch - `tests/review-lifecycle.test.mjs`: **reviewed** — included in a context-limited batch - `web/src/main.tsx`: **reviewed** — included in a context-limited batch - `web/src/primary-views.tsx`: **reviewed** — included in a context-limited batch - `web/src/slideshow.tsx`: **reviewed** — included in a context-limited batch - `web/src/style.css`: **reviewed** — included in a context-limited batch <details><summary>Review metadata</summary> - Reviewer: forgejo-ai-review v1 - Model: strata/strata - Guidance loaded: .forgejo/ai-review.md, .forgejo/ai-review.yml, AGENTS.md, README.md - Commits considered: 16 - Previous automated review: none found - Findings: 3 </details>
Author
Owner

Review Feedback Follow-up (Commit 8912580, Version 2.7.0-dev11)

Addressed findings from review comment #3550:

  1. [P2] Page loader reset and state cleanup during review reconciliation:

    • In web/src/main.tsx (clearUserReviewMedia), pageLoader.current.reset(), setLoadingMore(false), and setLoadMoreError(false) are now called whenever review media reconciliation occurs.
    • This fixes:
      • Rebased cursor collision: reset() clears lastCompletedCursor, preventing subsequent requests from being discarded as duplicate when an offset is rebased back to a previously loaded cursor offset (e.g. 100 -> 50).
      • In-flight request abortion: in-flight loads are aborted so their callbacks cannot append stale cards after galleryEpoch increments, preventing loadingMore from getting permanently stuck at true.
    • Added focused regression in tests/gallery-pagination.test.mjs verifying that rebasing a cursor offset back to an already-completed offset is permitted and fetched after loader.reset().
  2. Fixed smoke-test unfollow cleanup route:

    • In scripts/browser-gallery-smoke.mjs, corrected the unfollow call from DELETE /api/follows/visible (invalid route) to fetch('/api/follows', { method: 'DELETE', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ type: 'user', value: 'visible' }) }) and asserted response.ok.
  3. Multi-user / multi-page review pagination browser test:

    • Added end-to-end regression in scripts/browser-gallery-smoke.mjs testing two review users with media spanning multiple pages.
    • Verified that following one review user removes all their loaded cards (95 cards), updates the server total and heading (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 at 2.7.0-dev11.
  • REQUIREMENTS-TRACE.md, CHANGELOG.md, VERSION, and package.json aligned.
### Review Feedback Follow-up (Commit 8912580, Version 2.7.0-dev11) Addressed findings from review comment #3550: 1. **[P2] Page loader reset and state cleanup during review reconciliation:** - In `web/src/main.tsx` (`clearUserReviewMedia`), `pageLoader.current.reset()`, `setLoadingMore(false)`, and `setLoadMoreError(false)` are now called whenever review media reconciliation occurs. - This fixes: - Rebased cursor collision: `reset()` clears `lastCompletedCursor`, preventing subsequent requests from being discarded as duplicate when an offset is rebased back to a previously loaded cursor offset (e.g. 100 -> 50). - In-flight request abortion: in-flight loads are aborted so their callbacks cannot append stale cards after `galleryEpoch` increments, preventing `loadingMore` from getting permanently stuck at `true`. - Added focused regression in `tests/gallery-pagination.test.mjs` verifying that rebasing a cursor offset back to an already-completed offset is permitted and fetched after `loader.reset()`. 2. **Fixed smoke-test unfollow cleanup route:** - In `scripts/browser-gallery-smoke.mjs`, corrected the unfollow call from `DELETE /api/follows/visible` (invalid route) to `fetch('/api/follows', { method: 'DELETE', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ type: 'user', value: 'visible' }) })` and asserted `response.ok`. 3. **Multi-user / multi-page review pagination browser test:** - Added end-to-end regression in `scripts/browser-gallery-smoke.mjs` testing two review users with media spanning multiple pages. - Verified that following one review user removes all their loaded cards (95 cards), updates the server total and heading (`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 at `2.7.0-dev11`. - `REQUIREMENTS-TRACE.md`, `CHANGELOG.md`, `VERSION`, and `package.json` aligned.
Reset page loader on review gallery reconciliation and fix unfollow cleanup
Some checks failed
Branch and package checks / check (pull_request) Successful in 37s
Build and Push Attic Cache / build (pull_request) Successful in 40s
AI pull-request review / review (pull_request) Failing after 30m44s
89125801d0
Author
Owner

Code review follow-up — MR #25

Reviewed commit: 89125801d001d7074aa3f9d1033ec4295c39c769 (2.7.0-dev11)
Compared with previous reviewed head: f8560b987fbf9082bf7ffd3aa08353897c0a08e5

Verdict: No actionable code findings in this review.

Previous findings resolved

  • Completed-cursor collision: the page-loader reset clears its cached completed cursor before review reconciliation. The independent reproduction now loads all 75 remaining media, with 75 unique IDs and no missing cards.
  • In-flight request / stuck loading: reset invalidates the old page-loader generation and clears loading/error state. Holding a page response, following the user and then releasing the stale response now recovers to all 75 remaining cards, without duplicates or a stuck Loading button.
  • Smoke-test cleanup: unfollow uses DELETE /api/follows with 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.
  • Full updated scripts/browser-gallery-smoke.mjs: passed, including review actions, multi-user pagination and unchanged-slideshow Random/selection preservation.
  • Separate Chromium probes for the exact completed-cursor collision and delayed in-flight page cases: passed.
  • Version alignment/branch check and 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.

## Code review follow-up — MR #25 Reviewed commit: `89125801d001d7074aa3f9d1033ec4295c39c769` (`2.7.0-dev11`) Compared with previous reviewed head: `f8560b987fbf9082bf7ffd3aa08353897c0a08e5` **Verdict: No actionable code findings in this review.** ### Previous findings resolved - **Completed-cursor collision:** the page-loader reset clears its cached completed cursor before review reconciliation. The independent reproduction now loads all 75 remaining media, with 75 unique IDs and no missing cards. - **In-flight request / stuck loading:** reset invalidates the old page-loader generation and clears loading/error state. Holding a page response, following the user and then releasing the stale response now recovers to all 75 remaining cards, without duplicates or a stuck Loading button. - **Smoke-test cleanup:** unfollow uses DELETE `/api/follows` with 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. - Full updated `scripts/browser-gallery-smoke.mjs`: passed, including review actions, multi-user pagination and unchanged-slideshow Random/selection preservation. - Separate Chromium probes for the exact completed-cursor collision and delayed in-flight page cases: passed. - Version alignment/branch check and `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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nimmo/redview!25
No description provided.