Files
amethyst/todos/002-pending-p2-search-history-item-click-populates-input.md
nrobi144 7ff4d8e3b7 fix(desktop): avatar ripple + P3 hardcoded colors + inline shapes
Avatar/Account switcher:
- Rewrite SidebarAccountHeader with same shape/hover as other nav items
- Entire row (avatar + display name) is clickable with rounded clip
- Inline DropdownMenu replaces overlaid AccountSwitcherDropdown
- Collapsed: compact avatar with same rounded hover treatment

P3 #004 — Hardcoded status colors:
- Add StatusGreen/StatusRed/StatusAmber to commons Colors.kt
- Replace 32 inline Color() values across 10 files with theme tokens
- Color.Red → MaterialTheme.colorScheme.error where appropriate
- Color.Green/Gray → StatusGreen/onSurfaceVariant

P3 #005 — Inline shapes:
- RoundedCornerShape(8.dp) → MaterialTheme.shapes.small (~20 files)
- RoundedCornerShape(12.dp) → MaterialTheme.shapes.medium
- RoundedCornerShape(16.dp) → MaterialTheme.shapes.large
- Pill shapes (100dp/999dp) kept as-is

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-29 07:02:52 +03:00

1.3 KiB

status, priority, issue_id, tags
status priority issue_id tags
pending p2 002
code-review
ui
desktop
search

Tapping search history should populate input and search

Problem Statement

Clicking a recent search item in the expanded search history currently just calls onOpenFullSearch() (opens full Search column). It should instead populate the search input with that query text and immediately start searching.

Findings

  • FeedScreen.kt SearchHistorySection: all history rows call onOpenFullSearch() on click
  • Should instead: set searchText to the history item's text, which triggers updateFromText() and relay subscriptions

Proposed Solutions

Option A: Pass onHistoryItemClick: (String) -> Unit to SearchHistorySection

  • Callback sets searchText = TextFieldValue(text) in parent
  • LaunchedEffect(searchText.text) triggers updateFromText() automatically
  • Pros: clean separation. Cons: needs callback threading.

Option B: Pass searchText MutableState directly

  • SearchHistorySection writes to the state directly
  • Pros: simple. Cons: tight coupling.

Acceptance Criteria

  • Clicking a recent search item populates the search input with that text
  • Search results start loading immediately after populating
  • The search bar stays expanded (doesn't collapse)