Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
23007be
Add: Enables to set parent folder to the folder.
ujiro99 Jun 22, 2025
55956b5
Update: Adjusted the logic for determining whether a command list can…
ujiro99 Jun 22, 2025
032d2ce
Update: The Parent folder can now be set from the Edit Folder dialog.
ujiro99 Jun 22, 2025
734962a
Update: Improved display during folder dragging.
ujiro99 Jun 22, 2025
984f8cf
Update: Change the order of CommandList to the order of priority.
ujiro99 Jun 22, 2025
39d25d8
Refactoring.
ujiro99 Jun 22, 2025
d2d9cfb
Update: Implement DnD processing from folder to command.
ujiro99 Jun 22, 2025
fab420e
Update: Fix command to folder.
ujiro99 Jun 23, 2025
8d384a6
Update: Enables to DnD folders and commands.
ujiro99 Jun 25, 2025
4ff9259
Fix: Folder to Folder dnd.
ujiro99 Jun 26, 2025
2099318
Update: Add debounce for storage.
ujiro99 Jun 26, 2025
72abb85
Update: Don't filter command.
ujiro99 Jun 26, 2025
40d6743
Fix: Remove unnecessary code.
ujiro99 Jun 26, 2025
9a4a30b
Fix: Fixed an issue where moving the first command in a folder would …
ujiro99 Jun 26, 2025
ee70e80
Refactoring.
ujiro99 Jun 26, 2025
aa88d94
Refactoring.
ujiro99 Jun 27, 2025
26694f8
Rename.
ujiro99 Jun 27, 2025
a04cd39
Refactoring: Move folder.
ujiro99 Jun 27, 2025
8267d1e
Refactoring: Move folder.
ujiro99 Jun 27, 2025
d46ef5a
Update: Support for hierarchical pop-up menus.
ujiro99 Jun 28, 2025
c69995d
Update: Fix styles of vertical.
ujiro99 Jun 28, 2025
9a71742
Refactoring.
ujiro99 Jun 28, 2025
2aae489
Update: Fix hover area.
ujiro99 Jun 28, 2025
066e621
Update: react-menubar.
ujiro99 Jun 28, 2025
8fb4368
Update: Select folder selection also reflects hierarchy.
ujiro99 Jun 28, 2025
4476b03
Update: Update the order of folders as well.
ujiro99 Jun 28, 2025
9d11175
Update: Update the order of folders when moving a folder to a command.
ujiro99 Jun 28, 2025
ac703c2
Refactoring.
ujiro99 Jun 28, 2025
2d6db0a
Refactoring.
ujiro99 Jun 28, 2025
f0ec594
Update: Reorder folders.
ujiro99 Jun 28, 2025
47181fc
Update: Fix worning in console.
ujiro99 Jun 29, 2025
a10dd4b
Update: Add folder depth on FolderEditDialog.
ujiro99 Jun 29, 2025
7c297e1
Add: Hybrid commands storage.
ujiro99 Jun 29, 2025
a0c4701
Fix: Ensure that synchronization discrepancies are not likely to occur.
ujiro99 Jun 30, 2025
361ff17
Update: Add retry logic to loading settings.
ujiro99 Jun 30, 2025
bde75c2
Refactoring.
ujiro99 Jul 1, 2025
38047bb
Add: Show storage usage.
ujiro99 Jul 1, 2025
9170441
Add: Daily commands backup.
ujiro99 Jul 1, 2025
784ed02
Refactoring.
ujiro99 Jul 1, 2025
91fa98e
Update: Change style of Storage Usage.
ujiro99 Jul 2, 2025
e374554
Update: If the folder is not found, commands to be added to the root …
ujiro99 Jul 2, 2025
6d8649e
Add: Enables restoring commands and folders from daily backup.
ujiro99 Jul 2, 2025
b44e3c3
Update: Add reserved area to Storage Usage.
ujiro99 Jul 2, 2025
7f863d9
Update: Update usage real-time.
ujiro99 Jul 2, 2025
359d7fb
Fix: DOM nesting error.
ujiro99 Jul 2, 2025
805c9d9
Update: Add storage caching.
ujiro99 Jul 3, 2025
3dbc3b0
Update: Add icons.
ujiro99 Jul 3, 2025
53bda79
Fix: Share emptySettings.
ujiro99 Jul 3, 2025
e9735d2
Update: Use new hooks.
ujiro99 Jul 3, 2025
600f897
Refactoring.
ujiro99 Jul 3, 2025
532e7c3
Fix: Translate comments.
ujiro99 Jul 3, 2025
baf9498
Refactoring.
ujiro99 Jul 4, 2025
036e58d
Update: Introduce fallback in command order.
ujiro99 Jul 4, 2025
91e72ee
Add: Weekly backup.
ujiro99 Jul 4, 2025
f7efa0a
Add: Claude code settings.
ujiro99 Jul 4, 2025
77a1f6f
Refactoring: Corrected direct value.
ujiro99 Jul 4, 2025
fee337b
Refactoring: Add LegacyBackupManager.
ujiro99 Jul 5, 2025
152d0ec
Update: Moves globalCommandMetaData to local storage.
ujiro99 Jul 5, 2025
aebf239
Update: Add shadow to sub-folder.
ujiro99 Jul 5, 2025
33d97cf
Update: Improved display of large number of commands.
ujiro99 Jul 5, 2025
a3811eb
Update: Improve the shape of hoverArea.
ujiro99 Jul 5, 2025
c74cd01
Update: Improved submenu size calculations.
ujiro99 Jul 5, 2025
b100040
Fix: Storage usage.
ujiro99 Jul 5, 2025
a2a1449
Add: Add translations for the Restore from backup menu.
ujiro99 Jul 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"hooks": {
"PostToolUse": [
{
"matcher": "Write|Edit|MultiEdit",
"hooks": [
{
"type": "command",
"command": "npx pretty-quick"
}
]
}
]
}
}
34 changes: 34 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"permissions": {
"allow": [
"Bash(npm install:*)",
"Bash(npm uninstall:*)",
"Bash(yarn build)",
"Bash(rg:*)",
"Bash(npm run lint)",
"WebFetch(domain:github.com)",
"WebFetch(domain:docs.dndkit.com)",
"WebFetch(domain:stackoverflow.com)",
"Bash(yarn lint)",
"Bash(yarn dev)",
"Bash(pkill:*)",
"Bash(node:*)",
"Bash(rm:*)",
"Bash(grep:*)",
"WebFetch(domain:react-hook-form.com)",
"Bash(cat:*)",
"Bash(yarn add:*)",
"Bash(mv:*)",
"Bash(mkdir:*)",
"Bash(sed:*)",
"Bash(npx tsc:*)",
"Bash(find:*)",
"Bash(yarn lint:*)",
"Bash(yarn eslint:*)",
"Bash(npx eslint:*)",
"WebFetch(domain:www.npmjs.com)",
"Bash(ls:*)"
],
"deny": []
}
}
60 changes: 60 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Development Commands

- `yarn dev` - Start development mode with Vite
- `yarn build` - Build the extension (runs TypeScript compilation + Vite build)
- `yarn lint` - Run ESLint to check code quality
- `yarn zip` - Create a distributable extension zip file from the built dist folder

## Architecture Overview

This is a Chrome Extension (Manifest V3) called **Selection Command** that allows users to perform various actions on selected text on web pages.

### Key Components

**Chrome Extension Structure:**

- `manifest.json` - Extension manifest defining permissions, content scripts, and background workers
- `src/background_script.ts` - Service worker handling extension lifecycle and background operations
- `src/content_script.tsx` - Main content script injected into web pages
- `src/options_page.tsx` - Extension options/settings page

**Core Architecture:**

- **Actions** (`src/action/`) - Core functionality modules including background operations, popup handling, page actions, and command execution
- **Components** (`src/components/`) - React components organized by feature:
- `menu/` - Context menu and menu item components
- `option/` - Settings and configuration UI
- `pageAction/` - Page automation and recording components
- `result/` - Result display and popup components
- `ui/` - Reusable UI components (uses Radix UI)
- **Services** (`src/services/`) - Business logic and utilities including settings management, storage, analytics, and page action handling
- **Hooks** (`src/hooks/`) - Custom React hooks for state management and Chrome extension APIs

**Key Features:**

- **Page Actions** - Record and replay browser automation sequences
- **Command Hub** - Web interface for sharing and discovering commands (separate Next.js app in `pages/`)
- **Context Menus** - Right-click actions on selected text
- **Settings Management** - Import/export configurations and user preferences

### Technical Stack

- **Frontend**: React 18 with TypeScript
- **Build System**: Vite with `@crxjs/vite-plugin` for Chrome extension development
- **UI Components**: Shadcn
- **Form and Validation**: react-hook-form and zod
- **Styling**: CSS Modules + Tailwind CSS(ver.3)
- **State Management**: React hooks with Chrome extension storage APIs
- **Testing**: ESLint for code quality

### Project Structure Notes

- The main extension code is in `src/`
- The command hub website is a separate Next.js application in `pages/`
- Extension supports internationalization with locale files in `public/_locales/`
- Uses Shadow DOM for content script styling isolation
- Implements Robula+ algorithm for robust XPath selector generation (`src/lib/robula-plus/`)
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
"@radix-ui/react-collapsible": "^1.1.3",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-label": "^2.1.2",
"@radix-ui/react-menubar": "^1.1.2",
"@radix-ui/react-menubar": "^1.1.15",
"@radix-ui/react-popover": "^1.1.2",
"@radix-ui/react-progress": "^1.1.2",
"@radix-ui/react-radio-group": "^1.3.7",
"@radix-ui/react-scroll-area": "^1.2.9",
"@radix-ui/react-select": "^2.1.6",
"@radix-ui/react-switch": "^1.1.3",
"@radix-ui/react-toggle": "^1.1.6",
Expand All @@ -40,6 +42,7 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.58.1",
"react-multi-progress": "^1.3.0",
"react-textarea-autosize": "^8.5.3",
"react-transition-group": "^4.4.5",
"sonner": "github:ujiro99/sonner",
Expand Down Expand Up @@ -72,8 +75,8 @@
"husky": "^9.1.7",
"npm-build-zip": "^1.0.4",
"postcss": "^8.4.49",
"prettier": "^3.3.3",
"pretty-quick": "^4.0.0",
"prettier": "^3.6.2",
"pretty-quick": "^4.2.2",
"tailwindcss": "^3.4.17",
"typescript": "~5.6.2",
"typescript-eslint": "^8.18.2",
Expand All @@ -91,7 +94,7 @@
},
"prettier": {
"semi": false,
"singleQuote": true,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "all"
},
Expand Down
57 changes: 57 additions & 0 deletions public/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,5 +781,62 @@
},
"clipboard_error_action": {
"message": "OK"
},
"Option_RestoreFromBackup": {
"message": "Aus Backup wiederherstellen"
},
"Option_RestoreFromBackup_checking": {
"message": "Backups werden überprüft..."
},
"Option_RestoreFromBackup_no_backup": {
"message": "Kein Backup verfügbar"
},
"Option_RestoreFromBackup_tooltip": {
"message": "Befehle aus Backup wiederherstellen"
},
"Option_RestoreFromBackup_no_data": {
"message": "Keine Backup-Daten gefunden."
},
"Option_RestoreFromBackup_dialog_title": {
"message": "Aus Backup wiederherstellen"
},
"Option_RestoreFromBackup_dialog_no_data": {
"message": "Keine Backup-Daten verfügbar."
},
"Option_RestoreFromBackup_dialog_select": {
"message": "Wählen Sie ein Backup zum Wiederherstellen:"
},
"Option_RestoreFromBackup_dialog_restore": {
"message": "Wiederherstellen"
},
"Option_RestoreFromBackup_legacy": {
"message": "Legacy-Migration"
},
"Option_RestoreFromBackup_daily": {
"message": "Tägliches Backup"
},
"Option_RestoreFromBackup_weekly": {
"message": "Wöchentliches Backup"
},
"Option_RestoreFromBackup_created": {
"message": "Erstellt:"
},
"Option_RestoreFromBackup_commands": {
"message": "Befehle:"
},
"Option_RestoreFromBackup_folders": {
"message": "Ordner:"
},
"Option_RestoreFromBackup_items": {
"message": "Elemente"
},
"Option_RestoreFromBackup_warning": {
"message": "Warnung:"
},
"Option_RestoreFromBackup_warning_message": {
"message": "Dies ersetzt alle aktuellen Befehle durch die Backup-Daten."
},
"Option_RestoreFromBackup_failed": {
"message": "Wiederherstellung aus Backup fehlgeschlagen."
}
}
66 changes: 66 additions & 0 deletions public/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,15 @@
"Option_parentFolderId": {
"message": "Folder"
},
"Option_parentFolder": {
"message": "Parent Folder"
},
"Option_parentFolder_desc": {
"message": "Select the parent folder"
},
"Option_rootFolder": {
"message": "Root (no parent)"
},
"Option_copyOption": {
"message": "Copy format"
},
Expand Down Expand Up @@ -784,5 +793,62 @@
"clipboard_error_action": {
"message": "OK",
"description": "Action button for clipboard error"
},
"Option_RestoreFromBackup": {
"message": "Restore from Backup"
},
"Option_RestoreFromBackup_checking": {
"message": "Checking backups..."
},
"Option_RestoreFromBackup_no_backup": {
"message": "No backup available"
},
"Option_RestoreFromBackup_tooltip": {
"message": "Restore commands from backup"
},
"Option_RestoreFromBackup_no_data": {
"message": "No backup data found."
},
"Option_RestoreFromBackup_dialog_title": {
"message": "Restore from Backup"
},
"Option_RestoreFromBackup_dialog_no_data": {
"message": "No backup data available."
},
"Option_RestoreFromBackup_dialog_select": {
"message": "Select a backup to restore:"
},
"Option_RestoreFromBackup_dialog_restore": {
"message": "Restore"
},
"Option_RestoreFromBackup_legacy": {
"message": "Legacy Migration"
},
"Option_RestoreFromBackup_daily": {
"message": "Daily Backup"
},
"Option_RestoreFromBackup_weekly": {
"message": "Weekly Backup"
},
"Option_RestoreFromBackup_created": {
"message": "Created:"
},
"Option_RestoreFromBackup_commands": {
"message": "Commands:"
},
"Option_RestoreFromBackup_folders": {
"message": "Folders:"
},
"Option_RestoreFromBackup_items": {
"message": "items"
},
"Option_RestoreFromBackup_warning": {
"message": "Warning:"
},
"Option_RestoreFromBackup_warning_message": {
"message": "This will replace all current commands with the backup data."
},
"Option_RestoreFromBackup_failed": {
"message": "Failed to restore from backup."
}
}
57 changes: 57 additions & 0 deletions public/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -781,5 +781,62 @@
},
"clipboard_error_action": {
"message": "OK"
},
"Option_RestoreFromBackup": {
"message": "Restaurar desde Respaldo"
},
"Option_RestoreFromBackup_checking": {
"message": "Verificando respaldos..."
},
"Option_RestoreFromBackup_no_backup": {
"message": "Sin respaldo disponible"
},
"Option_RestoreFromBackup_tooltip": {
"message": "Restaurar comandos desde respaldo"
},
"Option_RestoreFromBackup_no_data": {
"message": "No se encontraron datos de respaldo."
},
"Option_RestoreFromBackup_dialog_title": {
"message": "Restaurar desde Respaldo"
},
"Option_RestoreFromBackup_dialog_no_data": {
"message": "No hay datos de respaldo disponibles."
},
"Option_RestoreFromBackup_dialog_select": {
"message": "Seleccione un respaldo para restaurar:"
},
"Option_RestoreFromBackup_dialog_restore": {
"message": "Restaurar"
},
"Option_RestoreFromBackup_legacy": {
"message": "Migración Heredada"
},
"Option_RestoreFromBackup_daily": {
"message": "Respaldo Diario"
},
"Option_RestoreFromBackup_weekly": {
"message": "Respaldo Semanal"
},
"Option_RestoreFromBackup_created": {
"message": "Creado:"
},
"Option_RestoreFromBackup_commands": {
"message": "Comandos:"
},
"Option_RestoreFromBackup_folders": {
"message": "Carpetas:"
},
"Option_RestoreFromBackup_items": {
"message": "elementos"
},
"Option_RestoreFromBackup_warning": {
"message": "Advertencia:"
},
"Option_RestoreFromBackup_warning_message": {
"message": "Esto reemplazará todos los comandos actuales con los datos del respaldo."
},
"Option_RestoreFromBackup_failed": {
"message": "Error al restaurar desde respaldo."
}
}
Loading