Skip to content

Conversation

@fmartingr
Copy link
Member

@fmartingr fmartingr commented Sep 14, 2025

Summary

  • Pressing the shortcut will show the Shiori popup and allow to search for bookmarks
    You can type to search, Enter to open in a new tab, Shift+Enter to open in the current tab.

  • Pressing Ctrl+A while on the popup switches between "Add mode" and "search mode" to preserver previous funcionality.

Screenshots

Not logged in Logged in (search) Logged in (add)
CleanShot 2025-09-26 at 17 04 52 CleanShot 2025-09-14 at 12 07 44@2x CleanShot 2025-09-26 at 17 06 21

fmartingr and others added 5 commits September 14, 2025 12:11
- Add search mode with real-time filtering
- Implement keyboard navigation (arrows, enter, shift+enter)
- Integrate with Shiori API /api/bookmarks endpoint
- Support opening bookmarks in current/new tabs
- Maintain existing add bookmark functionality
- Auto-focus search input on popup open
- Add configuration validation before showing main popup interface
- Implement server health check using /api/v1/system/info endpoint
- Show appropriate UI states: loading, unconfigured, unreachable, ready
- Add status screen with options to open settings or retry connection
- Prevent popup functionality until extension is properly configured
- Improve user experience with clear error messages and guidance

Co-authored-by: Ona <[email protected]>
- Ensure search and add mode elements are hidden during initialization
- Add CSS rules to hide main interface by default
- Explicitly hide main UI elements when showing error states
- Fix initial HTML state for add-mode element
- Prevent malformed UI from showing when not logged in

Co-authored-by: Ona <[email protected]>
@fmartingr fmartingr requested a review from Copilot September 26, 2025 15:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds bookmark search functionality to the Shiori extension, allowing users to search through their existing bookmarks in addition to the original "add bookmark" functionality. The extension now opens in search mode by default with a toggle to switch between search and add modes using Ctrl+A.

Key changes:

  • Added search mode with keyboard navigation and bookmark listing
  • Implemented configuration checking with error handling for unconfigured extensions
  • Modified shortcut key and description to reflect dual functionality

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
view/popup.html Added HTML structure for search mode, status checking, and mode indicators
js/popup.js Complete rewrite to support dual modes, search functionality, and initialization flow
js/background-script.js Added search and health check API endpoints with new message handlers
css/popup.css Expanded from minified to readable format with styles for search mode and status screens
manifest.json Updated keyboard shortcut and description, reformatted JSON structure
Makefile Added clean target and fixed sed command for macOS compatibility

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

js/popup.js Outdated
Comment on lines 274 to 275
if (event.keyCode === 13) {
event.preventDefault()
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using keyCode is deprecated. Use e.key === 'Enter' instead for better browser compatibility and maintainability.

Suggested change
if (event.keyCode === 13) {
event.preventDefault()
if (e.key === 'Enter') {
e.preventDefault()

Copilot uses AI. Check for mistakes.
fmartingr and others added 2 commits September 26, 2025 17:11
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@fmartingr fmartingr merged commit 0c27c69 into master Sep 26, 2025
1 check passed
@fmartingr fmartingr deleted the feat/search-bookmarks branch September 26, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants