Skip to content

Redesign list item display and highlight collaborators#59

Merged
snrsw merged 3 commits into
mainfrom
three-line-item-layout
Mar 26, 2026
Merged

Redesign list item display and highlight collaborators#59
snrsw merged 3 commits into
mainfrom
three-line-item-layout

Conversation

@snrsw

@snrsw snrsw commented Mar 26, 2026

Copy link
Copy Markdown
Owner

✨ Redesign list item display and highlight collaborators

The old layout crammed repo name, title, and status marks onto one or two lines, making it hard to scan. This PR splits each item into three distinct lines, fixes a broken selection highlight caused by inner ANSI resets, and makes other users' @handles pop with GitHub accent blue so you can instantly see who else touched a PR or issue.

Changes

  • 3-line item layout (internal/ui/delegate.go, ui.go): each list entry now shows <repo> / <number> <title> <status> / <activity> — repo context is always visible without competing with the title
  • Selection highlight fix (internal/ui/delegate.go): pre-rendered ANSI codes in the PR number were escaping the outer lipgloss style; fixed by stripping inner codes before re-applying selected style, with status marks attached as a raw suffix so their own colours survive
  • Number prepended to title (internal/pr/ui.go, internal/issue/ui.go): #N moved from the description to the front of the title line
  • @ prefix on usernames (internal/pr/ui.go, internal/issue/ui.go): activity line now reads opened on … by @alice, approved by @bob
  • @mention highlighting (internal/ui/display.go, styles.go): added RenderUser(login, currentLogin) — other users render in GitHub blue, the current user's own name stays plain; threaded currentLogin from cmd/ through the grouped structs to every toItem() call

Test plan

  • go test ./... — all tests pass
  • go build — builds cleanly
  • TestRender_ThreeLines — delegate outputs exactly 3 lines
  • TestRender_SelectedTitleUsesStrippedContent — selection re-applies style over stripped ANSI
  • TestRenderUser_OtherUser_IsStyled — other user's handle gets accent colour
  • TestRenderUser_CurrentUser_IsPlain — own handle stays unstyled

🤖 Generated with Claude Code

snrsw and others added 3 commits March 26, 2026 17:22
Split each list item into repo / title+status / activity lines so that
repo context is always visible without competing for space with the
title.  Selection highlight was broken because pre-rendered ANSI in the
PR number escaped the outer lipgloss style; fix by stripping inner codes
before re-applying the selected style and attaching status marks as a
raw suffix that preserves their own colours.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a PR or issue was opened or reviewed by someone other than the
current user, their @handle now renders in GitHub accent blue so they
stand out at a glance.  The authenticated user's own name stays plain to
reduce visual noise.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
funcorder linter requires constructors to precede struct methods.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@snrsw snrsw changed the title ✨(ui): 3-line item layout, selection highlight fix, and @mention highlighting Redesign list item display and highlight collaborators Mar 26, 2026
@snrsw snrsw merged commit 8f0cab9 into main Mar 26, 2026
2 checks passed
@snrsw snrsw deleted the three-line-item-layout branch March 26, 2026 08:30
@github-actions github-actions Bot mentioned this pull request Mar 26, 2026
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.

1 participant