fix(desktop): don't persist ephemeral preview-proxy URLs (CODE-373)#241
fix(desktop): don't persist ephemeral preview-proxy URLs (CODE-373)#241lucas77778 wants to merge 1 commit into
Conversation
Greptile SummaryThis PR prevents temporary preview URLs from surviving desktop restarts. The main changes are:
Confidence Score: 4/5The preview-host predicate can erase unrelated local browser URLs and needs a narrower namespace check.
What T-Rex did
Important Files Changed
Reviews (1): Last reviewed commit: "fix(desktop): exclude preview URLs from ..." | Re-trigger Greptile |
| if (!hostname.endsWith(LOCALHOST_SUFFIX)) return false; | ||
| const label = hostname.slice(0, -LOCALHOST_SUFFIX.length); | ||
| return label.includes('--') && PREVIEW_LABEL_RE.test(label); | ||
| } catch { |
There was a problem hiding this comment.
Durable Local URLs Are Discarded
Any single-label .localhost hostname containing -- passes this predicate, including an unrelated local service such as http://my--app.localhost:3000. Navigating there is valid, but desktop serialization now clears the URL, so the browser location disappears after restart.
Artifacts
Repro: focused desktop persistence Vitest test
- Contains supporting evidence from the run (text/typescript; charset=utf-8).
Repro: focused Vitest configuration
- Contains supporting evidence from the run (text/typescript; charset=utf-8).
Repro: verbose failing test output showing the input, serialized, and rehydrated URL values
- Keeps the command output available without making the summary code-heavy.
Summary
<kind>--<id>.localhostpreview namespaceTesting
devenv shell -- pnpm check:cidevenv shell -- pnpm test(213 files, 1657 tests)Linear: https://linear.app/arcbox/issue/CODE-373/fixdesktop-dont-persist-ephemeral-preview-proxy-urls-in-the-browser