feat(history): improve User/Assistant visual hierarchy in HistoryPane (#725)#726
Merged
Conversation
…) [案A] Reduce COLLAPSED_MAX_CHARS from 300 to 100 and COLLAPSED_MAX_LINES from 5 to 2 in ConversationPairCard. This strengthens the default-collapse behavior so long assistant responses do not visually dominate the History pane and reinforces the User > Assistant visual hierarchy. Refs #725 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…725) [案B] Weaken the visual weight of assistant messages so the User-side card is the primary focus of the History pane: - AssistantMessagesSection wrapper: bg-gray-800/50 -> bg-gray-900/30, border-l-4 border-gray-600 -> border-gray-700, p-3 -> p-2, space-y-3 -> space-y-2. Less padding and a darker, more recessive background. - AssistantMessageItem body: text-sm text-gray-200 -> text-xs text-gray-300. Smaller font + slightly lower contrast. - UserMessageSection body: add [word-break:break-word] max-w-full overflow-x-hidden so the defensive wrap set matches the assistant side (prevents long URLs / mixed JP+ASCII from horizontal overflow). Update integration test selectors to .text-xs.text-gray-300 (lines 70, 111) for the assistant content container; user-side selector (line 185) is intentionally unchanged. Refs #725 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…nce (#725) [案C] Add a "User only" filter toggle to the HistoryPane header so reviewers can scan their own prompts without assistant noise. Behavior: - HistoryPane header gains a lucide-react User / UserCheck icon button with aria-pressed reflecting toggle state. Hidden when no onHistoryUserOnlyChange handler is supplied (backward compatible). - When ON: AssistantMessagesSection is not rendered, orphan (assistant-only) pairs are skipped, and searchableMessages is restricted to user role so search highlights never point to hidden assistant content. - State lives in WorktreeDetailRefactored and is persisted to localStorage under 'commandmate:historyUserOnly' ('true' / 'false', matching the existing showArchived convention; legacy values fall back to false). - ConversationPairCard gains a showAssistant?: boolean prop (default true) so the User-only behavior is fully driven by props. - Mobile (MobileContent) propagates historyUserOnly / onHistoryUserOnlyChange to HistoryPane. Adds 7 integration tests covering: toggle hides Assistant section, default OFF still shows Assistant, orphan pairs skipped, aria-pressed mirrors state, onHistoryUserOnlyChange called with negated value, search results suppressed for Assistant when ON, toggle not rendered without handler. Refs #725 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- CLAUDE.md: 5 module references annotated with Issue #725 changes (ConversationPairCard, HistoryPane, WorktreeDetailRefactored, WorktreeDetailSubComponents, history-display-config) - CHANGELOG.md: [Unreleased] Added (User only toggle) and Changed (collapse strengthening + assistant style weakening + user defense) Co-Authored-By: Claude Opus 4.7 <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.
Summary
Issue #725 対応。HistoryPane の User/Assistant メッセージ表示優先度を再構成し、頻繁に参照する User メッセージ(You)が Assistant メッセージに埋もれて見つけにくい問題を改善する。
3案の組み合わせで実装:
text-xs/p-2/bg-gray-900/30)+ User側コンテナ強化実装内容
コミット構成(案ごとに分割)
46c5f510c6a8163991cba68608778d94(reports)主要変更ファイル
src/components/worktree/ConversationPairCard.tsx— 案A定数変更、案Bスタイル変更、案CshowAssistantprop追加src/components/worktree/HistoryPane.tsx— User only トグルUI、historyUserOnly状態、localStorage連携、メッセージフィルタsrc/config/history-display-config.ts—HISTORY_USER_ONLY_STORAGE_KEY追加src/components/worktree/__tests__/ConversationPairCard.test.tsx— 案A/B アサーション更新src/components/worktree/__tests__/HistoryPane.integration.test.tsx— 案C トグル動作テスト追加CLAUDE.md/CHANGELOG.md— モジュールリファレンスと変更履歴受入条件(自動チェック済)
案A
ConversationPairCard.test.tsx) が通る案B
text-xs)p-2)bg-gray-900/30)案C
commandmate:historyUserOnly)role="switch"/aria-checked/aria-label/ キーボード操作横断
npm run lint/npx tsc --noEmit/npm run test:unit/npm run build全PASS品質チェック
npm run lintnpx tsc --noEmitnpm run test:unitnpm run build実行フロー
/orchestrate 725→/pm-auto-issue2dev 725:--full未指定)破壊的変更
なし。視覚的変更のみ。既存の expand 操作・検索機能・配色仕様は維持。
関連
dev-reports/issue/725/pm-auto-dev/iteration-1/progress-report.mddev-reports/issue/725/work-plan.mddev-reports/issue/725/issue-review/summary-report.mdTest plan
🤖 Generated with Claude Code