Repository navigation
feat: show reader picks in the left rail - #77
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NjivDE4oKNKuycRKAPiTfQ
# Conflicts: # frontend/src/components/Rails/panels.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Reader picks(after Topic map, meta "last 30 days"): the articles readers liked most in the last 30 days, top 6 withlike_count > 0.MiniRail, a mono "PUBLISHER · OCT 4" meta line, the title (13px, new tab,articleClickHandlerswithsurface: "reader_picks"), and the existingLikeButtonwith its count.readArticles({ sort: "likes-desc", since: 30 days ago, limit: 20 }), key["articles", "reader-picks"], staleTime 5 min. No backend change.RailPanelhides it.Changes from the plan
WhoWrote(feat: show who wrote the wire in the left rail #74) keeps its origin counts under["articles", "origins", …]. That data has nodataarray, soLikeButton's optimisticpatchArticlethrewCannot read properties of undefined (reading 'map')inonMutate. The PUT was never sent and the reader got a "Something went wrong" toast. This hit the feed's like button too, not only the panel.likes.specdidn't catch it because it only checks the optimistic count, which goes back to its old value after an error. The fix is a guard inpatchArticle(if (!data?.data) return data). I picked this over moving WhoWrote's key so any future non-list["articles", …]query is covered too. The plan relies on that patch reaching every["articles", …]query, which is why I fixed it here.ArticleRow(the plan didn't say either way).Verified
bun run lint(biome) is clean on the changed files.bun run build(tsc + vite) passes.likes.spec.ts:75("Password" tab). It fails the same way on unmodified master: the profile page has no Password tab any more. It has nothing to do with this PR.tests/reader-picks.spec.ts, all passing:likes-descresponse with 3 liked and 2 unliked rows: 3 rows, in like order, counts 5/3/1, link opens in a new tab, meta shows publisher and datelikes.spec, which toggles row 1.ghcr.iodb image pull was blocked by the network policy),prestart.shseed data,fastapi dev, mailcatcher in Docker forauth.setup.ts. The browser was pointed at the pre-installed Chromium through an uncommitted local config.panels.tsx.RIGHTis kept as master has it.🤖 Generated with Claude Code
https://claude.ai/code/session_01NjivDE4oKNKuycRKAPiTfQ
Generated by Claude Code