Repository navigation
Retire the topic pages and the topic browser - #1174
Merged
Merged
Conversation
Sixth chunk of the dead-code plan and the first page retirement: hub/topic pages are no longer part of the product. - /topic/:path* and /browse redirect permanently to the homepage, and the old /journal/:slug redirect, which pointed at /topic/:slug, now goes straight to / as well. - app/topic and app/browse go, with everything only they reached: TopicFeed and its sort/filter bar, TopicList, ManageTopics, the topic list skeleton, TopicSearch, ButtonGroup, useHub, the topic emoji table, the topic-following UI (FollowTopicButton, FollowContext and its provider, follow.service, types/follow), HubService's follow/unfollow/getHubBySlug/ getPrimaryHubs methods, the topic-page title rule and the browse rule in the top bar, the browse page metadata, buildTopicUrl, and the topic sitemap chunk (the remaining chunks are renumbered). - Topic badges stay visible but stop linking anywhere: HashtagBadge renders a plain span when it has no href, and FeedItemTopicBadges, the work page's Topics section and RelatedWorkCard no longer pass one. The journal badge keeps its link only for the ResearchHub Journal (/journal); other journals and preprint servers show as plain badges too. - Search never requested the hub index outside TopicSearch, so the hub suggestion type, its transformer case and the hub branches in the search handlers were unreachable and go with it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The quality gate measures duplicated lines among the lines a change adds. Two more redirect object literals in next.config.js read as a copy of the existing list, and the journal badge's two <Image> blocks, re-indented into the new `badge` constant, read as copies of each other. The redirects are now one generated entry, the badge picks its image source once, and HashtagBadge shares its styling between the link and the plain span. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Topics are off the product, so the hashtag rows stop rendering rather than lingering as inert text: - FeedItemTopicBadges is replaced by FeedItemJournalBadge, which only shows the journal hashtag on paper cards (the one badge that was never a topic); post and bounty cards had nothing but topics in that row, so it goes. - The work page's Topics section, the related-work card's topic row, the skeleton row that mirrored the badges, and the excluded-topic-slugs constant are deleted. - With no topic badge to click, the topic click plumbing goes too: the onTopicClick props, the peer-review page's topic filter event in useBounties, and ClickContext itself, whose only consumer that was. - useFeedSource and the analytics FeedSource type no longer know a 'topic' source. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
# Conflicts: # app/layouts/topbar/pageRoutes.tsx # components/Paper/RelatedWorkCard.tsx # components/providers/ClientProviders.tsx # hooks/useBounties.ts
|
Merged
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.



Sixth chunk of the dead-code removal plan (
docs/dead-code-report.md, kept local), following #1171, and the first page retirement: hub/topic pages are no longer part of the product.Redirects
/topic/:path*and/browsenow redirect permanently to the homepage. The old/journal/:slugredirect pointed at/topic/:slug, so it goes straight to/as well. Verified on the dev server: all four forms answer 308 withLocation: /.What goes
app/topic/**andapp/browse/**, with everything only they reached:TopicFeedand its sort/filter bar,TopicList,ManageTopics, the topic list skeleton,TopicSearch,ButtonGroup,useHub, the topic emoji table, the topic-following UI (FollowTopicButton,FollowContextand its provider inClientProviders,follow.service,types/follow),HubService'sfollowHub/unfollowHub/getHubBySlug/getPrimaryHubs(onlysuggestTopicshas callers left, in the moderator editor form and the hub selector), the topic-page title rule and the browse rule in the top bar,getBrowsePageMetadata,buildTopicUrl, and the topic sitemap chunk (the remaining chunks are renumbered 0–3).TopicSearch, so theTopicSuggestiontype, its transformer case and the hub branches in both search handlers were unreachable and go too.Topic badges are gone, not plain text (third commit)
After review the call was to drop topics entirely rather than keep them as inert text.
FeedItemTopicBadgesis replaced byFeedItemJournalBadge, which only shows the journal hashtag on paper cards (the one badge that was never a topic; the ResearchHub Journal keeps its/journallink). Post and bounty cards had nothing but topics in that row, so it goes. The work page's Topics section, the related-work card's topic row, the skeleton row that mirrored the badges and the excluded-topic-slugs constant are deleted. With no topic badge left to click, the topic click plumbing goes too: theonTopicClickprops, the peer-review page's topic filter event inuseBounties, andClickContextitself, whose only consumer that was.useFeedSourceand the analyticsFeedSourcetype no longer know a'topic'source.Second commit: SonarCloud's duplication gate
The gate measures duplicated lines among the lines a change adds. Two more redirect object literals in
next.config.jsread as a copy of the existing list, and the journal badge's two<Image>blocks, re-indented into the newbadgeconstant, read as copies of each other. The redirects are now one generated entry (...['/topic/:path*', '/browse'].map(...)), the badge picks its image source once (logo || journal.imageUrl, the same precedence as before), andHashtagBadgeshares its styling between the link and the plain span. Redirects re-verified on the dev server after a restart.Checks
npm run lint: 0 errors (2 pre-existing warnings in untouched files)npm run type-check: clean/browselands on/, no/topiclink or hashtag row remains on the home feed, the RFP feed, a proposal page or a registered report, and the report's journal badge still links to/journal.Next
Chunk 7 (
retire/7-paper-pages) follows once this is merged. It needs the call on whether the backend or the frontend drops paper entries from feeds and search first.🤖 Generated with Claude Code