Repository navigation
Suggest shortcuts for sites you visit often - #20
Merged
Merged
Conversation
Adds the pure ranking in src/lib/suggest.ts, the optional history permission and its reader in src/lib/history.ts, and a persisted settings.dismissedSuggestions list. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lcome screen. A card above the shortcut list offers the opt-in, then up to five sites with Add (the prefilled New shortcut form) and dismiss. The popup lists three while its box is empty. The welcome screen offers the same opt-in. Docs: PRIVACY, README, CHANGELOG, AGENTS. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What
BunnyLol can now suggest shortcuts for the sites you keep going back to. This is opt-in.
How
src/lib/suggest.tsis pure (nochrome.*, no DOM). It groups history by site and scores each one as visits + 3× typed visits, dropping anything under 5. It skips sites that any live shortcut, a search engine, localhost/IPs or a dismissal already covers. It then picks a keyword that passesvalidateAliasand isn't taken.src/lib/history.tsis the onlychrome.historycaller. It reads the last 90 days on demand and never stores them.historyis in optional_permissions, so current users get no prompt and the update does not disable the extension.tests/manifest.test.tsguards this.settings.dismissedSuggestionsholds hostnames only. It is normalized leniently, capped at 500 and exported with the rest of settings.#new?prefill=form, so no new write path.Verified
pnpm build && pnpm test && pnpm lint: 22 files, 163 tests, all green.pitchfork→https://pitchfork.com/.historygranted up front, because automation can't click Chrome's permission prompt. The real opt-in click still needs one manual check.Skipped: deep-link suggestions (a specific repo on a site that already has a shortcut). It's one suggestion per site, pointing at the home page.
🤖 Generated with Claude Code