Skip to content

feat: improve terminal and markdown link behavior - #2

Closed
Optuber01 wants to merge 1 commit into
amirlehmam:masterfrom
Optuber01:pr/link-behavior
Closed

feat: improve terminal and markdown link behavior#2
Optuber01 wants to merge 1 commit into
amirlehmam:masterfrom
Optuber01:pr/link-behavior

Conversation

@Optuber01

@Optuber01 Optuber01 commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • open terminal and markdown links in the wmux browser when available
  • keep Ctrl+Click and Cmd+Click opening the default system browser
  • add clearer hover hints for terminal and markdown links

Why

This makes link behavior more predictable inside wmux while still preserving an easy path to the external browser.

Testing

  • npm run build:main
  • npm run build:renderer

@amirlehmam

Copy link
Copy Markdown
Owner

Thanks for the idea! The link-in-browser behavior is a great UX improvement.

I've implemented this feature in v0.6.8 (commit fb507bb) with a different approach that avoids the issues in this PR:

What was fixed:

  • Used the existing Zustand store directly (splitNode + updateSplitTree) instead of non-existent workspace.browserOpen / updateWorkspaceMetadata APIs
  • Correct surface ID handling (surfaces use surf-{uuid} pattern, not browser-{workspaceId})
  • Shared utility (src/renderer/utils/open-in-browser.ts) used by both terminal and markdown panes
  • No regression on localhost URL handling

Behavior:

  • Click → opens in wmux browser panel (auto-creates one if none exists)
  • Ctrl+Click → opens in system browser

Closing in favor of the merged implementation. Feel free to open new PRs!

@amirlehmam amirlehmam closed this Apr 15, 2026
amirlehmam added a commit that referenced this pull request Jun 15, 2026
…ick-launch profiles, winget) + bump 0.8.6

#1 Notification sounds: ship a default chime and play it on every notification
   fire, gated on notificationPrefs.sound. Main signals notification:play-sound;
   a single renderer listener (initNotificationSound) plays the bundled WAV.

#3 wmux browser new-instance bug: add app.requestSingleInstanceLock() with a
   second-instance focus handler so a stray `wmux ...` launch focuses the running
   window instead of spawning a new one (named WMUX_INSTANCE isolates userData so
   dev/prod still coexist). Rebuild resources/cli/wmux.js so the shipped CLI honors
   WMUX_PIPE again.

#4 Quick-launch profiles in the + caret dropdown: {name,icon,type,shell,cwd,
   startupCommands,url} model, global profiles in settings (with a Profiles panel
   + Windows Terminal profile import) and project-level .wmux.json. PTY startup
   commands run once on fresh creation; relative cwd resolves against the workspace.

#2 Winget: manifest set + auto-publish workflow (portable-zip install, no signing).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
amirlehmam pushed a commit that referenced this pull request Jun 20, 2026
Addresses the critical/high findings from the security review:

- Pipe auth (#1): privileged V2 methods now require a per-instance token
  (crypto.randomBytes, 0600 file in APPDATA, timing-safe compare). Public
  telemetry methods stay open via an allowlist so detection/hooks keep
  working. Token injected into spawned shells as WMUX_PIPE_TOKEN; CLI and
  hook clients read it from env or the token file.
- CDP proxy (#2): reject DNS-rebinding via a loopback-only Host allowlist
  (HTTP 403 + WS verifyClient) AND a browser-Origin guard on the WS upgrade
  (WebSockets bypass CORS, so a passing Host alone lets a malicious page
  open ws://127.0.0.1:9222 and reach Runtime.evaluate). Absent Origin is
  allowed so chrome-devtools-mcp/puppeteer/native ws clients still connect.
- Markdown XSS (#3): sanitize marked output with DOMPurify before
  dangerouslySetInnerHTML in the privileged renderer.
- markdown.load_file: extension allowlist + 5MB cap + isFile check so a
  pipe caller can't slurp arbitrary secrets into the viewer.
- Webview hardening (#9): central web-contents-created handler strips
  preload/nodeIntegration from webviews, routes window.open to the OS
  browser, and blocks the main window from navigating off its own UI.

Tests: pipe-server token auth (9) + new cdp-proxy host/origin guard (9).
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.

2 participants