Skip to content

Fix frontend bugs found in the code-quality review - #839

Merged
NielsRogge merged 1 commit into
mainfrom
claude/frontend-review-bugs
Oct 30, 2026
Merged

NielsRogge merged 1 commit into
mainfrom
claude/frontend-review-bugs

Conversation

@NielsRogge

@NielsRogge NielsRogge commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the concrete bugs (section A) from the 2026-10-30 frontend code-quality review. Frontend only; no API or route contract changes.

Fixes

  • Submissions "Load more" broke after ~20 clicks. It grew limit by 25 and refetched from offset 0; the API caps limit at 500. It is now a useInfiniteQuery with 25-row pages per status. For "all", it merges the next page of every status and advances each status offset by the rows it contributed, so ordering stays exact. Refetches recompute offsets from fresh pages.
  • Missing edit-type filters: added hf_artifacts and organizations.
  • Signed-out Save built the login URL with apiUrl instead of authUrl. It now uses the existing Saved Papers authorization flow, which also resumes the save after login.
  • Logout kept user data in the cache (bookmark icons stayed filled). AuthProvider now resets queries when the user goes from signed in to signed out, including on stale-auth events.
  • Saved papers passed rank={1} to every card, so every thumbnail loaded eagerly with high priority. Cards now get page-wide positions.
  • Admin pages unstyled on direct navigation:
    • submission-loading/submission-empty (used by the App route gates) moved to styles/features/admin.css.
    • AutonomousOperations imports the cron stylesheet it uses.
  • Removed the dead admin-token path. Nothing writes the cronAdminToken localStorage key, yet the transport would send it as X-Admin-Token. Agent and CLI X-Admin-Token usage via curl is unaffected.
  • Tasks editor showed "Tasks updated" in onMutate, before the server answered. The toast now appears in onSuccess; the optimistic update and rollback are unchanged.
  • Infinite feeds stalled when a filter change left the sentinel visible; only AuthorDetailView had the fix. A new useInfiniteScroll hook replaces 8 copied sentinel effects and their exhaustive-deps suppressions.
  • SubmitView invalidated 3 of 14 paper-feed families by hand; it now calls invalidatePaperFeeds.

Validation

  • npx tsc -p tsconfig.app.json --noEmit: clean.
  • npx eslint src: 0 errors. The 17 warnings are all pre-existing react-refresh warnings.
  • npx vitest run: 938 passed, 2 failed. Both failures are in BenchmarkDetailView.test.tsx and fail identically on unmodified origin/main 18a9d2a.
  • New regression test: "all" status pagination keeps limit at 25 and advances per-status offsets (pending 13, approved 12, rejected 0).

🤖 Generated with Claude Code


Note

Medium Risk
Changes auth redirects, query cache lifecycle on logout, and admin submissions pagination logic; admin token header removal is intentional but touches request transport behavior.

Overview
Fixes several frontend bugs from the code-quality review: submissions “Load more”, auth/bookmark UX, feed scrolling, and admin styling/security cleanup.

The submissions dashboard no longer grows limit until the API cap breaks pagination; it uses useInfiniteQuery with fixed 25-row pages and per-status offsets when viewing all statuses (merged newest-first). Edit-type filters now include hf_artifacts and organizations, with a regression test for offset behavior.

Signed-out Save routes through the existing Saved Papers authorization flow (and resumes the bookmark after login) instead of building login URLs with apiUrl. AuthProvider resetQueries when the session ends so bookmark/follow caches don’t linger after logout or stale-auth events.

Paper feeds share a new useInfiniteScroll hook so filter changes that leave the sentinel visible still fetch the next page (replacing eight duplicated effects). Saved papers cards get page-wide rank so thumbnails aren’t all high-priority. Edit tasks shows the success toast only after the server confirms; Submit invalidates feeds via invalidatePaperFeeds.

Admin loading/empty placeholders move to shared admin.css (fixes unstyled direct loads); Autonomous Operations pulls in its cron stylesheet. The dead X-Admin-Token localStorage path is removed from ApiTransport.

Reviewed by Cursor Bugbot for commit fb6c9a0. Bugbot is set up for automated code reviews on this repo. Configure here.

- Submissions dashboard pages each status by offset (k-way merge for "all")
  instead of growing `limit`, which the API rejects above 500.
- Add the missing hf_artifacts and organizations edit-type filters.
- Signed-out Save goes through the Saved Papers login (auth origin) and
  resumes the save; logout resets cached user data.
- Saved papers prioritise only the first thumbnails on the page.
- Admin placeholder and autonomous-operations styles load on direct visits.
- Remove the unused localStorage admin-token header from the API transport.
- Confirm task edits only after the server accepts them.
- One useInfiniteScroll hook replaces eight sentinel effects, so every feed
  keeps loading after a filter change leaves the sentinel visible.
- SubmitView invalidates every paper feed family.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@NielsRogge
NielsRogge merged commit 1c041a9 into main Oct 30, 2026
4 checks passed
@NielsRogge
NielsRogge deleted the claude/frontend-review-bugs branch October 30, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant