Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: open chat session and note URLs in default browser instead of webview#95

Merged
wesbillman merged 3 commits intomainfrom
open-chat-session-urls-in-browser
Feb 13, 2026
Merged

feat: open chat session and note URLs in default browser instead of webview#95
wesbillman merged 3 commits intomainfrom
open-chat-session-urls-in-browser

Conversation

@wesbillman
Copy link
Collaborator

@wesbillman wesbillman commented Feb 13, 2026

Summary

  • Intercept link clicks in SessionModal and NoteModal so URLs open in the system's default browser via Tauri's openUrl command instead of navigating within the webview
  • Applies to all http:// and https:// links rendered in markdown content
  • Extract shared handleExternalLinkClick helper into commands.ts to avoid duplication

Test plan

  • Open a chat session modal containing a message with a URL and click the link — verify it opens in the default browser
  • Open a note modal containing a URL and click the link — verify it opens in the default browser
  • Confirm non-URL clicks in the modals still behave normally

🤖 Generated with Claude Code

wesbillman and others added 2 commits February 12, 2026 15:33
Intercept link clicks in the session modal's content area and route
http/https URLs through Tauri's open_url command so they open in the
user's default system browser rather than navigating inside the webview.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Intercept link clicks in the NoteModal's content area and route
http/https URLs through Tauri's open_url command so they open in the
user's default system browser rather than navigating inside the webview.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Move the duplicated link-click interception logic from SessionModal and
NoteModal into a single shared function in commands.ts.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@wesbillman wesbillman merged commit 963995c into main Feb 13, 2026
3 checks passed
@wesbillman wesbillman deleted the open-chat-session-urls-in-browser branch February 13, 2026 02:31
loganj added a commit that referenced this pull request Feb 26, 2026
* feat: add per-tab back/forward navigation

Each tab now maintains its own history stack. Back/forward buttons in
the topbar and Cmd+[/Cmd+] shortcuts navigate within the active tab.
Redirects replace the current history entry instead of pushing.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add tests for per-tab navigation history

Tests cover: initial history state, new tab history initialization,
canGoBack/canGoForward flags, boundary behavior for goBack/goForward,
and back/forward button rendering in Layout.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* test: add Playwright e2e tests for per-tab navigation

Tests cover: disabled buttons on fresh tab, back/forward button
behavior after navigation, Cmd+[/] keyboard shortcuts, forward
history truncation on new navigation, and independent per-tab history.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: handle POP navigations and activateTab flag corruption

- POP navigations (browser back/forward) now move the historyIndex
  instead of pushing duplicates to tab history
- activateTab skips setting the navigating flag when the target path
  matches the current URL, preventing flag corruption
- Added unit test for re-activating current tab
- Added Playwright tests for browser back/forward and tab re-activation

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: simplify tab navigation by removing POP history tracking

Remove browser back/forward (POP) sync logic from per-tab history and
simplify activateTab to always navigate without path-equality guard.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: guard openTab navigation flag and conditionally preventDefault

- openTab: only set navigating flag when path differs from current URL,
  preventing flag corruption when opening tabs at the same path
- Layout: only preventDefault on Cmd+[/] when canGoBack/canGoForward,
  preserving native browser history shortcuts at boundaries
- Restore and add unit + Playwright tests for all edge cases

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: guard closeTab navigation flag and handle non-adjacent POP jumps

- closeTab: only set navigating flag when neighbor tab's path differs
  from current URL, matching the guards in openTab and activateTab
- POP handler: search outward from current historyIndex through the
  full history array, handling multi-step browser history jumps

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: use router location instead of window.location for path guards

Replace window.location reads with a locationRef tracking the router
location. This fixes same-path guards in production builds where the
router basename (/app) causes window.location to diverge from the
router's location object.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* chore: update Playwright to v1.58.2 and MCP server port

Co-Authored-By: Claude Opus 4.6 <[email protected]>

* fix: guard goBack/goForward against no-op navigations

Apply the same locationRef guard to goBack and goForward, preventing
navigating flag corruption when adjacent history entries are duplicates
from REPLACE rewrites.

Co-Authored-By: Claude Opus 4.6 <[email protected]>

---------

Co-authored-by: Claude Opus 4.6 <[email protected]>
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.

1 participant