Repository navigation
Fix LOC stat injection after GitHub redesign, switch to new store listing - #89
Merged
Merged
Conversation
GitHub's React sidebar renders the About section twice (narrow and wide layouts), so the old "first h2 About" lookup injected into the hidden copy, and loose matching injected into PR contents. The stat is now placed under this repository's own /forks stat, cloned from it to match GitHub's current styling, restricted to repository main pages, and re-synced idempotently on DOM changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V85P6CD6Q6FpeJBxM5qurk
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V85P6CD6Q6FpeJBxM5qurk
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.
Summary
GitHub's React repository sidebar now renders the About section twice (narrow-only and wide-only copies). The old lookup (first
<h2>About</h2>) picked the hidden narrow copy, so the stat seemed to vanish. It also matched "About" headings elsewhere, which injected the stat into PR contents.Stat injection
/forksstat link (the one with therepo-forkedocticon). Links inside markdown, comments, PR/issue bodies, dialogs, menus and tooltips are ignored./owner/repo,/owner/repo/tree/…), and stats left over after navigating away are removed.MutationObserverre-syncs idempotently, so the stat comes back after React re-renders and is never duplicated.URL/searchParams, which fixes the broken…/repo&filter=URL when no branch was detected.…while loading instead of0.Stat.tsxandgetFilterare removed.Store
bdjkkjhffigoaeinkkpipfhjdccimeccinrelease.ymland the README link.public/store/.Testing
tsc,vite buildandprettier --checkall pass.Generated by Claude Code