Skip to content

fix: refine search result defaults and spacing - #900

Merged
ShellMonster merged 2 commits into
mainfrom
fix/search-user-toolbar-gap
Nov 23, 2026
Merged

ShellMonster merged 2 commits into
mainfrom
fix/search-user-toolbar-gap

Conversation

@ShellMonster

@ShellMonster ShellMonster commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

User description

Goal

Keep new searches on the Songs tab by default and add clear spacing below the user-search sort control.

Changes

  • reset the selected result type to Songs when the search keyword changes
  • give each keyword its own tab control identity so stale focus cannot restore Users
  • increase the gap between the sort control and the first user result row to 16px
  • add UI regression coverage for both behaviors

Validation

  • go test ./internal/ui -run 'Test(TheThreeTypesAndTheirSorts|ChangingSearchKeywordReturnsToSongs|SearchUserCardsKeepClearanceBelowTheToolbar|ClickingAUserCardGoesToTheirSpace|SearchCreator|FirstSearchTabVisitKeepsViewport)' -count=1
  • go build -trimpath -p 4 ./...
  • go vet -trimpath -p 4 ./...

CodeAnt-AI Description

Reset new searches to Songs and add space above user results

What Changed

  • Changing the search term now returns results to Songs, even if the previous search was on Users or Videos.
  • User results now have 16px of space between the sort control and the first card.

Impact

✅ Songs shown first for each new search
✅ User cards no longer crowd the sort control

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@codeant-ai

codeant-ai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #667c0 Reviewed your PR f43762f Nov 23, 2026 · 08:37 08:45

@codeant-ai

codeant-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Nov 23, 2026
@ShellMonster
ShellMonster merged commit 001e9bb into main Nov 23, 2026
6 of 7 checks passed
@ShellMonster
ShellMonster deleted the fix/search-user-toolbar-gap branch November 23, 2026 08:38
@codeant-ai

codeant-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown

CodeAnt  CodeAnt Nitpicks

2 code suggestions

1. If the query changes while the user sort menu is open, sortOpen stays true while this selects Songs, so the Songs sort menu opens on the new search.

Logic error · internal/ui/searchpage.go:124-128


2. With a creator lead, this spacer is before t.list.View, but that list's lead contains the toolbar, so no 16px gap separates it from user cards.

Logic error · internal/ui/searchpage.go:368-370

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant