feat: open local HTML files from file and tab menus#1268
Merged
Conversation
- add a desktop command for opening validated local HTML files in the system browser - expose the browser-open action in file explorer and tab context menus - extend tab context menus with close, pin, pop-out, copy path, and reveal actions - preserve pinned tabs when closing groups/all tabs and keep pinned tabs ordered first - add localized labels/errors and unit coverage for HTML file preview helpers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a local HTML browser-open workflow from both the file explorer context menu and editor tab context menu. Also improves tab context menus and pinned-tab handling so pinned tabs stay protected and ordered before regular tabs.
Fixes #
Type and Areas
Type:
Feature / UI/UX
Areas:
desktop/Tauri, web UI, i18n
Motivation / Impact
Users can open local
.html/.htmfiles directly in the system browser from file explorer entries or open tabs. The native desktop command validates that the target is an HTML file and an actual file before delegating to the system opener.Tab context menus now expose common tab/file actions including close, close others, close all, pin/unpin, pop out, copy path, reveal in explorer, and open HTML in browser where applicable. Remote workspaces disable local-only file actions.
Pinned tabs are preserved when closing all tabs and remain grouped ahead of unpinned tabs.
Verification
pnpm --dir src/web-ui run test:run src/shared/utils/htmlFilePreview.test.ts- passedpnpm run type-check:web- passedcargo check -p bitfun-desktop- passedpnpm run i18n:audit- passedReviewer Notes
The HTML browser-open action is intentionally local-only and hidden/disabled for remote workspace scenarios. The Rust command rejects non-HTML paths and non-file paths before invoking the opener.