How rajeshpatel07/scythe works
Scythe is a keyboard-first Chromium extension for history search, tab switching, and link previews. The main workflow begins with a keyboard or link interaction in a page, opens an overlay, then searches/navigates, selects a tab, or previews a URL. The graph also preserves the background message handlers, settings, and Glance header rules. Some background and tab-switcher implementation details were not excerpted; edges there are limited to indexed references or README statements.
Main entry points: spotlight.controller.ts Spotlight controller · search-runner.service.ts History search · global-keys.ts Global keys · router.ts Background router
Components 27
Page Interaction
- Content entry
src/content/index.ts - Global keys
src/app/keyboard/global-keys.ts - Glance preview
src/features/glance/components/glance.component.ts - Tab switcher
src/features/tab-switcher/components/switcher.component.ts - Tab selection
src/features/tab-switcher/actions/selection.actions.ts - Selection state
src/features/tab-switcher/state/selection.store.ts
Spotlight Search
- Spotlight controller
src/features/spotlight/services/spotlight.controller.ts - History search
src/features/spotlight/services/search-runner.service.ts - Autocomplete
src/features/spotlight/services/autocompletion.service.ts - Completion engine
src/features/spotlight/services/autocompletion.engine.ts - History index
src/features/spotlight/services/history-index.store.ts - Recent history
src/features/spotlight/services/history-list.service.ts - Search results UI
src/features/spotlight/components/result-item.component.ts
Background Services
- Background router
src/background/router.ts - History handler
src/background/handlers/history.handler.ts - Tab handlers
src/background/handlers/tabs.handler.ts - Glance handler
src/background/handlers/glance.handler.ts - Favicon handler
src/background/handlers/favicon.handler.ts - Glance header rules
src/background/services/rules.service.ts
Shared UI and State
- URL navigation
src/core/services/navigation.service.ts - Extension settings
src/core/config/config.ts - Browser storage
src/core/storage/storage.utils.ts - Message broker
src/core/messaging/message.broker.ts - Favicon service
src/core/services/favicon.service.ts - New tab page
src/features/new-tab/components/newtab.component.ts - Settings popup
src/popup/popup.ts
Other components
- Keyboard user
Connections 35
- Keyboard user → Global keys: presses shortcuts
README.md - Global keys → Tab switcher: opens or closes
src/app/keyboard/global-keys.ts - Global keys → Tab selection: updates selection
src/app/keyboard/global-keys.ts - Tab selection → Tab switcher: updates display
src/features/tab-switcher/actions/selection.actions.ts - Tab selection → Selection state: reads state
src/features/tab-switcher/actions/selection.actions.ts - Global keys → Spotlight controller: opens search
src/content/index.ts - Global keys → Glance preview: closes preview
src/app/keyboard/global-keys.ts - Content entry → Global keys: registers keys
src/content/index.ts - Content entry → Spotlight controller: initializes search
src/content/index.ts - Spotlight controller → Recent history: populates history
src/features/spotlight/services/spotlight.controller.ts - Spotlight controller → History index: ensures index
src/features/spotlight/services/spotlight.controller.ts - Spotlight controller → Autocomplete: updates completion
src/features/spotlight/services/spotlight.controller.ts - Spotlight controller → History search: debounces search
src/features/spotlight/services/spotlight.controller.ts - History search → Message broker: requests history
src/features/spotlight/services/search-runner.service.ts - History search → Completion engine: parses candidates
src/features/spotlight/services/search-runner.service.ts - History search → Autocomplete: applies completion
src/features/spotlight/services/search-runner.service.ts - History search → Search results UI: renders results
src/features/spotlight/services/search-runner.service.ts - History search → URL navigation: opens submitted URL
src/features/spotlight/services/search-runner.service.ts - Autocomplete → Completion engine: scores candidates
src/features/spotlight/services/autocompletion.service.ts - Autocomplete → History index: uses local index
src/features/spotlight/services/autocompletion.service.ts - History index → Message broker: requests history
src/features/spotlight/services/history-index.store.ts - History index → Recent history: shares history data
- Spotlight controller → Extension settings: checks settings
src/features/spotlight/services/spotlight.controller.ts - Extension settings → Browser storage: loads preferences
src/core/config/config.ts - Glance preview → Message broker: sends preview requests
src/features/glance/components/glance.component.ts - Glance preview → URL navigation: opens preview URL
src/features/glance/components/glance.component.ts - Glance preview → Glance header rules: needs compatible framing
README.md - Message broker → Background router: dispatches messages
- Background router → History handler: routes history
src/background/router.ts - Background router → Tab handlers: routes tab actions
src/background/router.ts - Background router → Glance handler: routes preview actions
src/background/router.ts - Background router → Favicon handler: routes favicon requests
src/background/router.ts - Content entry → New tab page: supports new tab page
README.md - Settings popup → Extension settings: configures preferences
src/popup/popup.ts - Search results UI → Favicon service: loads favicons
src/features/spotlight/components/result-item.component.ts