Commit 99eae64
refactor: simplify task Browser tab — drop localhost rewrite, add open-in-new-tab
The Browser tab's iframe used to rewrite localhost URLs to the host's full Tailscale FQDN to handle the "remote UI / dev server only on the host" case, but the user navigates with explicit Tailscale IPs and hostnames, so the rewrite isn't pulling its weight. Delete `preview-url.ts` and its tests, and stop pulling `useTailscaleHostname` into the Browser tab — the iframe `src` is just the user-typed URL now.
Also drop the iframe `sandbox` attribute (with `allow-scripts`+`allow-same-origin` it provided no real security benefit anyway, but nudged some browsers toward stricter cookie partitioning) and add an "Open in new tab" toolbar button. Modern browsers block cross-site iframe cookies by default, which broke logins for dev apps like `http://citadel:5173`; the new button is a one-click escape hatch into a real top-level tab where auth works.
The `tailscaleHostname` setting, `useTailscaleHostname` hook, and `detectTailscaleHostname()` stay — they're still used by the public-domain/tunnel feature.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 50d20a0 commit 99eae64
3 files changed
Lines changed: 17 additions & 107 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
21 | 19 | | |
22 | 20 | | |
23 | 21 | | |
24 | 22 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 23 | | |
32 | 24 | | |
33 | 25 | | |
| |||
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
| |||
84 | 81 | | |
85 | 82 | | |
86 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
94 | | - | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | | - | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
This file was deleted.
This file was deleted.
0 commit comments