fix: drop phantom ended-tab stubs, trust server as source of truth#93
Merged
Merged
Conversation
Previously the client cached open session tabs in localStorage and resurrected any that the server no longer knew about as grayed-out "ended" stubs. On multi-device use (close tab on mobile, open desktop) this left stale phantom tabs the user had to manually dismiss. Remove _restoreEndedTabs / _saveTabMetadata, the session._ended branch in selectSession, the data-ended render attribute, and the matching CSS rule. Clear the legacy localStorage key on init to purge stale entries.
Owner
|
Great input — thank you! Clean removal: the localStorage resurrection was the only thing that set |
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.
Summary
The client cached open session tabs in
localStorageand resurrected any that the server no longer knew about as grayed-out "ended" stubs. On multi-device use (close tab on mobile, open desktop) this left stale phantom tabs the user had to manually dismiss every time.Fix
Drop the client-side resurrection path entirely; let the server be the source of truth for which sessions are open.
Removed:
_restoreEndedTabs/_saveTabMetadatasession._endedbranch inselectSessiondata-endedrender attribute and its matching CSS ruleAlso clears the legacy
localStoragekey on init to purge stale entries left by previous client versions.Net: -44 / +6 lines — removes complexity while fixing the UX bug.
Test plan
tsc --noEmitpassesnpm run lintpassesnpm run format:checkpasseslocalStorageentries from older clients are cleared on next page load.