Skip to content

Support opening MHTML files in integrated browser - #333307

Merged
Joaquín Ruales (jruales) merged 2 commits into
microsoft:mainfrom
YOSHII-Hiroto:feature/open-mhtml-in-integrated-browser
Sep 4, 2026
Merged

Support opening MHTML files in integrated browser#333307
Joaquín Ruales (jruales) merged 2 commits into
microsoft:mainfrom
YOSHII-Hiroto:feature/open-mhtml-in-integrated-browser

Conversation

@YOSHII-Hiroto

Copy link
Copy Markdown
Contributor

Adds .mhtml and .mht to the local file extensions supported by Open in Integrated Browser. Chromium already renders MHTML archives, including pages saved with Save page as... using Webpage, single file (*.mhtml), so this reuses the existing local-file browser flow.

The command is now available from the Explorer context menu, editor tab context menu, and editor title actions for both extensions.

Testing:

  • npx eslint src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts
  • npm run transpile-client
  • git diff --check upstream/main...HEAD
  • Manually verified .mht and .mhtml command visibility in all three UI locations
  • Manually verified both formats render in the integrated browser

Fixes #333305

@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

Kyle Cutler (@kycutler)

Matched files:

  • src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts

Joaquín Ruales (@jruales)

Matched files:

  • src/vs/workbench/contrib/browserView/electron-browser/features/browserTabManagementFeatures.ts

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.

Pull request overview

Extends the integrated browser’s local-file command to support MHTML archives.

Changes:

  • Enables .mht and .mhtml files alongside .htm and .html.
  • Applies support across existing Explorer and editor menu registrations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

🟢 Approval recommended

The focused regex change correctly covers both requested MHTML extensions without affecting unrelated files.

Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@kycutler Kyle Cutler (kycutler) left a comment

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.

@jruales
Joaquín Ruales (jruales) merged commit df0ea76 into microsoft:main Sep 4, 2026
30 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.137.0 milestone Sep 4, 2026
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.

Allow opening MHTML files in the integrated browser

5 participants