Skip to content

Conversation

@mascarpon3
Copy link

@mascarpon3 mascarpon3 commented Jan 27, 2026

Purpose

integrate Find to Docs

Proposal

  • add a useSeachDocs hook in charged of calling the search endpoint.
  • update the environment variables.
  • handle the path params to handle the sub-docs filtering.
  • remove pagination logic. Find does not support pagination anymore.

This does not include new tests.

External contributions

Thank you for your contribution! 🎉

Please ensure the following items are checked before submitting your pull request:

  • I have read and followed the contributing guidelines
  • I have read and agreed to the Code of Conduct
  • I have signed off my commits with git commit --signoff (DCO compliance)
  • I have signed my commits with my SSH or GPG key (git commit -S)
  • My commit messages follow the required format: <gitmoji>(type) title description
  • I have added a changelog entry under ## [Unreleased] section (if noticeable change)
  • I have added corresponding tests for new features or bug fixes (if applicable)

frontend is now calling the search endpoint
I am adding the path params to the search endpoint.
This allows searching in subdocs.
I did a mistake in the env variables file
pagination is no longer supported by Find
handle filtering on sub-docs
I am fixing a bug about dupplicated documents
I update the changelog
I am removing dead code
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Integrates Find-powered document search into the Docs UI/API, removing the previous infinite-scroll pagination approach and adding optional path-based scoping for “current doc” searches.

Changes:

  • Frontend doc search now calls a dedicated documents/search/ endpoint via a new useSearchDocs hook and removes infinite pagination.
  • Backend search endpoint proxies to the configured Find indexer, adds optional path filtering, and returns a simplified {count, results} response.
  • Development environment variables are updated to enable the indexer and store OIDC tokens in session.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/frontend/apps/impress/src/features/docs/doc-search/components/DocSearchSubPageContent.tsx Switches “current doc” search to Find-backed useSearchDocs with path scoping.
src/frontend/apps/impress/src/features/docs/doc-search/components/DocSearchModal.tsx Removes legacy filter props from search content components (target selection remains).
src/frontend/apps/impress/src/features/docs/doc-search/components/DocSearchContent.tsx Replaces infinite query + InView pagination with useSearchDocs.
src/frontend/apps/impress/src/features/docs/doc-management/api/useDocs.tsx Removes title query param support from the list-docs hook params builder.
src/frontend/apps/impress/src/features/docs/doc-management/api/searchDocs.tsx Adds new React Query hook + request param construction for Find search endpoint.
src/backend/core/services/search_indexers.py Extends indexer search call to accept a path filter and forwards it to Find.
src/backend/core/api/viewsets.py Refactors search logic, removes pagination for Find-backed results, and adds path plumbing.
src/backend/core/api/serializers.py Updates search query serializer to drop pagination params and add optional path.
env.d/development/common Enables token storage and enables the indexer in dev env.
docs/search.md Minor wording correction in search configuration docs.
CHANGELOG.md Adds an “integrate Find search” entry under Unreleased.
Comments suppressed due to low confidence (1)

src/backend/core/api/serializers.py:985

  • path is not trimmed, so a value like ' ' will pass validation even though it’s effectively blank. To match q behavior and avoid confusing/ineffective filters, set trim_whitespace=True for path (and keep allow_blank=False).
    q = serializers.CharField(required=True, allow_blank=False, trim_whitespace=True)
    path = serializers.CharField(required=False, allow_blank=False)


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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