Skip to content

Comments

Add fullscreen window display mode for page actions#278

Closed
Copilot wants to merge 5 commits intomainfrom
copilot/add-fullscreen-window-feature
Closed

Add fullscreen window display mode for page actions#278
Copilot wants to merge 5 commits intomainfrom
copilot/add-fullscreen-window-feature

Conversation

Copy link
Contributor

Copilot AI commented Feb 8, 2026

Adds fullscreen as a fifth display mode option for page action commands, alongside popup, window, tab, and background tab.

Changes

Core Implementation

  • Added FULLSCREEN = "fullscreen" to PAGE_ACTION_OPEN_MODE enum (shared package)
  • Fullscreen is page-action-only; not available for search commands
  • Implementation: create POPUP_TYPE.NORMAL window, then apply chrome.windows.update(windowId, { state: "fullscreen" })

Services (packages/extension/src/services/pageAction/background.ts)

  • openAndRunPageAction: handles fullscreen mode during execution
  • openRecorder: supports fullscreen mode when recording actions

UI (packages/extension/src/components/option/field/OpenModeToggleField.tsx)

  • Dynamic grid layout: 4 columns for search, 5 columns for page actions
  • Added fullscreen icon mapping and selection option

Localization

  • Added fullscreen translations across all 14 supported languages

Example Usage

When creating or editing a page action command, users can now select fullscreen mode:

// Internally, when openMode is FULLSCREEN:
const w = await chrome.windows.create({
  url: startUrl,
  type: POPUP_TYPE.NORMAL,
  // ... other params
})

if (openMode === PAGE_ACTION_OPEN_MODE.FULLSCREEN && w.id) {
  await chrome.windows.update(w.id, { state: "fullscreen" })
}

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.google-analytics.com
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node --conditions node --conditions development /home/REDACTED/work/selection-command/selection-command/node_modules/tinypool/dist/entry/process.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>ウィンドウ表示方法へ「フルスクリーン」を追加</issue_title>
<issue_description>## 要点

  • packages/extension/src/services/chrome.ts へ、ウィンドウを全画面、フルスクリーンで表示する機能を追加
  • packages/extension/src/action へ、当該機能を呼び出すアクションを追加
  • packages/extension/src/components/option/editor/CommandEditDialog.tsx で選択できるようにする</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 3 commits February 8, 2026 02:12
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Co-authored-by: ujiro99 <677231+ujiro99@users.noreply.github.com>
Copilot AI changed the title [WIP] Add fullscreen option for window display Add fullscreen window display mode for page actions Feb 8, 2026
Copilot AI requested a review from ujiro99 February 8, 2026 02:18
…n-window-feature

# Conflicts:
#	packages/extension/src/components/option/field/OpenModeToggleField.tsx
@codecov
Copy link

codecov bot commented Feb 21, 2026

Codecov Report

❌ Patch coverage is 16.27907% with 36 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.79%. Comparing base (0c97112) to head (9057a35).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...es/extension/src/services/pageAction/background.ts 25.00% 21 Missing ⚠️
packages/extension/src/services/chrome.ts 0.00% 9 Missing ⚠️
...rc/components/option/field/OpenModeToggleField.tsx 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #278      +/-   ##
==========================================
- Coverage   17.79%   17.79%   -0.01%     
==========================================
  Files         307      307              
  Lines       28412    28447      +35     
  Branches     1185     1188       +3     
==========================================
+ Hits         5056     5062       +6     
- Misses      23356    23385      +29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ujiro99 ujiro99 closed this Feb 21, 2026
@ujiro99 ujiro99 deleted the copilot/add-fullscreen-window-feature branch February 21, 2026 06:44
@claude
Copy link

claude bot commented Feb 21, 2026

PRレビュー: フルスクリーン表示モードの追加

全体的に実装の方向性は正しく、主要なケース(フルスクリーンでの実行・録画)はカバーされています。ただし、いくつか修正が必要な問題と改善提案があります。


バグ: chrome.tsopenWindowAndReadClipboard の条件が誤っている

ファイル: packages/extension/src/services/chrome.ts

変更後のコード:

if (param.type === POPUP_TYPE.NORMAL) {
  createParams.width = param.width
  createParams.height = param.height
  createParams.left = param.left
  createParams.top = param.top
}

コメントには「フルスクリーン以外のウィンドウにのみ寸法を設定する」とありますが、この条件はその意図と逆になっています

  • POPUP_TYPE.POPUP(通常のポップアップモード)→ 寸法が設定されない → リグレッション
  • POPUP_TYPE.NORMAL(WINDOW / FULLSCREEN モード)→ 寸法が設定される

useClipboard = true かつ POPUP モードのコマンドを実行すると、クリップボード読み取り用ウィンドウが正しい位置・サイズで開かれなくなります。

そもそもこの変更自体が不要と考えられます。フルスクリーンは openAndRun 側で chrome.windows.update を後から適用しており、openWindowAndReadClipboard 内では寸法を設定しても問題ありません。元の実装(常に寸法を設定)に戻すことを推奨します。


注意: openRecorder での WINDOW モードの挙動が変わっている

ファイル: packages/extension/src/services/pageAction/background.ts

変更前の openRecorder では、POPUP 以外(WINDOW, TAB, BACKGROUND_TAB)はすべて現在のウィンドウに新しいタブを開いていました。変更後は、WINDOW / FULLSCREEN は新しいウィンドウを作成するようになっています。

この変更自体は WINDOW モードとして意味的に正しいですが、意図的な挙動変更として PR の説明に記載されていません。既存ユーザーへの影響を確認し、意図的な変更であればその旨を明示することを推奨します。


注意: UIのグリッド列数の決定方法が脆弱

ファイル: packages/extension/src/components/option/field/OpenModeToggleField.tsx

const gridCols = modes.length === 4 ? 'grid-cols-4' : 'grid-cols-5'

この実装は現在の4列・5列にしか対応していません。将来モードが追加・削除された際に壊れる可能性があります。Tailwind の safelist を設定するか、現在のアプローチを維持する場合はコメントで意図を説明することを推奨します。


情報: ロケールファイルのファイル末尾改行が削除されている

de, es, fr, hi, id, it, ko, ms, pt_BR, pt_PT, ru, zh_CN の各 messages.json でファイル末尾の改行(newline)が削除されています。エディタやフォーマッタの設定の違いによるものと思われますが、git diff を汚染し、本来の変更が見づらくなります。元の改行を維持するか、全ファイルで統一することを推奨します。


情報: テストが追加されていない

新しいフルスクリーンモードに関するユニットテストが含まれていません。特に以下のケースのテストを追加することを推奨します:

  • openAndRun がフルスクリーンモードで chrome.windows.update({ state: 'fullscreen' }) を呼び出すことの検証
  • openRecorder がフルスクリーンモードで正しく動作することの検証

良い点

  • フルスクリーンの実装アプローチ(ウィンドウ作成後に chrome.windows.update で fullscreen 状態を適用)は Chrome Extension API として適切です
  • 14言語すべてにローカライズ文字列が追加されており、翻訳の内容も適切です
  • PAGE_ACTION_MODES への挿入順(POPUP → WINDOW → FULLSCREEN → TAB → BACKGROUND_TAB)は直感的です

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