Skip to content

feat: コマンド名の最小文字数を2文字にし、空白を正規化する - #502

Merged
ujiro99 merged 4 commits into
dev-1.4.0from
feat/title-min-length-and-normalize
Oct 21, 2026
Merged

ujiro99 merged 4 commits into
dev-1.4.0from
feat/title-min-length-and-normalize

Conversation

@ujiro99

@ujiro99 ujiro99 commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Refs ujiro99/selection-command-hub#297
Hub側PR: ujiro99/selection-command-hub#298

概要

  • コマンド名(タイトル)の最小文字数を3文字から2文字に変更
  • 最大文字数をHubと同じ100文字に設定(従来は上限なし)
  • タイトルの空白を正規化してから文字数をチェックし、正規化後の値で保存
  • 未使用の cmd2uuid を削除

変更内容

  • タイトル用の共通スキーマを作成し、全コマンド種別(7箇所)で使用
  • 正規化ルール(Hubと同一)
    • 前後の空白を除去
    • 連続する空白(全角スペース・タブ・改行を含む)を半角スペース1つに統一
  • 文字数チェック:正規化後の値で2文字以上100文字以下
  • 正規化はスキーマで行うため、保存・共有ボタンで受け取る値が正規化済みになり、ローカル保存値とHub送信値が一致
  • cmd2uuid(拡張機能版・shared版)とそのテストを削除
    • generateUUIDFromObject は旧Hub(packages/hub)が使用しているため残す
  • 古い計画メモ docs/misty-hugging-llama.md を削除

リリース順

  • Hub側PR(ujiro99/selection-command-hub#298)のデプロイ後にリリースすること
  • 先にリリースすると、2文字タイトルの投稿・編集がHubで拒否される

既存データ

  • 移行処理なし。次回の編集・保存時に正規化される

テスト

  • スキーマのテスト SC-19〜26 を追加(正規化、2文字・1文字、100文字・101文字、正規化後の文字数チェック、既定タイトル)
  • 拡張機能のテストで10ファイル・2件が失敗するが、mainでも同一の失敗(@radix-ui/react-separator 未解決などのローカル環境要因)で本変更とは無関係

🤖 Generated with Claude Code

https://claude.ai/code/session_01MuHp872cRxjzMMEpMfPxeG

ujiro99 and others added 4 commits October 20, 2026 08:36
cmd2uuid derived a command ID from its content including the title, but
it is no longer called from the extension or the Hub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuHp872cRxjzMMEpMfPxeG
- Lower the minimum command title length from 3 to 2.
- Trim the title and collapse whitespace runs (including full-width
  spaces, tabs and newlines) into one ASCII space before validation,
  and save the normalized title. Matches the Hub's normalization.

Refs ujiro99/selection-command-hub#297

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuHp872cRxjzMMEpMfPxeG
Match the Hub's limit so a title accepted by the extension is not
rejected when shared.

Refs ujiro99/selection-command-hub#297

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuHp872cRxjzMMEpMfPxeG
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MuHp872cRxjzMMEpMfPxeG
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 55.13%. Comparing base (5412f99) to head (d4ed2bd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #502      +/-   ##
==========================================
- Coverage   55.15%   55.13%   -0.03%     
==========================================
  Files         294      293       -1     
  Lines       29904    29878      -26     
  Branches     3044     3043       -1     
==========================================
- Hits        16494    16472      -22     
+ Misses      13410    13406       -4     

☔ View full report in Codecov by Harness.
📢 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 changed the base branch from main to dev-1.4.0 October 21, 2026 01:11
@ujiro99
ujiro99 merged commit d5f0d20 into dev-1.4.0 Oct 21, 2026
5 of 6 checks passed
@ujiro99
ujiro99 deleted the feat/title-min-length-and-normalize branch October 21, 2026 03:31
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