Skip to content

fix: updated selector to comply with current dom tree - #15

Merged
yamadashy merged 3 commits into
yamadashy:mainfrom
takuyahara:fix/selector
Jul 26, 2026
Merged

yamadashy merged 3 commits into
yamadashy:mainfrom
takuyahara:fix/selector

Conversation

@takuyahara

Copy link
Copy Markdown
Contributor

Deepwiki button is no longer added due to DOM tree structure change by GitHub. This PR fixes by updating selector.


app/scripts/content.ts

- const navActions = document.querySelector<HTMLUListElement>('ul.pagehead-actions');
+ const navActions = document.querySelector<HTMLUListElement>('ul[data-testid="repo-header-actions"]');

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@yamadashy, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 59 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0e0dd326-b7df-425b-885c-c2ecc6f34db5

📥 Commits

Reviewing files that changed from the base of the PR and between 040932b and f797aa7.

📒 Files selected for processing (1)
  • app/scripts/content.ts
📝 Walkthrough

Walkthrough

Updated addDeepWikiButton() and its SPA navigation observer to locate GitHub repository header actions with ul[data-testid="repo-header-actions"] instead of ul.pagehead-actions. Existing button detection, URL parsing, and link insertion behavior remain unchanged.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly reflects the selector update that restores DeepWiki button insertion.
Description check ✅ Passed The description matches the change by explaining the GitHub DOM selector update and showing the diff.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@yamadashy yamadashy left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! GitHub seems to be rolling out the new header gradually — my environment still gets the old ul.pagehead-actions DOM. Keeping both selectors should cover everyone, so I have left suggestions on both occurrences.

Comment thread app/scripts/content.ts Outdated
Comment thread app/scripts/content.ts Outdated
@yamadashy

Copy link
Copy Markdown
Owner

@takuyahara
I haven't been able to reproduce the new header on my end yet, but I verified the combined selector still works with the current DOM, so I'll merge it.
Thanks for the contribution!

@yamadashy
yamadashy merged commit c09a58d into yamadashy:main Jul 26, 2026
3 checks passed
@takuyahara
takuyahara deleted the fix/selector branch July 26, 2026 23:11
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.

2 participants