Repository navigation
feat: show who writes the wire in a voices panel - #78
Merged
Merged
Conversation
This branch was successfully deployed
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
voices(session, kind, since, limit=8)incatalog/facets.py. It returns publishers of one kind (individual/lab/company) ordered by count, then best score. Each row has its scores oldest first (last 15) and its best article. Writers count posts only. Labs and Companies count every kind.GET /api/v1/articles/voices?kind=&since=&limit=is a thin adapter. It returns 422 on a badkind(a newVoiceKindenum) or a badsince. Response modelsVoice,VoiceArticleare incatalog/models.py. The client is regenerated.Rails/panels/Voices.tsx, registered inLEFTright after Who wrote (the last spot). It has Writers / Labs / Companies tabs built fromFilterOption, a fixed 30-day window, and rows of name +ScoreBars+ count, with the best title and its score below in dim.publisherinFilters, which is passed toreadArticles. A "Publisher: Name ×" chip in the From row clears it, and so does clicking the active row. A pick sendsvoices_pick({publisher, kind}), the same pattern aswho_wrote_pick.Where this differs from the plan, and why
marked_for_deletion_atis only a review flag the feed still shows. So Voices matches the feed and adds no filter.RailsProviderstores onlyopenper panel, so the tab lives in component state.Filtersalso holdspublisherName, so the chip can show the name and not the slug.Verified
pyteston a fresh local DB (pgvector pg17 in docker,prestart.sh): 592 passed. The 1 failure istest_read_endpoints_are_public[/search?q=agents], because the sandbox proxy blocks the Hugging Face model download. That is environmental and unrelated.sincebounds counts; scores oldest first and capped at 15; best article is the highest score; order is count, then best score; 422 on a bad kind and on a badsince.ruff check,ruff format --check,mypy,tyall clean, plus the banned-module-names check.bun run lint(biome),tsc -p tsconfig.build.json,bun run buildall clean.tests/voices.spec.ts(mocked voices endpoint and publisher feed): tabs switch the list (including the empty Companies message); clicking a name narrows the feed and shows the chip; the chip clears it; clicking the active row clears it; a failed fetch hides the panel. Ran against a local backend, Vite and mailcatcher. All pass, andrails.spec,reader-picks.specandarticles.specpass with them.stories.spec,topic-map.specandlikes.spec. The same 6 fail on master in this environment with this change stashed, so they are not from this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01E5MK5gpkC5MCcqo4fKqxZ5
Generated by Claude Code