Repository navigation
Hide the tab marker on the current tab - #736
Merged
Merged
Conversation
Browsers use the current tab's title as the default filename when I save a page or drag its URL out to create a shortcut, so the tab marker ended up in the filename. The current tab doesn't need a marker to be targeted, so Rango now only adds it to the other tabs. The URL in the title stays, because Talon reads it from the current tab. A code review turned up three cases this exposed, which I also fixed: - A page that builds its title from the decorated one while in the background, like `(1) B | Inbox`, left the marker in the middle of the title, where it wasn't removed when the tab became current. Rango now removes the exact marker it added wherever it is. - With the URL in the title turned off, the current tab's title has no decorations, so a page changing `Inbox` to `(1) Inbox` was taken for a page editing our decorated title, and copying the title gave `Inbox`. That branch now only applies when Rango decorated the title. - Quick tab switches could let an older title update finish last and put the marker back on the current tab. An update now stops if a newer one started while it waited. Fixes #707 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for voluble-crisp-6e2a75 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Fixes #707.
Browsers use the current tab's title as the default filename when I save a page (with the browser or an extension like Save Page WE) or drag its URL out of the address bar to create a shortcut. So the tab marker ended up in the filename. The current tab doesn't need a marker to be targeted, so Rango now only adds it to the other tabs. When I switch away from a tab, it gets its marker back. The URL in the title stays on the current tab, because Talon reads it from there.
A code review turned up three cases this change exposed, which I also fixed:
(1) B | Inbox, left the marker in the middle, where it wasn't removed when the tab became current. Rango now remembers the exact marker it added and removes it wherever it is.Inboxto(1) Inboxwas taken for a page editing our decorated title (the Bandcamp case), and copying a markdown link still gaveInbox. That branch now only applies when Rango decorated the title.One thing this doesn't handle: after a browser restart or an extension update, Rango reads each tab's marker back from its title, so the tab that was current gets a new marker. It's one tab per restart, so I left it.
Testing
npm test -- e2e/decorateTitle: all 12 tests pass, after lint, the type check and the build. I updated the current-tab expectations to have no marker and added tests for the marker coming back on an inactive tab, the marker in the middle of the title, and copying a title the page built from its previous one.(1) B | Document - …, and the copied link is[Document](…)instead of[(1) Document](…).🤖 Generated with Claude Code