Skip to content

feat(ui): refine thread hover feedback - #502

Merged
lucas77778 merged 1 commit into
masterfrom
chenyu/code-650
Sep 3, 2026
Merged

feat(ui): refine thread hover feedback#502
lucas77778 merged 1 commit into
masterfrom
chenyu/code-650

Conversation

@lucas77778

Copy link
Copy Markdown
Member

Summary

  • make thread hover background, row actions, and the detail preview respond immediately
  • scroll overflowing titles while hovered and reset them immediately on exit
  • hide row actions while the pointer is over the preview card without destabilizing the IM menu

Verification

  • pnpm check:ci
  • pnpm test — 3040 passed, 1 skipped
  • browser mock interaction verified at 1280×800

CODE-650

Copilot AI lite review requested due to automatic review settings September 1, 2026 07:37
@linear-code

linear-code Bot commented Sep 1, 2026

Copy link
Copy Markdown

CODE-650

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown

Greptile Summary

The PR makes thread-row hover feedback immediate, keeps actions stable around the IM menu, and adds scrolling for overflowing titles.

  • Adds thread-specific hover padding and action visibility classes.
  • Removes preview and row-hover transition delays.
  • Measures title overflow and animates long titles on hover.
  • Controls IM-menu state to preserve action visibility and spacing.

Confidence Score: 4/5

The PR appears safe to merge, with a non-blocking visual regression where overflowing titles are clipped without an ellipsis before hover.

The interaction and menu-state changes have no established blocking failure, but the nested inline-block title prevents the outer text-overflow utility from producing the previous ellipsis.

Files Needing Attention: packages/presentation/ui/src/shell/sidebar/thread-row.tsx

Important Files Changed

Filename Overview
packages/presentation/ui/src/shell/sidebar/row-actions.tsx Adds thread-specific spacing and action-visibility classes without an identified functional defect.
packages/presentation/ui/src/shell/sidebar/thread-row.tsx Implements immediate preview feedback, controlled menu visibility, and hover title scrolling, but the new nested title structure no longer renders the resting ellipsis correctly.

Reviews (1): Last reviewed commit: "feat(ui): refine thread hover feedback" | Re-trigger Greptile

Comment thread packages/presentation/ui/src/shell/sidebar/thread-row.tsx
@lucas77778
lucas77778 requested a review from xiaoland September 1, 2026 07:45

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Wrapping the title in an inline-block span removes the truncation ellipsis from every overflowing thread title at rest. Verified in Chrome against this repo's real compiled Tailwind CSS — titles now hard-clip mid-glyph instead of showing .

Reviewed changes — the full diff at 09e127e (2 files, 1 commit), plus the coss-ui SidebarMenuButton/PreviewCard primitives, group-header.tsx as the other consumer of the shared row-action classes, and the [data-thread-title] E2E selectors in apps/webview/e2e/browser-smoke.e2e.mts.

  • Forked row-action classesrow-actions.tsx gains THREAD_ROW_* twins that drop the group-has-data-popup-open/menu-item:* variants and transition-opacity; the original ROW_* constants stay for the group header.
  • Instant row feedback — the row's hover fill changes from bg-transparent to bg-sidebar-accent with transition-none, and the preview card gets delay={0}/closeDelay={0} plus classes that neutralize its enter/exit scale-and-fade.
  • Controlled IM menu — the ellipsis DropdownMenu becomes controlled through new imMenuOpen state, which substitutes for the dropped data-popup-open CSS hook on both the row's trailing padding and the three action buttons' opacity.
  • Marquee title — the plain truncating <span> is replaced by OverflowingThreadTitle, which measures overflow via useSyncExternalStore + ResizeObserver and scrolls an inner inline-block span with translate-x while hovered.

ℹ️ The sidebar's two row surfaces now behave differently, and the diff doesn't say whether that's permanent

group-header.tsx sits directly above these rows in the same sidebar and composes the same PreviewCard + SidebarMenuButton + RowActionsCluster primitives, but it keeps the old treatment: hover:bg-transparent (no hover fill), the default 600ms preview-card delay with its scale-and-fade, transition-opacity on its actions, and data-popup-open pinning them visible. After this PR a user scrolling the sidebar crosses two adjacent row types that respond on different timings. Only you can say whether the header is meant to follow or the fork is deliberate.

Technical details
# Sidebar row-feedback fork: group header vs. thread row

## Affected sites
- `packages/presentation/ui/src/shell/sidebar/row-actions.tsx:7-17``ROW_HOVER_PE_CLASS`,
  `ROW_HOVER_PE_WIDE_CLASS`, `ROW_ACTION_CLASS`: old behavior, still consumed by the group header.
- `packages/presentation/ui/src/shell/sidebar/row-actions.tsx:19-26``THREAD_ROW_*`: new behavior,
  consumed only by the thread row.
- `packages/presentation/ui/src/shell/sidebar/group-header.tsx:178``hover:bg-transparent`, and
  `:224`/`:237``ROW_ACTION_CLASS` with its `transition-opacity` and `data-popup-open` pinning.
- `packages/presentation/ui/src/shell/sidebar/group-header.tsx:173``PreviewCardTrigger` with no
  `delay`/`closeDelay`, so 600ms/300ms defaults.

## Required outcome
- A recorded decision on whether the group header adopts the new timings or the two surfaces stay
  divergent. If divergent is intended, the `THREAD_ROW_*` constants should say so (see the inline
  comment on `row-actions.tsx:19`), so the next person doesn't "unify" them back.

## Open questions for the human
- Is CODE-650 scoped to thread rows only, with the group header tracked separately?
- If the header is meant to follow, does that land here or in a follow-up?

ℹ️ Nitpicks

  • ROW_HOVER_PE_WIDE_CLASS (row-actions.tsx:11) has no referent left — thread-row.tsx was its only consumer and now uses THREAD_ROW_HOVER_PE_WIDE_CLASS. group-header.tsx imports only ROW_HOVER_PE_CLASS and ROW_ACTION_CLASS.
  • imMenuOpen && 'pe-21 sm:pe-19' (thread-row.tsx:88) hard-codes the same two values THREAD_ROW_HOVER_PE_WIDE_CLASS encodes one line above, so the pair can drift apart silently. Deriving both from one source would keep them honest.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Claude Opus𝕏

Comment thread packages/presentation/ui/src/shell/sidebar/thread-row.tsx
Comment thread packages/presentation/ui/src/shell/sidebar/thread-row.tsx
Comment thread packages/presentation/ui/src/shell/sidebar/thread-row.tsx
Comment thread packages/presentation/ui/src/shell/sidebar/row-actions.tsx

@xiaoland xiaoland left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Verification

Image Image Image

@lucas77778
lucas77778 merged commit 135a556 into master Sep 3, 2026
13 checks passed
@lucas77778
lucas77778 deleted the chenyu/code-650 branch September 3, 2026 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants