Skip to content

Fix PWA manifest start URL for server base paths - #330360

Merged
Dmitriy Vasyura (dmitrivMS) merged 8 commits into
microsoft:mainfrom
Boulea7:fix/209601-manifest-start-url
Nov 10, 2026
Merged

Dmitriy Vasyura (dmitrivMS) merged 8 commits into
microsoft:mainfrom
Boulea7:fix/209601-manifest-start-url

Conversation

@Boulea7

@Boulea7 Langning Zhang (Boulea7) commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #209601

This updates WebClientServer to serve the server PWA manifest with a start_url derived from the effective base path, including X-Forwarded-Prefix. The dynamic response keeps the remaining manifest fields unchanged and uses Cache-Control: no-store with Vary: X-Forwarded-Prefix.

Testing

  • npm run test-node -- --run src/vs/server/test/node/webClientServerManifest.test.ts (7 passing)
  • Server Node.js tests under src/vs/server/test/node (48 passing)
  • npm run transpile-client
  • Client typecheck and targeted ESLint/formatter checks
@Boulea7

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

@Boulea7
Langning Zhang (Boulea7) marked this pull request as ready for review August 12, 2026 05:44
@aeschli

Copy link
Copy Markdown
Contributor

Thanks a lot Langning Zhang (@Boulea7) !

@Boulea7

Copy link
Copy Markdown
Contributor Author

The remaining Component Fixtures failure is in Determine base SHA at git merge-base, after the Playwright tests and screenshot capture passed. This branch still has the depth-50 workflow; main already has 494b970d to handle this case. Rerunning the existing job uses the old workflow. Martin Aeschlimann (@aeschli), could you merge current main into this branch to pick up that fix and trigger fresh CI?

Copilot AI balanced review requested due to automatic review settings September 29, 2026 21:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

compile hygeine failures

Warning: [eslint                   ] /mnt/vss/_work/vscode/vscode/src/vs/server/test/node/webClientServerManifest.test.ts: line 110, col 35, Warning - Use dot notation instead of bracket notation for property 'Vary'. (local/code-no-bracket-notation-for-identifiers)
Warning: [eslint                   ] /mnt/vss/_work/vscode/vscode/src/vs/server/test/node/webClientServerManifest.test.ts: line 126, col 45, Warning - Use dot notation instead of bracket notation for property 'Etag'. (local/code-no-bracket-notation-for-identifiers)
auto-merge was automatically disabled September 30, 2026 10:24

Head branch was pushed to by a user without write access

@Boulea7

Copy link
Copy Markdown
Contributor Author

Changed the three Etag/Vary accesses to dot notation. The targeted ESLint check for the manifest test now passes.

@Boulea7

Copy link
Copy Markdown
Contributor Author

Michael Lively (@Yoyokrazy), could you take another look at 6e01765? The three Etag/Vary accesses now use dot notation, and the targeted ESLint check passed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The manifest handler’s unawaited promise lets read or parse failures bypass error handling, leaving requests unanswered instead of returning a 500 response.

1 open issue

Review effort: Max

Comment thread src/vs/server/node/webClientServer.ts Resolved
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

With --server-base-path=/code, the forced trailing slash sets the manifest’s default scope to /code/, excluding the /code token-removal redirect from the installed app’s scope.

No open issues 🎉

1 previously missed issue

In code that hasn't changed since last review

Medium severity Keep the token-removal redirect within the app scope

src/​vs/​server/​node/​webClientServer.ts:230

With --server-base-path=/code, forcing a trailing slash makes the manifest's default scope /code/, which excludes the /code URL used by the token-removal redirect. Normalize start_url without adding the slash (for example, join with '.') so that URL remains in the installed app's scope, and update the new test expectations.

1 resolved since last review

Review effort: Max

@dmitrivMS
Dmitriy Vasyura (dmitrivMS) merged commit 1ba6421 into microsoft:main Nov 10, 2026
63 of 82 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.147.0 milestone Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

8 participants