Repository navigation
Suggest File Search for storage searches and measure its wizard - #1433
Merged
Merged
Conversation
Catalog searches for a storage system or for documents ("synology", "nas",
"Dateiserver", "pdf") now also bring the File Search entries that read it,
next to the system's API connector, from a small intent map in
catalog-search.ts (backend and frontend copies identical). Cloud drives
(SharePoint, OneDrive, Google Drive, Dropbox) get no suggestion, and the
network folder only appears where the deployment offers it (self-hosted).
- Store and /welcome show a short File Search hint with the wizard link
(en/de/it).
- setup_find_connectors returns the wizard link for File Search results and
a fileSearch note; setup_install_connector answers a File Search entry with
the wizard link instead of an error.
- New product events for the wizard funnel: file_search_wizard_opened,
file_search_test_passed / _failed, file_search_scan_finished,
file_search_activated, file_search_locked_shown, with protocol, preset,
adapterSlug and a file count bucket only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
People who search the catalog for their NAS or file server ("synology", "nextcloud", "nas", "Dateiserver", "pdf") mostly found the system's own API connector (Synology DSM, Nextcloud) and never learned that the AI can search inside the files stored there. This PR proposes File Search next to the API connector for those searches. It also adds product events to the File Search wizard, so we can see where setups stop: opened, connection test, scan, activation, plan wall.
Changes
Catalog search (
catalog-search.ts; the backend and frontend copies are still byte-identical): a small intent map,FILE_SEARCH_INTENTS. It maps storage and document words (synology, qnap, nextcloud, owncloud, fritzbox, storage box, s3/minio, sftp, ftp, webdav, nas, file server/Dateiserver/Netzlaufwerk/smb, documents/Dokumente/pdf/files) to the File Search entries that read them. Those entries go first, or right after a result named exactly like the query: "synology" givessynology, thensynology-file-search, and "nextcloud" givesnextcloud,nextcloud-file-search,webdav. The result gets a new field,fileSearch. Hits gainsuggested, and the new match kindsuggestedcovers entries the words did not match by themselves. Queries for SharePoint, OneDrive, Google Drive, Dropbox or iCloud get no suggestion. Only entries the caller passed in are suggested.Store and /welcome: a short hint under the search box ("Want your AI to search inside the documents? …") with a button that opens the wizard for the first suggestion. Copy is in en, de and it. Welcome result cards for File Search entries now link straight to the wizard.
Chat (
connector-setup.service.ts):setup_find_connectorsmarks File Search results withfileSearch: trueand asetupUrlto the wizard, and adds a top-levelfileSearchnote so the model offers it. Before this, it listed them like any connector and told the model to callsetup_install_connector, which then failed.setup_install_connectoron a File Search entry now returns the wizard link and installs nothing.Setup path helper (
adapters/file-search-setup.ts): builds the wizard path with protocol, preset,adapterandfrom.importAdapter'sfile_search_wizarderror now carries the preset too. The frontendfileSearchSetupPathbuilds the same path.Product events (
product-event.service.ts, each one documented in the allow-list):file_search_wizard_opened:via= store, welcome, store_hint, welcome_hint, connectors_new or chatfile_search_test_passedandfile_search_test_failed:kind= the test's error kind, orrequest_failed. A first test that only asks to confirm the server fingerprint counts as neither.file_search_scan_finished:kind= fits, over_plan, done or failed;files= a count bucketfile_search_activated:files= a count bucketfile_search_locked_shown:kind= no_licence, expired, community, plan_without_feature or connector_limitEvery event carries
protocol,presetandadapterSlugwhen they are known. New metadata keysprotocol,presetandfilesonly accept known values (the protocols, the presets, theFILE_COUNT_BUCKETS). A host, path, file name or exact count is dropped.Docs:
docs/connectors/file-search.mddescribes the search suggestions and the events.llms.txtandllms-full.txtare regenerated.Cloud and self-hosted
AdaptersService.listAll()already leavesselfHostOnlyadapters out whenDEPLOYMENT_MODE=cloud(isInstallableHere), and both the dashboard's/api/adapterslist and the chat search only pass in what this deployment offers. On the Cloud, "Netzlaufwerk" suggestssftpandwebdav. Tests cover both modes.product_eventstable, on the Cloud and self-hosted alike, like the existingsetup_*events.Type
Testing
New tests:
catalog-search.spec.ts: the ranking for each storage query, the self-hosted vs Cloud network folder, no suggestion for cloud drives or other apps, the cap, thesuggestedkind, words written apart or together, intent slugs that must exist as FILE_SEARCH adapters.connector-setup.service.spec.ts: Synology suggestion with the wizard URL, network folder on self-hosted only (DEPLOYMENT_MODE=cloudcase), nothing for cloud drives, install answered with the wizard link and nothing imported.product-event.spec.ts: the whole funnel stored with allowed metadata, unknown protocol, preset or exact count dropped,match: 'suggested'kept.Commands (Node 22, run in the worktree, after
npx prisma generateinpackages/backend):packages/backendnpm run linteslint --fixchanged nothing.packages/backendnpx tsc --noEmit -p tsconfig.jsonpackages/backendnpx jest src/adapters/catalog-search.spec.ts src/adapters/connector-setup.service.spec.ts src/audit/product-event.spec.ts --maxWorkers=4packages/backendnpm test -- --maxWorkers=4packages/frontendnpm run lintset-state-in-effectin the wizard and inconnectors/new, unusedDownloadIconin the store.packages/frontendnpx tsc --noEmit -p tsconfig.jsonnode scripts/generate-llms-txt.mjsthen--checkpackages/frontendmessages/{en,de,it}.json(node script)Not run: Playwright (
npm run test:e2e), and no manual browser check of the hint. No adapter JSON changed, so adapter validation and the catalog regeneration were not needed.The German and Italian strings were written without a native-speaker review: German uses Sie, Italian tu, and they follow the existing
fileSearchwording ("Dateisuche", "Ricerca file").Checklist
npm test)Notes
ee/file-search/sync/sync-runner.ts, and nothing outsideee/sees the result without touching that code. It could be a server-side event there later, if a change underee/is approved.ee/is touched.ee/support/support-catalog.tscallssearchCatalog; the new result field is additive.Related Issues
None. This is a small feature within the existing File Search and catalog search (no schema, auth or API break), so no issue was opened first.