fix(tabs): a blank session numbers its tabs from 1 again (closes #631) - #632
Merged
Merged
Conversation
The number in "Consulta N" was the tab's id, and the id counter (seq) is stored with the workspace so ids never repeat across a restart (#355): a session that started blank went on from the last one's numbers. Titles get a counter of their own (TabState.num), reset when the app opens on a blank tab, carried by openTool and openSnippetTab, and stored with the workspace so a resumed session goes on from its own titles (from seq for one saved before the counter). Ids keep moving forward, so resuming after the blank tab still collides with nothing. A stored workspace with a single empty tab now also opens as a fresh blank tab instead of re-showing the old one's title.
Merged
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.
Closes #631.
seq) survives restarts on purpose (Una pestaña nueva abre con el grid de la anterior (o como panel de filtros sin editor) #355), so a blank session started at "Consulta 48".TabState.num.blankSession()opens the first tab withnum: 0(→ "Consulta 1") and the id afterseq;openTool/openSnippetTabnow spread the state so they keep it; the workspace storesnum, and a resumed session continues from its own (fromseqfor a workspace saved before this).tabs.test.ts): a blank session after 47 ids starts at "Consulta 1" with id 48; with nothing stored; through a tool, a snippet and a closed tab; a resumed session (old format and new) goes on from its own number. Full frontend suite: 166 files pass.