René's URL Explorer Experiment


Title: fix(webview): bound worker updates and acquire the expected controller by NevermoreN · Pull Request #8074 · coder/code-server · GitHub

Open Graph Title: fix(webview): bound worker updates and acquire the expected controller by NevermoreN · Pull Request #8074 · coder/code-server

X Title: fix(webview): bound worker updates and acquire the expected controller by NevermoreN · Pull Request #8074 · coder/code-server

Description: Fixes #8073 When a root PWA worker controls a new webview, the bootstrap treats it as an existing webview controller and awaits another update job. That job can hold initialization beyond extension renderer deadlines even after the correct webview worker takes control. Reopening a webview can also queue register() behind a previous update. This change reuses a registration only when its exact scope and full active script URL match, bounds its explicit update wait to three seconds, and requires the expected controller before content initialization. Initial registration is still required. Controller acquisition fails after ten seconds and removes its listeners and retry timer. Update failure can fall back only to the matching active worker. A distinct worker query parameter prevents reusing a pre-fix worker that lacks the claim handler. The worker accepts a claim request only from a window client on the same origin at an exact outer-webview path. The patch preserves the third-party-cookie diagnostic and updates the CSP hash without relaxing the policy. Validation: 11 Chromium browser regression tests pass against the pinned, patched source bootstrap and actual workers: root PWA takeover, hanging update/register, update rejection, explicit claim, rejection of an inner-document claim, controller timeout and cleanup, mismatched script URL, permission diagnostic, disabled/unavailable workers, and CSP hash. The first-registration regression fails on the unpatched bootstrap. The complete quilt patch stack is checked against the pinned VS Code source files with zero fuzz; the resulting bootstrap and worker must match the browser-tested files. Prettier and added-source whitespace checks pass. A standalone TypeScript checkJs run reports the same three existing diagnostics on baseline and candidate; no new diagnostics are introduced. This is not a full VS Code typecheck. This PR does not include the deployment's Codex preload suppression or module cache. It does not claim to fix the separate extension main-thread stall, guarantee sub-30-second cold startup, or bound first registration. A full code-server build and whole-workbench extension interaction have not been run for this PR. The deployed combined-workaround timings in the issue are prior diagnostic evidence, not validation of this source patch.

Open Graph Description: Fixes #8073 When a root PWA worker controls a new webview, the bootstrap treats it as an existing webview controller and awaits another update job. That job can hold initialization beyond extension...

X Description: Fixes #8073 When a root PWA worker controls a new webview, the bootstrap treats it as an existing webview controller and awaits another update job. That job can hold initialization beyond extension...

Opengraph URL: https://github.com/coder/code-server/pull/8074

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:30a88389-3f53-375d-3c69-65cf0ffd88ea
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id96DE:F4D72:340A14:46CD04:6B043728
html-safe-nonce236cb9aae2f0d20108891b8bc3219f09894d927f916b685def382232e4bfdfd8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NkRFOkY0RDcyOjM0MEExNDo0NkNEMDQ6NkIwNDM3MjgiLCJ2aXNpdG9yX2lkIjoiMzcwNDQ2NTgwNzc3NTExOTE0NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfe17cefe924fe602e15b5fb0e182e7b095a182ba962f0297ebbf5ca22cf7e317
hovercard-subject-tagpull_request:4993600599
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/coder/code-server/pull/8074/files
twitter:imagehttps://avatars.githubusercontent.com/u/10877871?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10877871?s=400&v=4
og:image:altFixes #8073 When a root PWA worker controls a new webview, the bootstrap treats it as an existing webview controller and awaits another update job. That job can hold initialization beyond extension...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb7a1d2b9101496921b08579fbee988d014345aef2f5bd660d1f8c7332d81560e
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/coder/code-server git https://github.com/coder/code-server.git
octolytics-dimension-user_id95932066
octolytics-dimension-user_logincoder
octolytics-dimension-repository_id172953845
octolytics-dimension-repository_nwocoder/code-server
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id172953845
octolytics-dimension-repository_network_root_nwocoder/code-server
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasec3dd496c3da6ea6b77e69c09279d2b81604654f1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/coder/code-server/pull/8074/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fpull%2F8074%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcoder%2Fcode-server%2Fpull%2F8074%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=coder%2Fcode-server
Reloadhttps://github.com/coder/code-server/pull/8074/files
Reloadhttps://github.com/coder/code-server/pull/8074/files
Reloadhttps://github.com/coder/code-server/pull/8074/files
coderhttps://github.com/coder
code-serverhttps://github.com/coder/code-server
Codehttps://github.com/coder/code-server
Issues147 (147)https://github.com/coder/code-server/issues
Pull requests15 (15)https://github.com/coder/code-server/pulls
Discussionshttps://github.com/coder/code-server/discussions
Actionshttps://github.com/coder/code-server/actions
Projectshttps://github.com/coder/code-server/projects
Security and quality3 (3)https://github.com/coder/code-server/security
Insightshttps://github.com/coder/code-server/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fcoder%2Fcode-server%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcoder%2Fcode-server%2Fissues%2Fnew%2Fchoose
NevermoreNhttps://github.com/NevermoreN
coder:mainhttps://github.com/coder/code-server/tree/main
NevermoreN:fix/webview-service-worker-update-waithttps://github.com/NevermoreN/code-server/tree/fix/webview-service-worker-update-wait
Conversation 1 https://github.com/coder/code-server/pull/8074
Commits 1 https://github.com/coder/code-server/pull/8074/commits
Checks 0 https://github.com/coder/code-server/pull/8074/checks
Files changed https://github.com/coder/code-server/pull/8074/files
Please reload this pagehttps://github.com/coder/code-server/pull/8074/files
fix(webview): bound worker updates and acquire the expected controller https://github.com/coder/code-server/pull/8074/files#top
Show all changes 1 commit https://github.com/coder/code-server/pull/8074/files
27af0ab fix(webview): bound worker updates and acquire the expected controller NevermoreN Oct 24, 2026 https://github.com/coder/code-server/pull/8074/commits/27af0ab80ea43d2684fb2fe1d3f39a953f5c4d50
Clear filters https://github.com/coder/code-server/pull/8074/files
Please reload this pagehttps://github.com/coder/code-server/pull/8074/files
Please reload this pagehttps://github.com/coder/code-server/pull/8074/files
CHANGELOG.md https://github.com/coder/code-server/pull/8074/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
csp-hashes.diff https://github.com/coder/code-server/pull/8074/files#diff-cb267c179d5d3c0259ada227bea0bb986015f92f22d8c73429e85f843629c655
series https://github.com/coder/code-server/pull/8074/files#diff-d6f19469bd3dd1daec926b99bf179ec128fff3631356f24af05320c1827f1e46
webview-service-worker.diff https://github.com/coder/code-server/pull/8074/files#diff-5ba04f9decb6693b03a32020765f92ef8d1a8ad461eb6d226255d2779180a859
webviewServiceWorker.test.ts https://github.com/coder/code-server/pull/8074/files#diff-aa848f6a712a232b5c2f748ce3fcd92a2fb4639dd050a1d9b76b9a2beaa311a6
https://github.com/coder/code-server/blob/main/.github/CODEOWNERS#L1
CHANGELOG.mdhttps://github.com/coder/code-server/pull/8074/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
View file https://github.com/coder/code-server/blob/27af0ab80ea43d2684fb2fe1d3f39a953f5c4d50/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/code-server/pull/8074/{{ revealButtonHref }}
https://github.com/coder/code-server/pull/8074/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/coder/code-server/pull/8074/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/coder/code-server/blob/main/.github/CODEOWNERS#L1
patches/csp-hashes.diffhttps://github.com/coder/code-server/pull/8074/files#diff-cb267c179d5d3c0259ada227bea0bb986015f92f22d8c73429e85f843629c655
View file https://github.com/coder/code-server/blob/27af0ab80ea43d2684fb2fe1d3f39a953f5c4d50/patches/csp-hashes.diff
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/code-server/pull/8074/{{ revealButtonHref }}
https://github.com/coder/code-server/pull/8074/files#diff-cb267c179d5d3c0259ada227bea0bb986015f92f22d8c73429e85f843629c655
https://github.com/coder/code-server/pull/8074/files#diff-cb267c179d5d3c0259ada227bea0bb986015f92f22d8c73429e85f843629c655
https://github.com/coder/code-server/blob/main/.github/CODEOWNERS#L1
patches/serieshttps://github.com/coder/code-server/pull/8074/files#diff-d6f19469bd3dd1daec926b99bf179ec128fff3631356f24af05320c1827f1e46
View file https://github.com/coder/code-server/blob/27af0ab80ea43d2684fb2fe1d3f39a953f5c4d50/patches/series
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/code-server/pull/8074/{{ revealButtonHref }}
https://github.com/coder/code-server/pull/8074/files#diff-d6f19469bd3dd1daec926b99bf179ec128fff3631356f24af05320c1827f1e46
https://github.com/coder/code-server/pull/8074/files#diff-d6f19469bd3dd1daec926b99bf179ec128fff3631356f24af05320c1827f1e46
https://github.com/coder/code-server/blob/main/.github/CODEOWNERS#L1
patches/webview-service-worker.diffhttps://github.com/coder/code-server/pull/8074/files#diff-5ba04f9decb6693b03a32020765f92ef8d1a8ad461eb6d226255d2779180a859
View file https://github.com/coder/code-server/blob/27af0ab80ea43d2684fb2fe1d3f39a953f5c4d50/patches/webview-service-worker.diff
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/code-server/pull/8074/{{ revealButtonHref }}
https://github.com/coder/code-server/blob/main/.github/CODEOWNERS#L1
test/e2e/webviewServiceWorker.test.tshttps://github.com/coder/code-server/pull/8074/files#diff-aa848f6a712a232b5c2f748ce3fcd92a2fb4639dd050a1d9b76b9a2beaa311a6
View file https://github.com/coder/code-server/blob/27af0ab80ea43d2684fb2fe1d3f39a953f5c4d50/test/e2e/webviewServiceWorker.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/coder/code-server/pull/8074/{{ revealButtonHref }}
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.