Skip to content

pr-first-commit-title - Restore on compare pages with few commits#9008

Merged
SunsetTechuila merged 5 commits into
refined-github:mainfrom
dnicolson:patch-2
Mar 1, 2026
Merged

pr-first-commit-title - Restore on compare pages with few commits#9008
SunsetTechuila merged 5 commits into
refined-github:mainfrom
dnicolson:patch-2

Conversation

@dnicolson
Copy link
Copy Markdown
Contributor

@dnicolson dnicolson commented Feb 23, 2026

This fixes:

errors.js:77 ❌ Refined GitHub: pr-first-commit-title
errors.js:78 📕 26.2.19 → ElementNotFoundError: Expected element not found: div.Box.mb-3 .octicon-git-commit,a[href="#commits_bucket"] .octicon-git-commit
    at expectElement (select-dom.js:21:11)
    at useCommitTitle (pr-first-commit-title.js:38:26)
    at globalThis.addEventListener.once.once (selector-observer.js:88:3)

Test URLs

https://github.com/refined-github/sandbox/compare/rendered-commit-title?expand=1

@dnicolson dnicolson changed the title Fix element not found pr-first-commit-title - Fix element not found Feb 23, 2026
@SunsetTechuila
Copy link
Copy Markdown
Member

🙏

image

This is not a fix. To fix the issue you have to update the selector(s)

@SunsetTechuila
Copy link
Copy Markdown
Member

And please don't force-push - it makes the review process more difficult. Thank you

@dnicolson
Copy link
Copy Markdown
Contributor Author

dnicolson commented Feb 23, 2026

The test URL only applies to authenticated users. For this repository, it would look like this:
https://github.com/refined-github/refined-github/compare/main...dnicolson:refined-github:patch-2

@SunsetTechuila
Copy link
Copy Markdown
Member

Real URLs are already in the code:

Few commit: https://github.com/refined-github/sandbox/compare/rendered-commit-title?expand=1
Many commits: https://github.com/refined-github/refined-github/compare/refined-github:refined-github:esbuild-2...pgimalac:refined-github:pgimalac/fit-rendered-markdown?expand=1

Have you tested your PR on them? Changing a[href="#commits_bucket"] .octicon-git-commit to div[href="#commits_bucket"] .octicon-git-commit is unnecessary and breaks the feature on https://github.com/refined-github/refined-github/compare/refined-github:refined-github:esbuild-2...pgimalac:refined-github:pgimalac/fit-rendered-markdown?expand=1. How can a div even have an href property?

It's fine if you're learning, but if you're trying to use AI without reviewing the code and understanding what you're doing, please don't

@dnicolson
Copy link
Copy Markdown
Contributor Author

Thanks for bringing the test URLs to my attention. Unfortunately, I'm not a frequent contributor.

Thanks for the HTML tips ✌️

Comment thread source/features/pr-first-commit-title.tsx Outdated
Comment thread source/features/pr-first-commit-title.tsx Outdated
@fregante fregante added the bug label Feb 24, 2026
@SunsetTechuila SunsetTechuila changed the title pr-first-commit-title - Fix element not found pr-first-commit-title - Restore feature on compare pages with few commits Feb 24, 2026
@SunsetTechuila SunsetTechuila changed the title pr-first-commit-title - Restore feature on compare pages with few commits pr-first-commit-title - Restore on compare pages with few commits Feb 24, 2026
@SunsetTechuila
Copy link
Copy Markdown
Member

@fregante ready to be reviewed and merged

@SunsetTechuila SunsetTechuila merged commit e4d2158 into refined-github:main Mar 1, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants