Repository navigation
Conversation
Collaborator
Author
|
Closing. Each cached entry is at most 50 commits, so realistic retention is a few MB at most. The ~82 MB figure comes from synthetic 16 KiB messages. The PR adds byte accounting, reworks the owner key and the layout-effect ref, shows a loading state when revisiting a workspace beyond the 4 most recent, and conflicts with the WSL wake rewrite of use-git-history.ts (#35410/#35854/#35897). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Commits panel retained the full 50-commit history result for every visited workspace that still existed, even though returning to a workspace always fetched it again. Across many workspaces, full messages, authors, and ref metadata accumulated in renderer state.
Keep the active result plus a recent inactive cache capped at four entries and 4 MiB of conservatively counted strings (two bytes per code unit, including nested metadata and errors). An active result can exceed the inactive budget; once inactive, an oversized result is removed without flushing other recent pages. Recent cached pages remain visible during authoritative refetch, and errors retain the current result for recovery.
Request identities now live in the evictable entries. Removed, evicted, replaced repository views and unmounted owners cannot restore cache entries through late success/error replies. Functional updates read the latest committed active owner before pruning. No RPC contract changes or claim of subprocess cancellation.
Actual production hook, React/happy-dom, 50 commits with 16 KiB messages per workspace; runtime boundary generates responses without a mock retaining them. Live React state contains:
After 50 visits, message content falls from 40,986,500 to 2,459,220 UTF-8 bytes; the conservative estimate for all result strings falls from 82,065,000 to 4,924,020 bytes. Git reads remain 50, then 51 on revisit. These are retained payload counts and string estimates, not measured whole-app heap/RSS or latency.
Validation: final focused hook suites pass 16/16 on Node 24.22.0. Substituting the exact pinned baseline hook makes six of eight new cases fail; positive recent-display and oversized-active controls still run. Coverage includes author/nested-ref accounting, recent display/refetch, oversized active/inactive transitions, deferred evicted success/error, collapsed owner replacement, removed IDs, existing errors/recovery, and visibility/folder gates.
Required
pnpm check:changed --maxWorkers=2runs under verified Node 24: 19/21 checks pass, including renderer typecheck and static checks. Localization fails on three pre-existing Turkish keys; English/Turkish catalogs match pinned baseline2d3e7e4520byte for byte. Broad affected-test selection was bounded after repeated runs without results; it remains unverified. Independent source review completed. Native Windows/macOS/WSL/SSH and a rendered Electron app were not exercised.Checked production patches of open #9597, #9598, #14305, #14405, #14472, #25541, #6746, #12814, and #29737, plus #34796. Panel expansion guards, pagination, graph scope, layout persistence, and navigation availability are separate; inspected history maps remain uncapped across workspaces. Their integration may require source conflict resolution and must preserve the appropriate page state. #34965 separately addresses commit-comparison owner caches.