Repository navigation
Chat document picker: file names are not searchable and filtering leaves orphaned separator lines #1256
Description
Issue
Two problems in the chat page grounded-search filter strip (#search-documents-container) affect anyone trying to find a document to ground a chat on.
- File names cannot be searched. The document picker only matches on the document's display name, which is
title || file_name. As soon as a document has an extractedtitle, itsfile_namebecomes completely unsearchable. A user who only remembers a fragment of the file name (for example200insideQuarterly_Report_200_final.pdf) gets no results. - Filtering leaves leftover separator artifacts. When a search filters out the leading workspace sections, the section separator lines that belonged to those sections stay behind — usually two stacked horizontal rules directly under the "Select All" / "Clear All" row. This affects the Document, Scope, and Tags dropdowns.
Steps to Reproduce
File name search
- Open the chat page and expand the grounded-search panel.
- Ensure a personal/group/public document exists whose extracted
titlediffers from itsfile_name(for example titleFiscal Overview, file nameQuarterly_Report_200_final.pdf). - Open the Document dropdown and type
200(or any fragment of the file name) into "Search documents...".
Separator artifacts
- Open the Document dropdown with documents in more than one workspace section (Personal + Group + Public).
- Type a term that only matches documents in the last section.
- Repeat in the Tags dropdown with a term that only matches a Classification entry.
Expected Behavior
- Typing any substring of the file name or the title surfaces the document, regardless of position in the string.
- Filtered results render cleanly, with separator lines only where they still separate two visible sections.
Actual Behavior
- Searching a file-name fragment returns "No matching documents" whenever the document has a title.
- Orphaned separator lines survive filtering, commonly two adjacent horizontal rules:
DOC: filter "beta" TAGS: filter "confidential"
- Select All - Clear All
------------------ ------------------
------------------ ------------------ <- leftover artifacts
# [Public] Beta # Classifications
- Beta Handbook - Confidential
Impact
Users cannot reliably locate documents to ground a chat when they only know part of the file name, which pushes them toward selecting the wrong document or giving up on grounded search. The stray separator lines make filtered results look broken.
Notes
Suspected area
application/single_app/static/js/chat/chat-documents.js—buildDocumentDescriptor()buildssearchLabelfrom the display name plus the section label only, sofile_namenever reaches the matcher.application/single_app/static/js/chat/chat-searchable-select.js—updateDropdownStructure()decides divider visibility by scanning for the nearest visible sibling, but it skips other dividers and treats the always-visibledata-search-role="action"row as valid content, so every orphaned divider survives.- Matching is a single raw
searchText.includes(searchTerm), so multi-word queries and separator-heavy file names do not match natural typing (report 200vsQuarterly_Report_200_final.pdf).
Related existing behavior
The backend already does title-or-filename matching for the workspace document list (route_backend_documents.py uses CONTAINS(LOWER(c.file_name ...)) OR CONTAINS(LOWER(c.title ...))), so this is about aligning the chat client-side filter with existing API behavior. /api/documents, /api/group_documents, and /api/public_workspace_documents all SELECT *, so file_name is already present in the payloads the chat page loads — no backend change is required.
Acceptance Criteria
- The chat document picker matches on both title and file name, anywhere in the string.
- Multi-word queries match when every typed word appears, and
_,-,.are treated as word breaks (report 200matchesQuarterly_Report_200_final.pdf). - The file name is shown as muted secondary text in the document row when it differs from the title.
- Filtered dropdowns render no leading, trailing, or adjacent separator lines in the Document, Scope, and Tags dropdowns.
- The Compare modal document picker inherits the same behavior.
- Functional test and Playwright UI regression test cover file-name matching and divider cleanup.
- Fix documentation and release notes updated, version incremented in
config.py.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsReleased
Activity
Match chat document search on file names and clear divider artifacts
paullizer commentedon Aug 19, 2026
Shipped in v0.250.210 via #1260.
Release note entries:
Full notes: https://microsoft.github.io/simplechat/explanation/release_notes/
Closing as completed. This issue stayed open after the fix merged because pull requests target
Developmentwhile the repository default branch ismain, so GitHub never applied theFixes #keyword automatically.