Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
913afbb
fix: ignore a selection recorded in another tab on shortcut execution
ujiro99 Oct 18, 2026
da08ffd
refactor(hub): stop using Tailwind CSS and shadcn/ui
ujiro99 Oct 18, 2026
3f62e19
docs: add Tailwind CSS v4 migration plan
ujiro99 Oct 18, 2026
7263389
feat(extension): add helpers to isolate content script CSS from the page
ujiro99 Oct 19, 2026
940b6db
feat(extension): migrate to Tailwind CSS v4
ujiro99 Oct 19, 2026
912e8d1
test(extension): cover cn() with Tailwind CSS v4 class names
ujiro99 Oct 19, 2026
546a1a8
docs: document Tailwind CSS v4 rules for content script styles
ujiro99 Oct 19, 2026
5424137
chore: require Node.js 20+ (needed by Tailwind CSS v4)
ujiro99 Oct 19, 2026
b50fd4e
fix(extension): resolve theme colors on the element and limit class s…
ujiro99 Oct 19, 2026
75c6bcf
test(e2e): pass hub assets missing locally through to the deployed hub
ujiro99 Oct 19, 2026
0c78de9
docs: add findings from e2e verification to the migration plan
ujiro99 Oct 19, 2026
b8fda60
refactor: decide clipboard use for the selection only once
ujiro99 Oct 19, 2026
8a582ca
refactor: handle getTabId failures in Ipc and reuse getCurrentTab
ujiro99 Oct 19, 2026
f73394f
chore: remove self-evident comments
ujiro99 Oct 19, 2026
7f2f079
fix(extension): address code review findings on content script CSS is…
ujiro99 Oct 19, 2026
6bb5c04
fix: ask the active tab for its selection on shortcut execution
ujiro99 Oct 19, 2026
2f374db
refactor: require selectionFromClipboard in the parameters of actions
ujiro99 Oct 19, 2026
0b39584
fix: ignore the selection when a shortcut is run while another app ha…
ujiro99 Oct 19, 2026
53d7be3
fix: ignore the selection after focus loss regardless of keepMenuOpen…
ujiro99 Oct 19, 2026
414cd95
fix: use the selection shown in the page after returning to Chrome
ujiro99 Oct 19, 2026
cc24b2f
refactor: remove unused cmd2uuid
ujiro99 Oct 19, 2026
d1c9eae
feat: allow 2-character command titles and normalize whitespace
ujiro99 Oct 19, 2026
cc877fa
feat: limit command titles to 100 characters
ujiro99 Oct 19, 2026
d4ed2bd
docs: remove obsolete cmd2uuid migration plan
ujiro99 Oct 19, 2026
5fdac83
feat: run onboarding_v4 comparing variant C with variant D
ujiro99 Oct 20, 2026
eb99059
feat: simplify onboarding variant D with no step rail and a glow back…
ujiro99 Oct 20, 2026
44cd896
test: ショートカット実行のE2Eテストを追加
ujiro99 Oct 20, 2026
938ff08
fix: クリップボード読み取りを非表示化しPageActionの文字入力を修正
ujiro99 Oct 20, 2026
4a1fffa
refactor: クリップボード読み取りを再利用するOffscreenに統一
ujiro99 Oct 20, 2026
632670a
fix: Offscreenクリップボード読み取りの失敗時処理を強化
ujiro99 Oct 20, 2026
261cde6
test: E2Eテスト名とコメントを英語に統一
ujiro99 Oct 20, 2026
c85bc18
Merge pull request #499 from ujiro99/fix/shortcut-stale-selection-text
ujiro99 Oct 20, 2026
92bc543
fix(extension): address review findings on menu hover and shadow DOM …
ujiro99 Oct 20, 2026
3323d00
fix(extension): center dialog enter animation on Tailwind CSS v4
ujiro99 Oct 20, 2026
6f9a833
fix(extension): render menu hover area outside animated popover content
ujiro99 Oct 20, 2026
3d26109
fix(extension): unmount hover area while popover is closing
ujiro99 Oct 20, 2026
c904f3c
fix(extension): remove background transition from menu items
ujiro99 Oct 21, 2026
32e26f8
chore(extension): remove unused cn package
ujiro99 Oct 21, 2026
9d53741
style(extension): format menu files with Prettier
ujiro99 Oct 21, 2026
4c6bdd6
Merge pull request #500 from ujiro99/feat/tailwindcss-v4
ujiro99 Oct 21, 2026
cb5d2af
Add: Claude Skills for checking japanese.
ujiro99 Oct 21, 2026
d5f0d20
Merge pull request #502 from ujiro99/feat/title-min-length-and-normalize
ujiro99 Oct 21, 2026
16e1e8a
Merge branch 'dev-1.4.0' of github.com.private:ujiro99/selection-comm…
ujiro99 Oct 21, 2026
33560e4
Merge branch 'dev-1.4.0' into feat/onboarding-variant-d
ujiro99 Oct 21, 2026
1446165
style(extension): adjust onboarding spacing and styles for variant D
ujiro99 Oct 21, 2026
32d004a
Merge branch 'main' into feat/onboarding-variant-d
ujiro99 Oct 22, 2026
ae1e9d3
fix(extension): keep variant C welcome unchanged by scoping timing to…
ujiro99 Oct 22, 2026
38082cc
Merge pull request #503 from ujiro99/feat/onboarding-variant-d
ujiro99 Oct 22, 2026
a2648f8
Merge branch 'main' into dev-1.4.0
ujiro99 Oct 22, 2026
3f5a734
feat(extension): add theme setting and dark mode for popup menu
ujiro99 Oct 22, 2026
14e3158
feat(extension): mark shared commands with unpushed local edits in co…
ujiro99 Oct 22, 2026
27c7550
feat(extension): support dark mode on the options page
ujiro99 Oct 22, 2026
c1b16de
feat(extension): use CloudUpload icon for sharing and highlight unpus…
ujiro99 Oct 22, 2026
ad9f11c
style(extension): use orange for the unpushed-edits share button
ujiro99 Oct 22, 2026
ff5ff07
style(extension): use CloudUpload icon for share buttons in edit dialog
ujiro99 Oct 22, 2026
e1b902d
i18n(extension): simplify unsynced changes tooltip
ujiro99 Oct 22, 2026
b6cd49c
i18n(extension): use kana in Japanese unsynced changes tooltip
ujiro99 Oct 22, 2026
82f9240
refactor(extension): address review comments on share button
ujiro99 Oct 22, 2026
f23be23
Merge pull request #511 from ujiro99/feat/share-button-unpushed-edits
ujiro99 Oct 22, 2026
d29ed5c
feat(extension): support dark mode on the onboarding page
ujiro99 Oct 22, 2026
959e812
feat(extension): support dark mode on content-script UIs
ujiro99 Oct 22, 2026
3d24a71
feat(extension): reuse existing options page tab when opening settings
ujiro99 Oct 22, 2026
255ef83
fix(extension): restore result popup colors lost in a refactor
ujiro99 Oct 22, 2026
5fd0bb0
fix(extension): save the command before pushing it to the Hub
ujiro99 Oct 22, 2026
31f93e2
feat(extension): reuse options page tab across windows and for parame…
ujiro99 Oct 23, 2026
8974ef5
fix(extension): address review comments on options page tab reuse
ujiro99 Oct 23, 2026
dc6c2c0
Merge pull request #515 from ujiro99/feat/reuse-options-page-tab
ujiro99 Oct 23, 2026
de72cb7
Merge remote-tracking branch 'origin/dev-1.4.0' into fix/share-update…
Copilot Oct 23, 2026
b64b33e
Merge pull request #516 from ujiro99/fix/share-update-race
ujiro99 Oct 23, 2026
c9787e5
Merge pull request #510 from ujiro99/feat/dark-mode
ujiro99 Oct 23, 2026
b95abe4
Merge branch 'dev-1.4.0' into feat/dark-mode-options
ujiro99 Oct 23, 2026
855a731
fix(extension): address review feedback on options page dark mode
ujiro99 Oct 23, 2026
9fe1ccc
Merge pull request #512 from ujiro99/feat/dark-mode-options
ujiro99 Oct 23, 2026
9028222
Merge branch 'dev-1.4.0' into feat/dark-mode-onboarding
ujiro99 Oct 23, 2026
0b72db2
fix(extension): prevent white flash on extension pages in dark mode
ujiro99 Oct 23, 2026
1684244
fix(extension): improve onboarding visibility in dark mode
ujiro99 Oct 23, 2026
c1887a1
Update: Adjust css.
ujiro99 Oct 23, 2026
e83a14e
Merge pull request #513 from ujiro99/feat/dark-mode-onboarding
ujiro99 Oct 23, 2026
4ceb131
Merge branch 'dev-1.4.0' into feat/dark-mode-content
ujiro99 Oct 23, 2026
7aa6795
fix(extension): improve command edit dialog visibility in dark mode
ujiro99 Oct 23, 2026
5df6c3d
fix(extension): apply dark mode dialog styles to all dialogs
ujiro99 Oct 23, 2026
c53286a
fix(extension): improve page action help and step editor in dark mode
ujiro99 Oct 23, 2026
753512e
fix(extension): use input background for enabled command type button
ujiro99 Oct 24, 2026
e147dc6
fix(extension): refine options page controls in dark mode
ujiro99 Oct 24, 2026
bceb993
fix(extension): keep dark defaults for unset popup colors
ujiro99 Oct 24, 2026
9aab485
fix(extension): show theme-aware defaults in user style descriptions
ujiro99 Oct 24, 2026
0ea8d4e
Update: Refine styles of HubBanner.
ujiro99 Oct 24, 2026
a4662f9
Update: Adjust color of CommandType.
ujiro99 Oct 24, 2026
7cb1d6d
fix(extension): render popup align images as masks for dark mode
ujiro99 Oct 24, 2026
5069e97
fix(extension): brighten detail chevrons and add select hover in dark…
ujiro99 Oct 24, 2026
2c128a4
fix(extension): use valid transition-colors class on select trigger
ujiro99 Oct 24, 2026
147d32e
fix(extension): drop outdated user style note from theme description
ujiro99 Oct 24, 2026
c37e70f
fix(extension): unify hover and selected backgrounds in settings
ujiro99 Oct 24, 2026
6815105
refactor(extension): add hover-grow utilities for settings page
ujiro99 Oct 24, 2026
fc294ae
fix(extension): share overlay colors and sync user style default with…
ujiro99 Oct 24, 2026
c4c1434
Merge pull request #514 from ujiro99/feat/dark-mode-content
ujiro99 Oct 24, 2026
572018f
fix(extension): improve onboarding visibility in dark mode
ujiro99 Oct 24, 2026
917bc5e
fix(extension): wait for copy button in search URL assist
ujiro99 Oct 24, 2026
4b7a0c5
fix(extension): account for click condition wait in step timeout
ujiro99 Oct 24, 2026
757835a
feat(extension): prefill search URL assist with current search URL
ujiro99 Oct 24, 2026
c1fc76f
fix(extension): accept Gemini markdown link in searchUrl validation
ujiro99 Oct 24, 2026
275531e
Merge pull request #517 from ujiro99/fix/search-url-assist-copy-wait
ujiro99 Oct 24, 2026
03cfe5d
v1.4.0
ujiro99 Oct 24, 2026
8740e09
ci: bump Playwright Docker image to v1.64.1 to match yarn.lock
ujiro99 Oct 24, 2026
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
11 changes: 11 additions & 0 deletions .claude/skills/check-japanese-in-src/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: check-japanese-in-src
description: ソースコード内の日本語を検出するスキル
script: scripts/check-japanese.sh
---

# 日本語の検出手順

以下を実行してください。

`bash "${CLAUDE_SKILL_DIR}/scripts/check-japanese.sh"`
13 changes: 13 additions & 0 deletions .claude/skills/check-japanese-in-src/scripts/check-japanese.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

rg -n -l '[ぁ-んァ-ン一-龠]' ./packages/extension/src \
--glob '!**/*.stories.tsx' \
--glob '!**/*.test.*' \
--glob '!**/lib/locale*' \
--glob '!content/'

rg -n -l '[ぁ-んァ-ン一-龠]' ./packages/extension/e2e \
--glob '!**/*.stories.tsx' \
--glob '!**/*.test.*' \
--glob '!**/lib/locale*' \
--glob '!content/'
2 changes: 1 addition & 1 deletion .github/workflows/check-ai-selectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
# Must match the @playwright/test version resolved in yarn.lock;
# otherwise the bundled browsers don't match and launching fails.
# Keep it in sync with .github/workflows/test.yml.
image: mcr.microsoft.com/playwright:v1.62.1-jammy
image: mcr.microsoft.com/playwright:v1.64.1-jammy
outputs:
broken: ${{ steps.check.outputs.broken }}
blocked: ${{ steps.check.outputs.blocked }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
e2e:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.62.1-jammy
image: mcr.microsoft.com/playwright:v1.64.1-jammy

steps:
- name: Checkout code
Expand Down
46 changes: 46 additions & 0 deletions docs/design/clipboard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# クリップボード読み取り

Chrome 116相当以降を対象とし、Service Workerからの読み取りは
`readClipboard()` → `readOffscreenClipboard()` に統一する。
`clipboard.html` による表示タブ・ウィンドウでの読み取りは使用しない。

## 作成コストと再利用

- 最初の読み取りでOffscreen Documentを遅延作成する。
- 読み取り後もドキュメントを維持し、次回以降は同じドキュメントを再利用する。
- 読み取りは直列化し、同時要求による二重作成や結果の混在を防ぐ。
- Service Worker再起動時も `runtime.getContexts()` で既存ドキュメントを検出する。
- Chromeによってドキュメントが破棄された場合は、次の要求で再作成する。
- textareaの内容は読み取り直後に消去し、クリップボード本文を保持しない。
- 作成時に他のコンテキストが先に作成していた場合(単一ドキュメント制約のエラー)は、
既存ドキュメントをそのまま使用する。

## 失敗時の扱い

- 読み取りに失敗した場合は50ms間隔で最大3回まで再試行する。
- Offscreen Documentからの応答が `ClipboardResult` の形式でない場合はエラーとして扱う。
- textareaにフォーカスできない場合は、空文字を成功として返さずエラーとする。
- エラー時のトーストは、ユーザーが見ているタブへ表示する。
バックグラウンドタブで開く場合は、表示先ではなく実行元のタブへ通知する。

Offscreen Documentを表示先のタブ・ウィンドウへ転用するAPIはないため、
従来の「読み取り画面を表示先として転用する」最適化はそのまま移植できない。
代わりに、読み取り側のドキュメントを要求間で再利用する設計とする。

従来は、表示先タブ・ウィンドウで読み取った後、その画面を目的URLへ遷移させていた。
新方式では読み取り用のドキュメントを繰り返し再利用し、表示先は完成したURLで
一度だけ作成する。初回は非表示ドキュメントの作成待ちが必要だが、次回以降は
読み取りごとの作成・破棄と、表示先での中間ページの読み込みを避けられる。
ブラウザによるレンダラープロセスの割り当ては制御しないため、
初回を含めて常に高速になるとは保証しない。

## 読み取りAPI

Offscreen Documentはフォーカスできない。検証環境では
`navigator.clipboard.readText()` は存在するものの、
`Document is not focused` で失敗したため、`clipboardRead` 権限と
textareaへの `document.execCommand("paste")` を使用する。
APIを将来変更する際は、非フォーカス状態での読み取りが成立することを確認する。

- [Offscreen API](https://developer.chrome.com/docs/extensions/reference/api/offscreen)
- [runtime.getContexts](https://developer.chrome.com/docs/extensions/reference/api/runtime#method-getContexts)
303 changes: 303 additions & 0 deletions docs/design/tailwindcss-v4-migration.md

Large diffs are not rendered by default.

136 changes: 0 additions & 136 deletions docs/misty-hugging-llama.md

This file was deleted.

55 changes: 55 additions & 0 deletions docs/test/e2e-test-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@
| E2E-90 | ハブ | PageActionコマンド | インストール | 実装済 |
| E2E-91 | ハブ | 追加 | - | 実装済 |
| E2E-92 | ハブ | 削除 | - | 実装済 |
| E2E-100 | ショートカット | 検索・選択文字列 | onCommand以降 | 実装済 |
| E2E-101 | ショートカット | 日本語・空白・記号 | onCommand以降 | 実装済 |
| E2E-102 | ショートカット | クリップボード | onCommand以降 | 実装済 |
| E2E-103 | ショートカット | DO_NOTHING | onCommand以降 | 実装済 |
| E2E-104 | ショートカット | Content Scriptなし | onCommand以降 | 実装済 |
| E2E-105 | ショートカット | 登録状態 | onCommand以降 | 実装済 |
| E2E-106 | ショートカット | PageAction / Popup | Clipboard / 未選択 | 実装済 |
| E2E-107 | ショートカット | PageAction / BackgroundTab | Clipboard / 未選択 | 実装済 |
| E2E-108 | ショートカット | PageAction / Popup | SelectedText / 選択あり | 実装済 |
| E2E-109 | ショートカット | PageAction / Popup | SelectedText / 未選択 | 実装済 |
| E2E-110 | ショートカット | PageAction / BackgroundTab | SelectedText / 未選択 | 実装済 |

---

Expand Down Expand Up @@ -1048,3 +1059,47 @@
**期待動作**

- 削除したコマンドに対応する Hub ページのダウンロードボタンが復活する(「追加済み」表示が解除される)

### ショートカット(shortcut.spec.ts)

`chrome.commands.onCommand` に登録する `handleShortcutCommand` 以降を検証する。
E2EビルドでのみService Workerのグローバルへ関数を公開し、Playwrightの
`Worker.evaluate()` から呼び出す。IPCや外部Webページ向けの受付経路は追加しない。
本番ビルドでは公開処理が除去される。OSのキー入力・Chromeのイベント発火、
サイドパネルは対象外。各テストでOptionsPageから設定をインポートする。

| テストID | 手順 | 期待動作 |
| -------- | ------------------------------------------------------ | -------------------------------------------------------------------------------- |
| E2E-100 | TestPageで見出しを選択しslot_1を実行 | 割り当てた検索コマンドの結果が開き、選択文字列が検索パラメータに渡る |
| E2E-101 | 日本語・空白・記号を選択しslot_1を実行 | URLエンコードされた文字列が正しく渡る |
| E2E-102 | 未選択状態でクリップボードへ文字列を設定しslot_1を実行 | クリップボードの文字列で検索する |
| E2E-103 | 未選択状態でDO_NOTHINGのslot_2を実行し処理完了を待つ | タブ数・ID・URLが変化しない |
| E2E-104 | クリップボードを設定しchrome://versionでslot_1を実行 | Content Scriptを使わずService Workerから検索する |
| E2E-105 | Service Workerでchrome.commands.getAll()を実行 | slot_1〜slot_3の登録を確認する。キー文字列の値はOSや競合に依存するため固定しない |

#### PageActionの変数展開(E2E-106〜110)

各ケースで入力ステップを含むPageActionをOptionsPageからインポートし、
`slot_1` に割り当てる。未選択時の設定は `USE_CLIPBOARD` とする。
TestPageを開き、実際のクリップボードに日本語・記号・改行と、配列を含む
TypeScriptコードを設定する。`[KeyA]`、`{Enter}`、`[]`、`[[`、`{{` も含め、
キー操作として解釈されず、textareaに文字列のまま入力されることを検証する。
ショートカット実行後、入力欄の値が `Input: ` と期待する文字列に一致するまで待機する。
ウィンドウ種別がポップアップ/通常ウィンドウであることも検証する。
テスト側で対象ページをアクティブ化する操作は行わない。

バックグラウンドタブでは `readClipboard()` がOffscreen Documentで読み取り、
結果タブを非アクティブで作成する。E2E-107/110ではウィンドウが新規作成されないこと、
結果タブの非アクティブ状態と元ページのフォーカス維持も検証する。
全表示モードでOffscreenに統一し、Chrome 116相当以降を対応範囲とする。
E2E-107ではクリップボードを書き換えて再実行し、最新の入力値と
Offscreen Documentの `documentId` が同一であること(再利用)も検証する。
設計の詳細は [クリップボード読み取り](../design/clipboard.md) を参照。

| テストID | 選択状態 | 入力ステップ | 表示方法 | 期待する入力値の変数部分 |
| -------- | -------- | ------------------ | -------------------- | ------------------------------------------ |
| E2E-106 | 未選択 | `{{Clipboard}}` | ポップアップ | クリップボードの内容 |
| E2E-107 | 未選択 | `{{Clipboard}}` | バックグラウンドタブ | クリップボードの内容 |
| E2E-108 | 選択あり | `{{SelectedText}}` | ポップアップ | 選択テキスト(クリップボードとは異なる値) |
| E2E-109 | 未選択 | `{{SelectedText}}` | ポップアップ | クリップボードの内容 |
| E2E-110 | 未選択 | `{{SelectedText}}` | バックグラウンドタブ | クリップボードの内容 |
3 changes: 2 additions & 1 deletion docs/test/serviceWorker-test-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@

**テキスト処理:**

- ✅ SWD-44: 正常系: selectedTextが空でuseClipboardがtrueの場合、clipboardTextを使用
- ✅ SWD-44: 正常系: selectionFromClipboardがtrueの場合、clipboardTextをselectedTextとして使用
- ✅ SWD-44-b: 正常系: ステップのみがクリップボードを使う場合(clipboardForSteps)、selectedTextは空のまま
- ✅ SWD-45: 正常系: selectedTextが存在する場合はそのまま使用
- ✅ SWD-46: 正常系: userVariablesが正しく渡される

Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "selection-command-monorepo",
"version": "1.3.2",
"version": "1.4.0",
"private": true,
"description": "Selection Command - Monorepo for Chrome Extension and Hub",
"author": "ujiro99",
Expand Down Expand Up @@ -32,18 +32,15 @@
"@types/react-dom": "^18.3.5",
"@vitest/coverage-v8": "^3.2.4",
"@vitest/ui": "^3.2.4",
"autoprefixer": "^10.4.20",
"eslint": "^9.17.0",
"jsdom": "^26.1.0",
"postcss": "^8.4.49",
"prettier": "^3.6.2",
"pretty-quick": "^4.2.2",
"tailwindcss": "^3.4.17",
"typescript": "~5.6.2",
"vitest": "^3.2.4"
},
"engines": {
"node": ">=18.0.0",
"node": ">=20.0.0",
"yarn": ">=1.22.0"
},
"dependencies": {},
Expand Down
Loading
Loading