Skip to content

feat: implement user search in extension popup - #3

Closed
Sidilya-Gunes wants to merge 1 commit into
HappyHackingSpace:mainfrom
Sidilya-Gunes:sidilya
Closed

Sidilya-Gunes wants to merge 1 commit into
HappyHackingSpace:mainfrom
Sidilya-Gunes:sidilya

Conversation

@Sidilya-Gunes

@Sidilya-Gunes Sidilya-Gunes commented May 10, 2026

Copy link
Copy Markdown

#2
Ekran Resmi 2026-05-10 21 47 47

Summary by CodeRabbit

  • New Features
    • Added user search functionality to the extension, allowing users to search for GitHub users by query.
    • Search results display in a dropdown with user avatars and login names.
    • Integrated search with the existing username lookup feature for seamless user discovery.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: de16da7b-826f-4ebf-935f-0b9192048a9a

📥 Commits

Reviewing files that changed from the base of the PR and between 988b030 and 207761b.

📒 Files selected for processing (7)
  • packages/core/src/github/client.ts
  • packages/core/src/github/rest-queries.ts
  • packages/core/src/types.ts
  • packages/extension/entrypoints/background.ts
  • packages/extension/entrypoints/popup.html
  • packages/extension/entrypoints/popup/main.ts
  • packages/extension/utils/messaging.ts

Walkthrough

This PR adds user search functionality to the GitBaz extension. Users can type in the username field to see live search results from GitHub's user search API. Selecting a result auto-populates the field and performs an immediate lookup. The feature spans core library types, REST API integration, background message handling, and popup UI with debounced search and dropdown interaction.

Changes

User Search Feature

Layer / File(s) Summary
Types & Message Contracts
packages/core/src/types.ts, packages/extension/utils/messaging.ts
UserSearchResult interface added with login and avatarUrl. GitBazClient.searchUsers method signature added. SearchUsersRequest and SearchUsersResponse message types defined and added to ExtensionMessage and ExtensionResponse unions.
Core GitHub API Implementation
packages/core/src/github/rest-queries.ts, packages/core/src/github/client.ts
New REST API helper searchUsers queries GitHub's /search/users endpoint with per_page: 5 and maps results to { login, avatar_url }[]. GitBazClient client object exposes searchUsers method that maps REST result to { login, avatarUrl }[].
Background Message Handler
packages/extension/entrypoints/background.ts
New message branch handles SEARCH_USERS requests, invokes client.searchUsers(message.query), and responds with SEARCH_USERS_RESULT containing results or error message.
UI Markup & Styling
packages/extension/entrypoints/popup.html
CSS added for .search-results (hidden by default, scrollable dropdown) and .search-result-item (clickable user results with avatar styling). Username input includes autocomplete="off". Results container div added to DOM.
UI Event Handling & Search Logic
packages/extension/entrypoints/popup/main.ts
lookupUser accepts optional username parameter. New handleSearch function sends debounced SEARCH_USERS requests (min 2 chars, 300ms debounce). New displayResults renders results dropdown and handles result selection. Event wiring changed: input triggers debounced search; lookup button and Enter key trigger immediate lookup. Document click handler hides dropdown when clicking outside.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A search so swift, through users we glide,
Dropdown results dancing side by side,
Debounce and query, a rabbit's delight,
User lookups now blessed with GitHub's might! ✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Hi @Sidilya-Gunes, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/HappyHackingSpace/gitbaz/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this May 10, 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