GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: 検索結果の file header にファイルの総件数を出す by ymnao · Pull Request #622 · ymnao/scripta

Conversation

@ymnao

@ymnao ymnao commented Oct 10, 2026

Copy link
Copy Markdown
Owner

概要

全文検索の結果が 1 ファイルに集中すると、見出しは「1 ファイル中 15 件」なのに、file header の件数バッジは表示済みの行数(5)を出していました。バッジをそのファイルの総件数にそろえます(PR #621 で記録だけ残した表示の食い違い)。

関連 Issue

なし(HANDOFF の session 211「残した Tier3」の 1 件)

移行 Stage

  • Stage 0: 雛形 + フロント表示確認
  • Stage 1: ファイル I/O
  • Stage 2: ワークスペース・ファイルツリー・ファイル監視
  • Stage 3: 全文検索(ripgrep sidecar)
  • Stage 4: Git Sync
  • Stage 5: OGP / PDF / アップデート
  • Stage 6: 仕上げ・配布・切り替え

(移行後の不具合修正のため該当なし)

変更内容

  • sliceGroupedResults が返す VisibleGroup に、slice 前の match 数 totalMatches を持たせた。境界で部分 slice した group も元の件数を保つ
  • file header のバッジを group.matches.length から group.totalMatches に変えた。折り畳んだ group でも同じ値が出る
  • 全 group が毎回新しい object になるので、行単位 memo の理由コメントを書き直した。主な理由は「境界 group は必ず新しい object になる」ことのままで、totalMatches の付与は付随的な理由として添えた
  • test を 2 本足した。sliceGroupedResults の単体(部分 slice された group も元の件数を持つ)と、1 ファイルに STEP * 3 件集中したときに押下前後の header が総件数を出すこと

動作確認

  • unit / e2e / typecheck 3 種 / biome ci / build(下の検証エビデンス)
  • mutation 2/2 KILL: header を group.matches.length に戻す mutant、部分 slice 側の totalMatches を budget にする mutant
  • 実機での目視は未確認(header の DOM 表示は unit test で観測している)

スクリーンショット

なし

検証エビデンス

リスク分類

tier: medium — reasons なし(classify-risk.sh の既定)

実行した検証

種別 コマンド 結果
テスト vitest run(全体) PASS 3310 passed / 18 skipped(142 files passed / 1 skipped)
テスト pnpm test:e2e(user の Terminal tab で実行) PASS 187 passed
テスト 実 Electron e2e(pnpm test:e2e:electron) 未実施(ローカル sandbox では不可。CI で確認)
型 tsc --noEmit -p tsconfig.node.json / tsconfig.web.json / tsconfig.e2e.json PASS
Lint biome ci . PASS(410 files、No fixes applied)
Build electron-vite build PASS
Mutation header を matches.length に戻す / totalMatches: budget 2/2 KILL
レビュー /simplify(4 観点) 実害なし。適用 0 件
レビュー code-reviewer(fable)2 周 1 周目: Critical 0 / Warning 0 / Suggestion 4(コメントの正確さ 2 件は fix: efde4af)。2 周目: Critical 0 / Warning 0 / Suggestion 2
レビュー codex-review security PASS(findings 0)

レビュー指摘と対応

指摘 対応
code-reviewer: 行単位 memo の理由が「totalMatches 付与のため」に書き換わり、境界 group という元の理由が消えた fix(efde4af)
code-reviewer: test の STEP * 3 の理由から、何を区別するかが読めなくなった fix(efde4af)
codex security findings なし

追跡先

backlog delta: 起票 0 件 / 本 PR で close 0 件 / 現在 open 2 件

なし

Draft 判定

  • 判定: normal
  • 根拠: step 4 — fix 対象の残件なし、(b) / (c) なし

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
ymnao and others added 2 commits October 10, 2026 11:17
@ymnao @claude
fix: 検索結果の file header に表示済みの行数ではなくファイルの総件数を出す
103c67d
- 結果が 1 ファイルに集中すると、見出しは「1 ファイル中 15 件」なのに file header は表示済みの 5 を出していた
- sliceGroupedResults が部分 slice した group にも元の match 数を totalMatches として持たせ、header はそれを出す
- 全 group が新しい object になるため、行単位 memo の理由コメントと test のコメントを実態に合わせた

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymnao @claude
docs: 行単位 memo と test の総件数の理由コメントを正確にする
efde4af
- 行単位 memo の理由は境界 group が必ず新しい object になることが主で、totalMatches の付与は付随的なことを明記した
- STEP * 3 の理由を header test 側にも書き、押下後の assert で何が区別できなくなるかを添えた

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymnao
ymnao merged commit 504fce2 into main Oct 10, 2026
10 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ymnao
ymnao deleted the fix/search-file-count-partial-slice branch October 10, 2026 03:10
@ymnao ymnao mentioned this pull request Oct 12, 2026
chore: v0.8.0 リリース準備 #632
Merged
4 of 11 tasks
ymnao added a commit that referenced this pull request Oct 12, 2026
@ymnao @claude
chore: v0.8.0 リリース準備 (#632)
9d003d3
* chore: v0.8.0 リリース準備

- package.json の version を 0.7.0 → 0.8.0 に上げる
- CHANGELOG.md に v0.8.0 のエントリを追加する (#283 〜 #631、170 commit)
  - Electron 44 で macOS の最小要件が 13 (Ventura) に上がることを冒頭に明記する
    (同梱 Electron 44.5.1 の LSMinimumSystemVersion が 13.0)
  - リリース後、tap 側で Cask の depends_on macos を :ventura に上げてから
    autobump を手動実行する (docs/parity-checklist.md §11)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: v0.8.0 の CHANGELOG をコミットの実態に合わせて直す

- hard link (#601) は検索結果の stale 対策で、ワークスペース外アクセスの封鎖では
  ないので Security から Fixed へ移す
- 漏れていた #414 / #443 / #623 と CI actions の更新を足す
- #461 の 3 経路 (別タブのファイルへの書き込み・rename 前パスの復活・
  ウィンドウを閉じたときの保存漏れ) を分けて書く
- #444 を wikilink がすべて未解決になる症状として、#622 を Fixed として書き直す
- electron-builder の完全一致固定に出所 (#283) と理由を添える
- [0.8.0] / [0.7.0] の参照リンク定義を足し、README の Electron 版を v44 に直す

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: v0.8.0 の CHANGELOG の #623 / #443 の記述を実測条件と実際の UI に合わせる

- #623 の「1 秒以上」に実測条件 (キャッシュ 1 万件・イベント 1000 件) を添え、
  コミットに無い git checkout の例を外す
- #443 の「すべて表示した」は実在しない UI 文言なので、打ち切りの通知が
  出ないという実挙動で書く

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@ymnao
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.