refactor(tabs): drop evictAll, which cannot bump the epoch that makes an evicted tab reload - #2066
Merged
Merged
Conversation
… an evicted tab reload
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Follow-up to #2064, which flagged this and left it alone.
TabSessionRegistry.evictAll(except:)has no production caller. Only its own three tests use it. That alone would be a weak reason to delete a tidy-looking API, so I looked at what it actually does.It drops a tab's rows and sets
isEvicted, but it has no access to the tab manager, so it cannot bumpQueryTab.loadEpoch. That epoch is what SwiftUI's.task(id:)keys on, and it is the only thing that makes an evicted tab reload. The one real eviction path pairs the two:evictInactiveTabsin the tab-switch path does the same. So anyone reaching forevictAllbecause it looks like the batch version ofevictwould get exactly the wrong result: rows dropped on every background tab, no epoch bumped, and nothing to trigger a refetch. Blank grids that only heal on a manual refresh.It is not an API waiting for a caller, it is a trap with three tests holding it in place. Removed with them.
Verification
43 tests pass across
TabSessionRegistryTableRowsTests,TabSessionRegistryTests,TabSessionTests,TabRetargetSessionStateTestsandMainContentCoordinatorLazyLoadTests.swiftlint lint --strictreports 0 violations in 1300 files.No CHANGELOG entry: removing an uncalled method changes nothing a user can see.