Skip to content

feat(courses): implement api-direct server-side search#46

Open
Gowreesh-A-M wants to merge 4 commits intofeat/course-card-total-contentsfrom
feature/api-direct-course-search
Open

feat(courses): implement api-direct server-side search#46
Gowreesh-A-M wants to merge 4 commits intofeat/course-card-total-contentsfrom
feature/api-direct-course-search

Conversation

@Gowreesh-A-M
Copy link
Copy Markdown
Collaborator

  • Transition from local filtering to direct server-side search for comprehensive results
  • Separate search results from the main list to keep the experience clean
  • Add protection against accidental duplicate requests when scrolling or typing fast
  • Optimize the study screen search to properly handle search clearing and new queries

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the course search experience by moving the search logic to the server-side. This change addresses limitations of local filtering, which could only search already-fetched courses, and ensures that users can find any course available on the backend. The implementation involves a clear separation of concerns within the data and state management layers, allowing the application to seamlessly switch between browsing a locally-persisted course list and displaying dynamic, API-driven search results without compromising the integrity of the local database.

Highlights

  • Server-Side Course Search Implemented: The course search functionality has been transitioned from local filtering to direct server-side API calls, ensuring comprehensive results across the entire course catalog, regardless of local cache status.
  • Ephemeral Search Results: Search results are no longer persisted to the local database. They are fetched directly from the API and held in memory, preventing pollution of the main paginated course listing and maintaining data integrity.
  • Dynamic Provider Mode Switching: The CourseList provider now intelligently switches its data source. When no search query is active, it streams courses from the local database. When a query is present, it provides the ephemeral, API-fetched search results.
  • Search Input Debouncing: A 500ms debounce mechanism has been added to the search input on the Study screen to prevent excessive API calls and improve performance during rapid typing or scrolling.
  • Repository Method Differentiation: The CourseRepository now explicitly separates methods for fetching and persisting courses for regular browsing (fetchAndPersistCourses) from methods for performing API-direct, non-persistent searches (searchCourses).

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully implements a server-side search for courses, replacing the previous local filtering mechanism. The changes are well-structured, introducing a dedicated CourseSearch provider to manage search state and cleanly separating it from the main CourseList provider which now handles both browsing (from a database stream) and search results (from an in-memory list). The API and repository layers are correctly updated to support non-persistent search queries. My main feedback is on the UI implementation, where the debouncing logic for the search input unintentionally affects the responsiveness of client-side filtering for lessons. I've suggested a change to address this for a better user experience.

@Gowreesh-A-M Gowreesh-A-M force-pushed the feat/course-card-total-contents branch from 622bb7e to 8a45116 Compare March 26, 2026 13:47
@Gowreesh-A-M Gowreesh-A-M force-pushed the feature/api-direct-course-search branch from 2c24df0 to a6b2077 Compare March 26, 2026 14:03
@Gowreesh-A-M Gowreesh-A-M force-pushed the feat/course-card-total-contents branch from 8a45116 to 25817d6 Compare April 1, 2026 07:44
@Gowreesh-A-M Gowreesh-A-M force-pushed the feature/api-direct-course-search branch from a6b2077 to 740003d Compare April 1, 2026 07:44
@Gowreesh-A-M Gowreesh-A-M force-pushed the feat/course-card-total-contents branch from 25817d6 to fce3a42 Compare April 1, 2026 10:19
* Transition from local filtering to direct server-side search for comprehensive results
* Separate search results from the main list to keep the experience clean
* Add protection against accidental duplicate requests when scrolling or typing fast
* Optimize the study screen search to properly handle search clearing and new queries
@Gowreesh-A-M Gowreesh-A-M force-pushed the feature/api-direct-course-search branch from 740003d to 798e969 Compare April 1, 2026 10:21
…ation support and remove client-side filtering
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