fix(tui): 没入リンク検出が直後の全角約物・日本語を URL に含めないようにする#352
Merged
Conversation
## 目的 日本語の文章では URL の直後に空白なしで全角括弧などが続くことが多く (例: `…/350(補足)`)、没入ターミナルのリンク検出がその `(補足)` まで URL に取り込んでしまっていた。クリック/下線表示が誤った範囲になるのを直す。 ## 変更内容 - `terminal_link.rs` の `url_spans` で、スキーム位置から URL を取り出す範囲を 「空白までの塊」ではなく「URL に使える文字(ASCII 図形文字)が続く間」に限定。 全角約物 `(` や CJK 文字など非 ASCII に当たった時点で URL を終端する。 - 既存の半角約物トリム(`trim_trailing`)はそのまま後段で適用。 ## テスト・確認方法 - `cargo fmt` / `clippy --all-targets -- -D warnings` / `test` 全通過。 - 追加テスト: 全角 `(…)`/CJK が URL に密着したケースで URL が正しく終端すること (`url_at` と `link_cells` の両方)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📊 Test Coverage
🎉✨ パーフェクト!全ファイル Lines カバレッジ 100% を達成しました 🏆🐰 |
kkyosuke
added a commit
that referenced
this pull request
Jun 26, 2026
## 目的 `v1.2.1` 以降に `main` へマージされた変更をリリースするため、minor バージョンを上げる。 ## 変更内容 - `Cargo.toml` の `version` を `1.2.1` → `1.3.0` に更新 - `Cargo.lock` を追従更新 ## リリースされる主な変更(前回タグ以降) - fix(tui): close を強制削除から「dirty なら拒否」に変える (#355) - fix(tui): 全角名のサイドバーはみ出しと agent 名の往復破綻を直す (#354) - fix(tui): アタッチ中でも入力待ち通知を出す(完了通知は抑制を維持) (#353) - fix(tui): 没入リンク検出が直後の全角約物・日本語を URL に含めないようにする (#352) - perf(tui): 没入の描画で term.size() の重複 ioctl をなくす (#351) ## テスト・確認方法 - バージョン変更のみで挙動への影響はなし - マージ後、`auto-release.yml` が version 変更を検知し `v1.3.0` のリリースを自動起動する 🤖 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.
目的
日本語の文章では URL の直後に空白なしで全角括弧などが続くことが多く(例:
…/350(補足))、没入ターミナルのリンク検出(クリックで開く/下線表示)がその(補足)まで URL に取り込んでしまっていた。検出範囲が誤るのを直す。変更内容
terminal_link.rsのurl_spansで、スキーム位置から URL を取り出す範囲を「空白までの塊」ではなく 「URL に使える文字(ASCII 図形文字)が続く間」 に限定。全角約物(や CJK 文字など非 ASCII に当たった時点で URL を終端する。trim_trailing)はそのまま後段で適用(...com).→...comなどは従来どおり)。テスト・確認方法
cargo fmt/clippy --all-targets -- -D warnings/test全通過、カバレッジ 100%(pre-commit/pre-push フック通過)。https://example.com/350(補足)をクリック →https://example.com/350だけを返し、(セルはリンク扱いしない。https://example.com見て(CJK 密着)→https://example.comで終端。link_cellsの下線範囲も(手前で止まる。🤖 Generated with Claude Code