refactor(mcp): issue/memory の filter Args を flatten で一本化する#329
Merged
Conversation
MCP の list / search が同じ filter フィールド集合を別々の Args 構造体で
二重定義し、`filter(self)` と `filter(&self)`(clone 込み)の非対称も
抱えていた。search を `#[serde(flatten)]` で filter Args を取り込む形に
変え、filter フィールドとその IssueFilter / MemoryFilter への変換を
1 箇所に統一する。
- issue: ListArgs を FilterArgs に改名し、SearchArgs は
`{ query, #[serde(flatten)] filter: FilterArgs }` に。
- memory: SearchArgs を `{ query, #[serde(flatten)] filter: FilterArgs }` に。
- search ハンドラは destructure して借用/ムーブの非対称を解消。
なお #46 / #60 が指摘していた他の重複(parse_args / to_pretty の 3 コピー、
issue/memory の JSON 出力整形の二系統、stdio serve ループの重複)は、
レビュー修正の過程で既に解消済み(parse_args / to_pretty は
presentation/mcp/mod.rs に集約、JSON 出力は usecase の IssueView /
ListedIssueView を CLI/MCP 双方が消費、serve は McpService + 共通
serve ヘルパに統合)。本 PR はその残件を仕上げる。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
📊 Test Coverage
🎉✨ パーフェクト!全ファイル Lines カバレッジ 100% を達成しました 🏆🐰 |
Merged
kkyosuke
added a commit
that referenced
this pull request
Jun 25, 2026
## 目的 `1.2.0` → `1.2.1` のリリース。`Cargo.toml` の version を上げ、マージ時に `auto-release.yml` がタグ `v1.2.1` とリリースを自動生成する。 ## 変更内容 - `Cargo.toml` / `Cargo.lock` の version を `1.2.0` → `1.2.1` に更新。 ### このリリースに含まれる変更(v1.2.0 以降) - fix: コードレビュー指摘の修正(堅牢性・前方互換・セキュリティ) (#333) - feat(tui): 在席で agent を指定して起動できるようにする (#334) - refactor(session): 表示ラベル解決を presentation へ寄せ、new の Mode キーを統合する (#332) - refactor(infra,usecase): version envelope と設定セッターのボイラープレートを削減する (#330) - refactor(mcp): issue/memory の filter Args を flatten で一本化する (#329) - refactor(agent): program 名を AgentCli::command に一本化する (#328) - feat(tui): コマンド引数(サブコマンド・オプション)も Tab 補完する (#331) - refactor(tui): widgets から rabbit アセットを分離する (#323) - fix: コードレビュー指摘の修正(並行性・前方互換・堅牢性) (#327) - feat(error-log): 静かに握りつぶされる本物の失敗をログに記録 (#325) - fix: アップデート告知と更新後メッセージの文言を変更 (#324) ## テスト・確認方法 - version のみの変更。`release-build-check.yml` が 4 プラットフォームのリリースビルドを検証する。 - マージ後、`auto-release.yml` → `release.yml` でタグ `v1.2.1` と GitHub Release が自動生成される。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
目的
issue #46 / #60 の残件を解消する。
変更内容
MCP の
list/searchが同じ filter フィールド集合を別々の Args 構造体で二重定義し、filter(self)とfilter(&self)(clone 込み)の非対称も抱えていた。searchを#[serde(flatten)]で filter Args を取り込む形に変え、filter フィールドとIssueFilter/MemoryFilterへの変換を 1 箇所に統一する。ListArgsをFilterArgsに改名し、SearchArgsは{ query, #[serde(flatten)] filter: FilterArgs }。SearchArgsを{ query, #[serde(flatten)] filter: FilterArgs }。searchハンドラは destructure して借用/ムーブの非対称を解消。テスト・確認方法
cargo fmt/cargo clippy --all-targets -- -D warnings/cargo test全て通過。Closes #46
Closes #60
🤖 Generated with Claude Code