Conversation
…smiss Replace GitHub-only smart links with a provider-based abstraction that supports multiple link sources (GitHub, Linear, etc.). - SmartLinkProvider interface + registry for extensible detection/rendering - Server-side persistence (SQLite) replacing localStorage-only storage - User can dismiss links via hover × button (persisted, won't re-detect) - Unified polling hook with per-provider rate-limit tracking - GitHub provider preserves exact existing PR/issue UI + behavior - Linear provider added (issue detection, status via GraphQL API) - localStorage v1 → server migration on first load - Adding a new provider requires only 1 file + 1 import
Providers import registerProvider from registry.ts, so registry.ts cannot also import the providers (circular dependency causes registerProvider to be undefined at call time). Move side-effect imports to a separate providers/index.ts entry-point that page.tsx imports explicitly.
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 smart links sidebar (previously GitHub-only) is refactored into a provider-based abstraction that supports multiple link sources. Links are now persisted server-side with the session (SQLite) instead of only in localStorage, and users can dismiss individual links via a hover × button.
Adding a new provider (e.g. Jira) now requires only implementing a single
SmartLinkProviderinterface file and adding one import line to the registry. GitHub and Linear are the two built-in providers.Reviewer focus
src/lib/smart-links/types.ts— theSmartLinkProviderinterface is the core abstraction; review for extensibilitysrc/lib/smart-links/storage.ts—useSmartLinkStoragehook manages server sync, localStorage cache, v1 migration, and dismissalsrc/app/api/sessions/[id]/smart-links/route.ts— GET/PUT/DELETE for persistence; no auth beyond session existence check (consistent with other session routes)src/lib/smart-links/providers/github.tsx— visual parity with the oldGitHubLinksSidebarPanelRisk / impact
sessionstable (smart_links,dismissed_smart_links) — added via ALTER TABLE with try/catch, consistent with existing migration pattern