feat(desktop): remember recently used sites in the Browser panel - #5270
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
e6b7a3f to
6e04fd5
Compare
204ecf3 to
d9787f2
Compare
04b1b39 to
681152f
Compare
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.
868bea0 to
b78032b
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.
b78032b to
487681d
Compare
## What's Changed * chore(ci): vouch StiensWout by @t3-code[bot] in pingdotgg/t3code#5637 * feat(desktop): remember recently used sites in the Browser panel by @chrisdeeming in pingdotgg/t3code#5270 * chore: vouch chrisdeeming by @t3-code[bot] in pingdotgg/t3code#5641 * feat(web): make sidebar artwork theme-aware by @maria-rcks in pingdotgg/t3code#5636 * fix(web): reconnect the composer seam for remote non-Git projects by @caezium in pingdotgg/t3code#5633 * fix(web): show Stop button while input is pending by @ipanasenko in pingdotgg/t3code#5554 * feat(web): fold plan mode and token-by-token output into Legacy features by @t3dotgg in pingdotgg/t3code#5664 ## New Contributors * @chrisdeeming made their first contribution in pingdotgg/t3code#5270 **Full Changelog**: pingdotgg/t3code@v0.0.33-nightly.20260807.1026...v0.0.33-nightly.20260808.1029 Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.33-nightly.20260808.1029
…gdotgg#5270) (cherry picked from commit 72d673a)
Adopts the thirteen upstream commits after #379. The headline is pingdotgg#5672 making sidebar v2 the default, which is a file-level restructure: upstream renamed the classic sidebar to LegacySidebar.tsx and moved v2's content into Sidebar.tsx, deleting SidebarV2.tsx. Git could not follow either rename because both sides had changed both files, so each was merged three-way by hand: - Sidebar.tsx = the fork's SidebarV2.tsx (multi-env and ownership filters, identity marks, budgeted listStatus, pin ordering, copy-thread-id, unread and regenerating-title chrome) with upstream's pingdotgg#5672 delta applied. That delta is a rename sweep — SidebarV2* → Sidebar*, group/v2-row → group/sidebar-row, sidebar-v2-* test ids — plus aria-busy on the rows. - LegacySidebar.tsx = the fork's old Sidebar.tsx with upstream's rename and settings-nav hoist applied. AppSidebarLayout now renders SettingsSidebarNav for both sidebars, so the legacy one no longer renders it itself. forkSurfaceExistence, the fork's anti-stack-drop net, was retargeted at the renamed files and ids rather than relaxed: all 17 assertions still run, and they are what caught LegacySidebar initially being upstream's v1 rather than the fork's. Other resolutions: - GitManager: upstream's per-branch exponential backoff for rate-limited PR lookups (pingdotgg#5673) with the fork's terminal-state freeze helper kept. - Composer: pingdotgg#5554 shows Stop while input is pending, which is exactly what the fork's shouldShowComposerInterruptAction suppressed; the predicate and its tests are retired rather than merged. - PreviewView: the fork's resolveNavigableUrl (asks the environment about tailnet routing) keeps resolving, with upstream's browser-history recording (pingdotgg#5270) layered on the successful-navigation path. - Settings: sidebarV2Enabled / sidebarV2ConfiguredByUser and enableAssistantStreaming are retired in favour of upstream's fresh keys (legacySidebarEnabled, enableLegacyTokenStreaming), which deliberately reset prior opt-ins; the mobile list toggle inverts the same way, so HomeScreen now reads through resolveThreadListV2Enabled. - .github/VOUCHED.td stays deleted: it is upstream's contributor-vouching file. Adversarial review caught one surface the key migration missed: the mobile ThreadNavigationSidebar still gated v2 on the retired threadListV2Enabled, so the iPad/split list would have stayed on the legacy layout with no setting able to change it, disagreeing with Home. It now reads through resolveThreadListV2Enabled like HomeScreen. Co-authored-by: Patrick Roza <42661+patroza@users.noreply.github.com>


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 UI state with no auth or server changes; broad test coverage limits regression risk in preview and chat link flows.
Overview
Adds per-project browser history persisted in localStorage via a new Zustand store, keyed to the same logical project grouping as the sidebar (not just the active physical project row).
The Browser panel empty state gains a Recently used section above Local servers: each row shows title (when known), URL, relative visit time, and remove. Visits are recorded only after successful navigation from the URL bar, discovered local servers (storing the pre-resolution
requestedUrl), terminal links, chat preview links, and discovered-port opens. Page titles are applied update-only to existing history entries after load.History normalizes and sanitizes URLs (scheme, credentials, length), deduplicates localhost / environment-host aliases, and caps entries per project and projects overall. Persisted state is migrated and re-sanitized on every rehydrate; visits/titles before thread registration are queued and drained on project registration.
Reviewed by Cursor Bugbot for commit 487681d. 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 487681d.