Skip to content

feat(askgh): allow users to select additional search scopes in repo Ask GitHub view#1436

Draft
msukkari wants to merge 2 commits into
mainfrom
cursor/askgh-search-scopes-0404
Draft

feat(askgh): allow users to select additional search scopes in repo Ask GitHub view#1436
msukkari wants to merge 2 commits into
mainfrom
cursor/askgh-search-scopes-0404

Conversation

@msukkari

Copy link
Copy Markdown
Contributor

Fixes SOU-1496

Summary

This PR allows users to select additional search scopes (repositories and search contexts) in the Ask GitHub view (/askgh/[owner]/[repo]). Previously, the search scope was hardcoded to only the current repository, and users could not modify it.

Changes

  • page.tsx: Added calls to getRepos() and getSearchContexts() to fetch available repositories and search contexts, passing them to the LandingPage component.

  • landingPage.tsx:

    • Added repos and searchContexts props to the LandingPageProps interface
    • Implemented local storage persistence for selected search scopes using a dedicated key (askGhSelectedSearchScopes)
    • Added logic to ensure the current repo is always included when visiting the page
    • Wired up the onSelectedSearchScopesChange handler to allow users to modify scopes
    • Passed repos and search contexts to ChatBox and ChatBoxToolbar components

Behavior

  • When visiting an Ask GitHub repo page, the current repository is pre-selected by default
  • Users can click on the search scope selector to add or remove repositories and search contexts
  • Selected scopes are persisted in local storage for subsequent visits
  • If the user visits a different repo's Ask GH page, that repo is automatically added to the selected scopes

Linear Issue: SOU-1496

Open in Web Open in Cursor 

- Added repos and searchContexts props to LandingPage component
- Implemented local storage for persisting selected search scopes
- Current repo is pre-selected by default when visiting Ask GH page
- Users can now add/remove search scopes using the SearchScopeSelector

Fixes SOU-1496

Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c69a020b-df2b-4e30-bc95-7feb7314fad4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/askgh-search-scopes-0404

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.

Co-authored-by: Michael Sukkarieh <msukkari@users.noreply.github.com>
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.

2 participants