Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
3408784
Initial plan
Copilot Feb 8, 2026
cec1a8a
Add sidePanel open mode support
Copilot Feb 8, 2026
925f2b9
Add sidePanel auto-hide functionality and settings
Copilot Feb 8, 2026
e5d5ec8
Fix code review issues - prevent duplicates and improve error handling
Copilot Feb 8, 2026
a15c81d
Update: Fix sidePanel to open properly.
ujiro99 Feb 11, 2026
ac950b6
Update: Enables auto closing the sidepanel.
ujiro99 Feb 12, 2026
8bba5ac
Update: translation.
ujiro99 Feb 13, 2026
38a383a
Update: Don't close the sidepanel when switching tabs.
ujiro99 Feb 13, 2026
8b822ba
Update: Fix compile errors.
ujiro99 Feb 15, 2026
2956e2c
Update: Stop automatically closing the SidePanel when the main panel …
ujiro99 Feb 18, 2026
912c64e
Update: Trigger navigation when clicking links in the side panel.
ujiro99 Feb 18, 2026
0d1caa6
Update: Separate the retrieval of activeTabId.
ujiro99 Feb 18, 2026
e89a6df
Fix: testcases.
ujiro99 Feb 19, 2026
f4c02d7
Merge branch 'main' into copilot/add-sidepanel-to-page-opening
ujiro99 Feb 19, 2026
5180e0f
Merge branch 'main' into copilot/add-sidepanel-to-page-opening
ujiro99 Feb 19, 2026
1cc0759
Update: Add comment.
ujiro99 Feb 19, 2026
61db234
Fix: review comment
ujiro99 Feb 19, 2026
952d9a6
Update: Fix the way asynchronous responses are handled.
ujiro99 Feb 19, 2026
ffc9720
Fix: Reveiw comment.
ujiro99 Feb 19, 2026
48efdf6
Fix: testcase.
ujiro99 Feb 19, 2026
7b59ebf
Update: Add image for SidePanel.
ujiro99 Feb 19, 2026
ad11166
Fix: Review comment.
ujiro99 Feb 19, 2026
6656c56
Update: Add `SidePanel` option to the Hub.
ujiro99 Feb 19, 2026
fb9c955
Fix: A build error.
ujiro99 Feb 20, 2026
ffc63b0
Update: Add sidePanel to definitions.
ujiro99 Feb 20, 2026
ba6ead9
Update: Fix command Ids.
ujiro99 Feb 21, 2026
92aaa3c
Update: claude settings.
ujiro99 Feb 21, 2026
354b492
Fix: Reveiw comments.
ujiro99 Feb 21, 2026
db2764d
Merge branch 'main' into copilot/add-sidepanel-to-page-opening
ujiro99 Feb 21, 2026
47c21f7
Fix: testcases.
ujiro99 Feb 21, 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
14 changes: 9 additions & 5 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"permissions": {
"allow": [
"Bash(cat:*)",
"Bash(curl:*)",
"Bash(do echo \"=== $lang ===\")",
"Bash(do)",
"Bash(done)",
"Bash(echo:*)",
"Bash(find:*)",
"Bash(for lang in de en es fr hi id it ja ko ms pt_BR pt_PT ru zh_CN)",
"Bash(for lang in de en es fr hi id it ko ms pt_BR pt_PT ru zh_CN)",
"Bash(gh api:*)",
"Bash(gh pr:*)",
"Bash(grep:*)",
Expand All @@ -17,24 +17,29 @@
"Bash(mkdir:*)",
"Bash(mv:*)",
"Bash(node:*)",
"Bash(pkill:*)",
"Bash(npx tsx:*)",
"Bash(rg:*)",
"Bash(rm:*)",
"Bash(sed:*)",
"Bash(tsc:*)",
"Bash(yarn add:*)",
"Bash(yarn build)",
"Bash(yarn build:*)",
"Bash(yarn eslint:*)",
"Bash(yarn lint)",
"Bash(yarn lint:*)",
"Bash(yarn list:*)",
"Bash(yarn test:*)",
"Bash(yarn test:run:*)",
"Bash(yarn tsc)",
"Bash(yarn tsc:*)",
"Bash(yarn workspace @selection-command/extension:*)",
"Bash(yarn workspace @selection-command/hub:*)",
"WebFetch(domain:api.github.com)",
"WebFetch(domain:developer.chrome.com)",
"WebFetch(domain:docs.dndkit.com)",
"WebFetch(domain:github.com)",
"WebFetch(domain:raw.githubusercontent.com)",
"WebFetch(domain:react-hook-form.com)",
"WebFetch(domain:stackoverflow.com)",
"WebFetch(domain:www.npmjs.com)",
Expand All @@ -45,6 +50,7 @@
"mcp__serena__find_referencing_symbols",
"mcp__serena__find_symbol",
"mcp__serena__get_symbols_overview",
"mcp__serena__initial_instructions",
"mcp__serena__insert_after_symbol",
"mcp__serena__list_dir",
"mcp__serena__onboarding",
Expand All @@ -54,9 +60,7 @@
"mcp__serena__think_about_collected_information",
"mcp__serena__think_about_task_adherence",
"mcp__serena__think_about_whether_you_are_done",
"mcp__serena__write_memory",
"Bash(yarn build:*)",
"mcp__serena__initial_instructions"
"mcp__serena__write_memory"
],
"deny": []
}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
.env.development.local
.env.test.local
.env.production.local
.git

npm-debug.log*
yarn-debug.log*
Expand Down
65 changes: 57 additions & 8 deletions .serena/project.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
# * For C, use cpp
# * For JavaScript, use typescript
# Special requirements:
# * csharp: Requires the presence of a .sln file in the project folder.
language: typescript

# whether to use the project's gitignore file to ignore files
# Added on 2025-04-07
ignore_all_files_in_gitignore: true
Expand Down Expand Up @@ -63,5 +56,61 @@ excluded_tools: []
# initial prompt for the project. It will always be given to the LLM upon activating the project
# (contrary to the memories, which are loaded on demand).
initial_prompt: ""

# the name by which the project can be referenced within Serena
project_name: "selection-command"

# list of mode names to that are always to be included in the set of active modes
# The full set of modes to be activated is base_modes + default_modes.
# If the setting is undefined, the base_modes from the global configuration (serena_config.yml) apply.
# Otherwise, this setting overrides the global configuration.
# Set this to [] to disable base modes for this project.
# Set this to a list of mode names to always include the respective modes for this project.
base_modes:

# list of mode names that are to be activated by default.
# The full set of modes to be activated is base_modes + default_modes.
# If the setting is undefined, the default_modes from the global configuration (serena_config.yml) apply.
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
# This setting can, in turn, be overridden by CLI parameters (--mode).
default_modes:

# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default)
included_optional_tools: []

# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
fixed_tools: []

# the encoding used by text files in the project
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
encoding: utf-8

# list of languages for which language servers are started; choose from:
# al bash clojure cpp csharp
# csharp_omnisharp dart elixir elm erlang
# fortran fsharp go groovy haskell
# java julia kotlin lua markdown
# matlab nix pascal perl php
# powershell python python_jedi r rego
# ruby ruby_solargraph rust scala swift
# terraform toml typescript typescript_vts vue
# yaml zig
# (This list may be outdated. For the current list, see values of Language enum here:
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
# Note:
# - For C, use cpp
# - For JavaScript, use typescript
# - For Free Pascal/Lazarus, use pascal
# Special requirements:
# Some languages require additional setup/installations.
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
# When using multiple languages, the first language server that supports a given file will be used for that file.
# The first language is the default language and the respective language server will be used as a fallback.
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
languages:
- typescript

# override of the corresponding setting in serena_config.yml, see the documentation there.
# If null or missing, the value from the global config is used.
symbol_info_budget:
52 changes: 52 additions & 0 deletions docs/design/side-pane-link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
## 1. 対象範囲

- selection command から開かれた **side panel 内の画面遷移** を、実際のブラウザナビゲーションではなく「side panel の URL 差し替え」として扱う。
- 実装対象:
- side panel 内で動作する content script
- service worker(background)
- side panel 表示状態を持つ BgData(状態管理層)

---

## 2. side panel 上かどうかの判定要件

- 「この content script が side panel 上で動いているか」を判定するための条件:
- BgData が保持する「side panel を表示中の tabId リスト」に、現在のタブ ID が含まれていること。
- かつ、以下のいずれかを満たすこと:
- 現在の URL が「side panel 用 URL」であると判定できる。
- side panel とメインコンテンツが同じ URL を表示している場合は、ウィンドウ位置やレイアウト情報から「side panel 側」であることを判定すること。

---

## 3. side panel 内でのページ遷移フック要件(content script)

- side panel 上で動作していると判定できた場合のみ、遷移フックを有効化する。
- フック対象:
- ユーザーのリンククリックなど、ページ遷移を引き起こす操作。
- ただし、`target="_blank"` など、意図的に別タブ・ウィンドウで開くことを指定されている場合はフックを無効化する
- フック時の挙動:
- ブラウザ標準のページ遷移は発生させない(キャンセルする)。
- 遷移先 URL を取得し、service worker に「side panel の URL 更新要求」として通知する。

---

## 4. service worker による side panel URL 更新要件

- content script からの「side panel の URL 更新要求」を受け取ったら、以下を行う:
- 対象 tabId が「side panel 表示中タブリスト」に含まれていることを確認する。
- 対象の side panel の URL を更新するための API を呼び出し、side panel の表示内容を遷移先 URL に切り替える。
- URL 更新後の状態管理:
- BgData 上で、その tabId の side panel に紐づく「現在 URL」を更新する。
- 必要に応じて、履歴やその他の管理情報も更新できるようにしておく。

---

## 5. 状態管理要件(BgData)

- 少なくとも以下の情報を持つ:
- side panel を表示中の tabId の集合(リストまたはセット)。
- 各 tabId ごとの side panel の現在 URL(+必要に応じて追加情報)。
- 更新タイミング(例):
- side panel オープン/クローズ時。
- service worker が URL 更新 API を呼び出したタイミング。
- タブクローズ時など、不要になった状態のクリア。
3 changes: 2 additions & 1 deletion packages/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"contextMenus",
"declarativeNetRequest",
"clipboardRead",
"system.display"
"system.display",
"sidePanel"
],
"host_permissions": ["http://*/*", "https://*/*"],
"web_accessible_resources": [
Expand Down
4 changes: 2 additions & 2 deletions packages/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"react-multi-progress": "^1.3.0",
"react-textarea-autosize": "^8.5.3",
"react-transition-group": "^4.4.5",
"sonner": "github:ujiro99/sonner",
"sonner": "git+https://github.com/ujiro99/sonner.git",
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7",
"uuid": "^11.1.0",
Expand All @@ -59,7 +59,7 @@
"devDependencies": {
"@crxjs/vite-plugin": "^2.0.0-beta.30",
"@testing-library/dom": "^10.4.0",
"@types/chrome": "^0.0.293",
"@types/chrome": "^0.1.36",
"@types/jest": "^29.5.11",
"@types/platform": "^1.3.6",
"@types/react-transition-group": "^4.4.10",
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "Seitenpanel"
},
"Option_openMode_linkPopup": {
"message": "Link-Popup"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "Rahmenfarbe"
},
"Option_userStyles_option_font_color": {
"message": "Schriftfarbe"
},
"Option_userStyles_desc_border_color": {
"message": "Geben Sie die Rahmenfarbe des Menüs an. Standard: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Geben Sie die Schriftfarbe an. Standard: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Schriftgrößen-Skalierung"
},
Expand Down Expand Up @@ -905,6 +914,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Tab im Hintergrund öffnen.<wbr>Rechts vom aktuellen Tab anzeigen."
},
"Option_openMode_sidePanel_desc": {
"message": "Im Seitenpanel öffnen."
},
"Option_title_desc": {
"message": "Wird als Befehlstitel angezeigt."
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_backgroundTab": {
"message": "Background Tab"
},
"Option_openMode_sidePanel": {
"message": "Side Panel"
},
"Option_openMode_api": {
"message": "API"
},
Expand Down Expand Up @@ -587,9 +590,15 @@
"Option_userStyles_option_border_color": {
"message": "Border Color"
},
"Option_userStyles_option_font_color": {
"message": "Font color"
},
"Option_userStyles_desc_border_color": {
"message": "Specify the border color of the menu. Default: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Specify font color. Default: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Font size scaling"
},
Expand Down Expand Up @@ -953,6 +962,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Open tab in background.<wbr>Show to the right of current tab."
},
"Option_openMode_sidePanel_desc": {
"message": "Open in side panel."
},
"Option_title_desc": {
"message": "Displayed as the command title."
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/es/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "Panel lateral"
},
"Option_openMode_linkPopup": {
"message": "Emergente de Enlace"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "Color del Borde"
},
"Option_userStyles_option_font_color": {
"message": "Color de fuente"
},
"Option_userStyles_desc_border_color": {
"message": "Especifique el color del borde del menú. Predeterminado: #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Especificar el color de fuente. Predeterminado: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Escala de tamaño de fuente"
},
Expand Down Expand Up @@ -905,6 +914,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Abrir pestaña en segundo plano.<wbr>Mostrar a la derecha de la pestaña actual."
},
"Option_openMode_sidePanel_desc": {
"message": "Abrir en panel lateral."
},
"Option_title_desc": {
"message": "Se muestra como el título del comando."
},
Expand Down
12 changes: 12 additions & 0 deletions packages/extension/public/_locales/fr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@
"Option_openMode_api": {
"message": "API"
},
"Option_openMode_sidePanel": {
"message": "Panneau latéral"
},
"Option_openMode_linkPopup": {
"message": "Pop-up de Lien"
},
Expand Down Expand Up @@ -545,9 +548,15 @@
"Option_userStyles_option_border_color": {
"message": "Couleur de la Bordure"
},
"Option_userStyles_option_font_color": {
"message": "Couleur de police"
},
"Option_userStyles_desc_border_color": {
"message": "Spécifiez la couleur de la bordure du menu. Par défaut : #F3F4F6"
},
"Option_userStyles_desc_font_color": {
"message": "Spécifier la couleur de police. Par défaut: #0F172A"
},
"Option_userStyles_option_font_scale": {
"message": "Échelle de taille de police"
},
Expand Down Expand Up @@ -905,6 +914,9 @@
"Option_openMode_backgroundTab_desc": {
"message": "Ouvrir l'onglet en arrière-plan.<wbr>Afficher à droite de l'onglet actuel."
},
"Option_openMode_sidePanel_desc": {
"message": "Ouvrir dans le panneau latéral."
},
"Option_title_desc": {
"message": "Affiché comme titre de commande."
},
Expand Down
Loading
Loading