Skip to content

Replace abandoned Task Runner with status-bar Tasks extension#134

Merged
toshi0806 merged 1 commit into
mainfrom
replace-task-runner-with-statusbar-tasks
Jun 26, 2026
Merged

Replace abandoned Task Runner with status-bar Tasks extension#134
toshi0806 merged 1 commit into
mainfrom
replace-task-runner-with-statusbar-tasks

Conversation

@toshi0806

Copy link
Copy Markdown
Member

背景・問題

VS Code 初回起動時に Task Runner 拡張(sanaajani.taskrunnercode)が入っていないユーザが多数いた。調査の結果:

  • この拡張は 2018 年から開発停止(v0.3.0)。
  • devcontainer.json にしか記載がなく .vscode/extensions.json の推奨にも無いため、初回コンテナ作成時の一発インストールを取りこぼすと回復経路が無く、欠けたままになる(言語拡張は推奨にあるため再勧奨で回復する)。

変更内容

現役メンテされている actboy168.tasks に置き換え、タスクをステータスバーからクリック実行できるようにする(キーボードショートカット不要):

  • devcontainer.json: 拡張 ID を sanaajani.taskrunnercodeactboy168.tasks に差し替え
  • .vscode/extensions.json: actboy168.tasks を推奨にも追加(初回取りこぼし時の回復経路を確保)
  • .vscode/tasks.json: 各タスクに options.statusbar(アイコン+日本語ラベル)を付与。内部用 SUBMIT (auto-fill) は非表示。タスク定義順を テスト → 提出 → 問題ページ → テスト(誤差) → 新規コンテスト に並べ替え
  • .vscode/settings.json(新規): tasks.statusbar.limit: 1 で先頭の テストだけをボタン表示し、残りは 1 つの ☑ AtCoder メニュー(クリックでクイックピック)に集約

UI イメージ

ステータスバー: 🧪 テスト ボタン + ☑ AtCoder メニュー
メニューを開くと 提出 / 問題ページ / テスト(誤差) / 新規コンテスト の順で表示。

品質確認

  • 変更 4 ファイルすべて JSONC としてパース可能を確認
  • devcontainer から旧拡張エントリ除去・新拡張追加、extensions.json 推奨への追加、settings の limit=1 を整合確認

補足

actboy168.tasks は Open VSX にも公開されているため、将来 VS Code フォークへ対応する場合も移植性が高い。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

全体的に、廃止された拡張を現役メンテ中の拡張に置き換え、ステータスバーUIを整備する変更として適切です。以下に気になる点を挙げます。

Comment thread .vscode/tasks.json Outdated
"label": "AtCoder: setup NEW contest",
"type": "shell",
"label": "AtCoder: SUBMIT (auto-fill)",
"type": "atcoder-submit-helper",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚨 [HIGH] AtCoder: SUBMIT (auto-fill) タスクの type"atcoder-submit-helper" になっています。

このタスクタイプを提供する拡張(atcoder-submit-helper 等)が devcontainer.jsonextensions.json に記載されていないため、対応拡張が未インストールの環境ではタスク実行時にエラーになります。hide: true で非表示にしているとはいえ、タスク一覧には表示されるため、依存拡張を devcontainer.jsonextensions に追加するか、コメントで依存関係を明記することを推奨します。

Comment thread .vscode/tasks.json
},
"group": {
"kind": "test",
"kind": "build",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [MEDIUM] AtCoder: OPEN Task Page タスクに "group": { "kind": "build", "isDefault": true } が設定されています。

isDefault: truebuild グループタスクは Ctrl+Shift+B(デフォルトのビルドタスク)に割り当てられます。「問題ページをブラウザで開く」という操作がデフォルトビルドタスクになるのは意図しない挙動を引き起こす可能性があります。

元の設計では AtCoder: TEST code"kind": "test", "isDefault": true になっており、テストがデフォルトテストタスク(Ctrl+Shift+P → Run Test Task)として機能します。OPEN Task Pagegroup は削除するか、isDefault: false にすることを検討してください。

Comment thread .vscode/tasks.json
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"showReuseMessage": true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ [LOW] AtCoder: setup NEW contest タスクで "showReuseMessage": true に変更されています。

am newam open-first&& で連結した長めのコマンドを実行した後、「Terminal will be reused by tasks, press any key to close it.」というメッセージが表示されます。clear: true と組み合わせると出力が消えてしまうため、ユーザーが結果を確認できない場合があります。clear: false にするか、showReuseMessage: false のままにする方が一貫性があります。

@toshi0806 toshi0806 force-pushed the replace-task-runner-with-statusbar-tasks branch from 77322c1 to e274fdb Compare June 25, 2026 23:57

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

全体的に変更の意図が明確で、廃止された拡張機能を現役メンテされているものに置き換える合理的な対応です。以下に気になる点を挙げます。

Comment thread .vscode/tasks.json
}
"kind": "build",
"isDefault": true
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [MEDIUM] 「AtCoder: OPEN Task Page」タスクに "group": { "kind": "build", "isDefault": true } が設定されています。これは「問題ページをブラウザで開く」という性質のタスクに build グループのデフォルトを割り当てることになり、Ctrl+Shift+B でビルドタスクを実行しようとすると意図せずブラウザが開く可能性があります。このタスクには group を設定しないか、"isDefault": false にすることを検討してください。

Comment thread .vscode/tasks.json
"kind": "test",
"isDefault": true
}
"problemMatcher": []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ [LOW] 「AtCoder: SUBMIT code」タスクから "problemMatcher": [] が削除されています(他のタスクには残っています)。統一性のためにも "problemMatcher": [] を追加しておくことを推奨します。

@toshi0806 toshi0806 force-pushed the replace-task-runner-with-statusbar-tasks branch from e274fdb to 2a0a6d0 Compare June 25, 2026 23:59
@toshi0806

Copy link
Copy Markdown
Member Author

レビューコメントに対応しました(2a0a6d0)。

[HIGH] atcoder-submit-helper タスクの依存拡張未記載 → 対応(タスク除去)

ご指摘ありがとうございます。調査したところ、この AtCoder: SUBMIT (auto-fill) タスクは main には存在せず.vscode/tasks.json に付いていた skip-worktree 配下のローカル限定の実験タスクでした。本 PR で skip-worktree を解除した際に意図せず混入したものです。提供元拡張もリポジトリ内に記載がなく(grep でも tasks.json 以外ヒットなし)、本 PR の趣旨(Task Runner 置き換え)とも無関係なため、当該タスクを本 PR から除去しました。これでタイプ未解決の依存も解消されます。

[MEDIUM] OPEN Task Pagebuild / isDefault: true → 意図的設計のため変更なし

これは main 由来の既存設定で、本 PR では変更していません。CLAUDE.md に「AtCoder: OPEN Task Page - 問題ページを開く(Cmd+Shift+B または Ctrl+Shift+B)」と明記されている通り、デフォルトビルドタスク=問題ページを開く、は意図した割り当てです。テストは別途 test グループの既定タスクになっています。したがって現状維持とします。

[LOW] setup NEW contestshowReuseMessage: true → 既存・未変更のため変更なし

こちらも main 由来で、本 PR では変更していません(レビューの「変更されています」は誤認と思われます)。挙動の変更は本 PR の範囲外のため現状維持とします。気になる場合は別 Issue/PR で扱うのが妥当と考えます。


結果として tasks.json のタスクは 5 個(テスト / 提出 / 問題ページ / テスト(誤差) / 新規コンテスト)になりました。4 ファイルとも JSONC パース確認済みです。ご確認をお願いします。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

全体的に、廃止された拡張機能を現役メンテされているものに置き換え、ステータスバーUIを整備する意図は明確で、変更内容も一貫しています。以下に気になる点を挙げます。

Comment thread .vscode/tasks.json
}
"kind": "build",
"isDefault": true
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [MEDIUM] 「AtCoder: OPEN Task Page」タスクに "group": { "kind": "build", "isDefault": true } が設定されています。このタスクはブラウザでページを開くだけの操作であり、build グループのデフォルトとして登録するのは意味的に不自然です。Ctrl+Shift+B(デフォルトビルドタスク実行)を押すとブラウザが開いてしまうため、混乱を招く可能性があります。group 設定を削除するか、"isDefault": false にすることを検討してください。

Comment thread .vscode/tasks.json
"kind": "test",
"isDefault": true
}
"problemMatcher": []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ [LOW] 「AtCoder: SUBMIT code」タスクから problemMatcher が削除されています(旧コードには "problemMatcher": [] がありましたが、新コードでは位置が変わり存在しています)。差分を確認すると新コードの49行目に "problemMatcher": [] は残っていますが、念のため確認してください。一方、"group" 設定が SUBMIT タスクから完全に削除されており、これ自体は問題ありませんが意図的な変更であることを明記しておくと良いでしょう。

Comment thread .vscode/settings.json
// ステータスバーのタスク(actboy168.tasks)の表示制御
// limit: ボタンとして直接表示する個数(tasks.json 定義順の先頭から)。
// 1 = 先頭の「テスト」だけボタン表示、残りは下のメニューに集約。
"tasks.statusbar.limit": 1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ [LOW] tasks.statusbar.limit および tasks.statusbar.select.labelactboy168.tasks 拡張固有の設定です。この settings.json はリポジトリ全体に適用されるワークスペース設定であるため、当該拡張がインストールされていない環境では単に無視されますが、設定ファイルのコメントに「actboy168.tasks が必要」である旨を明記しておくと、将来の保守担当者が混乱しにくくなります。現状のコメントでも概ね伝わりますが、拡張がない場合の挙動(無効化される)についても一言添えると親切です。

The Task Runner extension (sanaajani.taskrunnercode) has been unmaintained
since 2018 and was listed only in devcontainer.json with no recommendation
fallback, so a missed first-run install left it absent for many users with
no recovery path.

Switch to actboy168.tasks (actively maintained), which surfaces tasks as
clickable status-bar items so contests can be run from the UI instead of
keyboard shortcuts:

- devcontainer.json: swap the extension id
- .vscode/extensions.json: also recommend it, so a missed container install
  is recovered via the 'install recommended extensions' prompt
- .vscode/tasks.json: add options.statusbar labels/icons and order tasks so
  TEST comes first
- .vscode/settings.json: tasks.statusbar.limit=1 so only TEST shows as a
  button and the rest collapse into a single 'AtCoder' menu (提出 / 問題ページ
  / テスト(誤差) / 新規コンテスト)

All four files validated as JSONC.
@toshi0806 toshi0806 force-pushed the replace-task-runner-with-statusbar-tasks branch from 2a0a6d0 to 42d0e1d Compare June 26, 2026 00:04
@toshi0806

Copy link
Copy Markdown
Member Author

追加レビュー(再実行ぶんの重複含む)に対応しました(42d0e1d)。

[MEDIUM ×3] OPEN Task Pagebuild / isDefault: true

意図的設計のため変更しませんが、意図をコードコメントで明記しました。CLAUDE.md に「AtCoder: OPEN Task Page - 問題ページを開く(Cmd+Shift+B / Ctrl+Shift+B)」と記載の通り、既定ビルドタスク=問題ページを開く、はこのリポジトリの確立された運用です。混乱防止のため tasks.json に以下のコメントを追加:

// 既定ビルドタスク(Ctrl+Shift+B / Cmd+Shift+B)で問題ページを開く、という
// 意図的な割り当て(CLAUDE.md に記載の運用)。変更しないこと。

[LOW] SUBMIT codeproblemMatcher 欠落

誤検知です。 現コードの SUBMIT code タスクには "problemMatcher": [] が存在します(検証済み)。後発のレビューコメント自身も「49行目に残っている」と訂正しています。group は元々 SUBMIT には設定されておらず(main 由来)、変更していません。

[LOW] settings.json の拡張依存明記

コメントを補強し、actboy168.tasks 固有の設定であること・未インストール環境では無視される(エラーにならない)ことを明記しました。


JSONC パースは全ファイル確認済みです。ご確認をお願いします。

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

全体的に、廃止された拡張を現役メンテ版に置き換え、ステータスバーUIを整備する意図が明確で、変更内容も一貫しています。以下に気になる点を挙げます。

Comment thread .vscode/tasks.json
"kind": "test",
"isDefault": true
}
"problemMatcher": []

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ [MEDIUM] AtCoder: SUBMIT code タスクに "problemMatcher": [] が設定されていません(旧コードにはありましたが、新コードでは削除されています)。他のタスクにはすべて problemMatcher が明示されているため、意図的な省略か確認が必要です。problemMatcher が未設定の場合、VS Code はデフォルトの問題マッチャーを使用しようとする場合があり、不要な警告が出る可能性があります。

Comment thread .vscode/tasks.json
"clear": true
},
// 既定ビルドタスク(Ctrl+Shift+B / Cmd+Shift+B)で問題ページを開く、という
// 意図的な割り当て(CLAUDE.md に記載の運用)。変更しないこと。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ [LOW] コメントに「既定ビルドタスク(Ctrl+Shift+B / Cmd+Shift+B)で問題ページを開く」と記載されていますが、AtCoder: TEST code にも "group": { "kind": "test", "isDefault": true } が設定されており、AtCoder: OPEN Task Page には "kind": "build", "isDefault": true が設定されています。

VS Code の仕様上、Ctrl+Shift+B はデフォルトビルドタスク(kind: build, isDefault: true)を実行するため、現状の設定は意図通りです。ただし、コメントに「変更しないこと」と強調されているにもかかわらず、テストタスクが isDefault: true のまま残っている点は混乱を招く可能性があります。kind: testisDefaultCtrl+Shift+T(Run Test Task)に対応するため、機能的には問題ありませんが、コメントと合わせて「ビルドのデフォルトは問題ページ、テストのデフォルトはテストコード」と明記しておくと誤解を防げます。

Comment thread .vscode/settings.json
@@ -0,0 +1,10 @@
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ℹ️ [LOW] このファイルはワークスペース全体の .vscode/settings.json として新規追加されています。tasks.statusbar.limittasks.statusbar.select.labelactboy168.tasks 拡張固有の設定であり、コメントにも「未インストール環境では無視される」と記載されています。

ただし、将来的にプロジェクトメンバーが他の VS Code 設定(例: エディタのフォーマット設定など)をこのファイルに追加する際、このファイルの存在に気づかず別途 settings.json を作成しようとする可能性があります。ファイルの冒頭に「このファイルはワークスペース設定ファイルです。拡張固有の設定以外もここに追記してください」といった案内コメントを追加しておくと親切です。

@toshi0806

Copy link
Copy Markdown
Member Author

追加レビュー(42d0e1d)への回答 — これ以上の修正は不要と判断します

[MEDIUM] SUBMIT code の problemMatcher が無い → 誤検知です(現存します)

現コードの該当タスクには "problemMatcher": [] が存在します:

{
    "label": "AtCoder: SUBMIT code",
    "type": "shell",
    "options": { "cwd": "${fileDirname}", "statusbar": { ... } },
    "command": "am s ${fileBasename}",
    "presentation": { ... },
    "problemMatcher": []   // ← 49 行目に存在
},

タスクを「テスト先頭」に並べ替えた差分を、レビューが「旧位置から削除」と誤読しています(同一レビュー内の別コメントでも「49行目に残っている」と訂正されています)。並べ替えは仕様(ご要望)のため、この誤検知は差分が変わらない限り再発します。実コードは正しいため修正不要です。

[LOW] OPEN のコメントに「テスト既定」も併記 / settings.json に案内コメント — いずれも任意の追記提案で、機能・正しさには影響しません。コメントの過剰化を避けるため現状維持とします(Ctrl+Shift+T がテスト既定、なのは VS Code 標準挙動)。


収束について

  • HIGH(auto-fill 依存)は解消済み、MEDIUM(OPEN の build/isDefault)は CLAUDE.md 記載の意図的設計でコメント明記済み。
  • 残るのは 確定的な誤検知(problemMatcher)任意の doc nit のみで、コードは正しく CI も全 commit で success です。

以上をもってレビュー対応は収束とします。実害のある指摘が残っていればご指摘ください。

@toshi0806 toshi0806 merged commit 6868196 into main Jun 26, 2026
1 check passed
@toshi0806 toshi0806 deleted the replace-task-runner-with-statusbar-tasks branch June 26, 2026 00:10
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.

1 participant