feat(desktop): remember recently used sites in the Browser panel - #5270
feat(desktop): remember recently used sites in the Browser panel#5270chrisdeeming wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ApprovabilityVerdict: Needs human review This PR introduces a new feature (browser history tracking with UI) that adds new user-facing behavior, new state management, and new components. New features of this scope warrant human review to validate the intended behavior and integration points. You can customize Macroscope's approvability policy. Learn more. |
|
Just a note on the size, the entire feature itself is ~900 lines. There is, I feel, a somewhat generous test coverage. I am, however, assured they are "load-bearing" 🙄 Happy to trim those down. I have been through them and most of them are defensible to be fair. At the very least, I'd recommend reviewing the non-test code if you'd like to avoid some of the noise. Acting on review feedback now. |
7aae674 to
8b92eed
Compare
There was a problem hiding this comment.
One finding: favicon dedupe state is held in a module-level global inside the PreviewManager service module rather than in the service's own state, with a test-only reset export to compensate. Everything else in the Effect-facing changes matches the conventions (namespace effect/* imports, Effect.fn operations, PreviewOperationError with structured operation/tabId/webContentsId plus preserved cause, runFork derived from the captured context).
Posted via Macroscope — Effect Service Conventions
8b92eed to
2372eee
Compare
2372eee to
d182c5d
Compare
d182c5d to
92998aa
Compare
92998aa to
cb2ed59
Compare
af95d02 to
6173162
Compare
There was a problem hiding this comment.
Reviewed the new favicon capture/store code against the Effect service conventions. The layer-scoped capturedFaviconsRef (previously a module global) now looks correct, and the new modules use subpath namespace imports and the existing PreviewOperationError shape. Two smaller items below.
Posted via Macroscope — Effect Service Conventions
3f77b53 to
0fc57bf
Compare
0fc57bf to
b96fc72
Compare
b96fc72 to
e53afc1
Compare
dc12076 to
e6b7a3f
Compare
e6b7a3f to
6e04fd5
Compare
204ecf3 to
d9787f2
Compare
04b1b39 to
681152f
Compare
420f968 to
cf10cca
Compare
Records urls navigated in the Browser panel and persists them to localStorage, keyed by logical project so history follows a repository across worktrees. Only intentional navigations are recorded -- address bar, splash cards, chat links and terminal links -- so agent-driven browsing and reconnect echoes stay out of history. Stores the requested url rather than the resolved one, since resolution can bake in a volatile environment host. Bounded to 50 urls per project across 20 projects.
Shows recently visited sites above the existing Local servers list, with page title, relative time and a remove control. Local servers keeps its current scanner, behaviour and position. Entries appear even when the same host is currently listening: the two groups answer different questions, and a recents row carries the full path and title that a server card does not.
cf10cca to
1ad7415
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1ad7415. Configure here.
1ad7415 to
8eb3b2b
Compare
8eb3b2b to
868bea0
Compare


Closes #4746
What Changed
Adds a Recently used group to the Browser panel splash, above the existing Local servers list. URLs opened in the panel are remembered per project and persist across restarts.
History is recorded after successful URL-bar navigation, local-server opens, terminal links, and chat preview links. Each row shows the page title when available, the URL, relative visit time, and a remove action.
Local servers is unchanged.
Why
The splash only knew about listening localhost ports, so it surfaced things that are not web servers while missing custom domains such as
app.testandmain.app.local. Reopening a site after a restart also meant typing the URL again.Recording sites that were actually opened handles custom domains without broadening port discovery and keeps the list relevant to each project.
History is stored in localStorage with the existing Zustand persistence pattern. There is no server involvement and no new dependency.
UI Changes
Roadmap
I've reduced the scope of this PR down so it is no longer XXL. If merged, I have a further (smaller) submission which is to add favicons to the "Recently used" section and browser tabs.
I would also like to do more work here. The Local servers section displaying servers that do not serve web content doesn't make a lot of sense. It currently displays things for me such as
localhost:1025which is a MailHog SMTP server andlocalhost:3306which is a MySQL server.Checklist
I included a video for animation/interaction changesBuilt with Claude and GPT-5.6 through T3 Code.
Note
Low Risk
Client-only localStorage history with URL normalization and caps; no server, auth, or payment changes. Moderate UI surface area but bounded persistence logic with tests.
Overview
Adds a persisted Zustand store (
browserHistoryStore) that keeps per-project recent URLs (title, last visited) inlocalStorage, keyed by the same logical project grouping as the sidebar.ChatViewregisters the active thread to that key after client settings hydrate.The Browser panel empty state gains a Recently used section (
PreviewRecentUrlCard) above Local servers, with open, relative time, and remove. Visits are recorded after successful navigation from the URL bar, discovered local servers (using pre-resolutionrequestedUrlso WSL/remote hosts don’t pollute history), terminal preview links, and chat markdown preview opens. Page titles are applied only to existing entries after successful load. Loopback aliases (localhost,127.0.0.1, environment host) dedupe to one row; persisted data is sanitized on migrate/merge.normalizeHostnameandisLocalLoopbackHostare exported frombrowserTargetResolverfor reuse in the store.Reviewed by Cursor Bugbot for commit 868bea0. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
[!NOTE]
Add recently used site history to the Browser panel
useBrowserHistoryStore, a persisted Zustand store that tracks per-project browser history entries (URL, title, last-visited time), keyed by a logical project grouping consistent with the sidebar.PreviewRecentUrlCardcomponent, with relative timestamps and a remove action.requestedUrlis preserved on discovered servers so the pre-resolution URL is recorded in history.Macroscope summarized 868bea0.