Skip to content

repo-header-info - Restore when command palette is disabled - #10348

Merged
fregante merged 6 commits into
mainfrom
batch-deferred-content
Nov 1, 2026
Merged

fregante merged 6 commits into
mainfrom
batch-deferred-content

Conversation

@kidonng

@kidonng kidonng commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

<batch-deferred-content> doesn't exist when "Command Palette" Feature Preview is disabled.

Spin off a41d8f3 (#10345)

#10345 is required to see this fix

Test URLs

https://github.com/refined-github/refined-github

Screenshot

CleanShot.2026-10-30.at.3.52.12.PM.mp4

🤖 Produced by clanker
@kidonng
kidonng marked this pull request as ready for review October 30, 2026 07:53
@kidonng

kidonng commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

I will try give a tl;dr but if you want I can also publish the full agent session. The code seems huge but it's fairly straightforward.

  1. f730758 (this PR) <batch-deferred-content> doesn't exist when command palette is disabled, so we need to polyfill it.
  2. 8370845 (this PR) but polyfilling <batch-deferred-content> is only half the story. The native handler for [data-deferred-details-content-url] doesn't exist either when command palette is disabled, so that also needs to be implemented.
    Another non-obvious part is that by sending the form ourselves, GitHub's fetch handler doesn't receive the correct nonce, then native <include-fragment> would just send a wrong one and get rejected, so we need to fetch the DOM ourselves.
  3. d4b296c (this PR) Annnnnnnd the styles are also broken when command palette is disabled. Need to supply the correct ones.

Regarding the test: I didn't go through it meticulously but looks about right :^> if it doesn't serve any value it could be dropped (GitHub E2E is the ground truth anyway)

log.http(url);
const absoluteUrl = new URL(url, location.origin).href; // Firefox `fetch`es from the content script, so relative URLs fail
const response = await fetch(absoluteUrl);
const response = await fetch(absoluteUrl, {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The header is required when fetching fragments. Always including it should not hurt

@kidonng kidonng changed the title Polyfill <batch-deferred-content> repo-header-info - Restore when command palette is disabled Nov 1, 2026
@fregante
fregante enabled auto-merge (squash) November 1, 2026 10:24
@fregante
fregante merged commit 9eeccf6 into main Nov 1, 2026
13 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.

2 participants