Skip to content

Chat document picker: file names are not searchable and filtering leaves orphaned separator lines #1256

Closed

Description

@paullizer

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.

  1. 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 extracted title, its file_name becomes completely unsearchable. A user who only remembers a fragment of the file name (for example 200 inside Quarterly_Report_200_final.pdf) gets no results.
  2. 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

  1. Open the chat page and expand the grounded-search panel.
  2. Ensure a personal/group/public document exists whose extracted title differs from its file_name (for example title Fiscal Overview, file name Quarterly_Report_200_final.pdf).
  3. Open the Document dropdown and type 200 (or any fragment of the file name) into "Search documents...".

Separator artifacts

  1. Open the Document dropdown with documents in more than one workspace section (Personal + Group + Public).
  2. Type a term that only matches documents in the last section.
  3. 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() builds searchLabel from the display name plus the section label only, so file_name never 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-visible data-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 200 vs Quarterly_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 200 matches Quarterly_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.

Activity

  1. added a commit that references this issue on Aug 18, 2026
    ab9fb8d
  2. paullizer commented on Aug 19, 2026

    @paullizer
    CollaboratorAuthor

    Shipped in v0.250.210 via #1260.

    Release note entries:

    • v0.250.210: Chat Document Search Now Matches File Names
    • v0.250.210: Leftover Separator Lines in Filtered Dropdowns
    • v0.250.210: File Name Shown in Document Picker Rows

    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 Development while the repository default branch is main, so GitHub never applied the Fixes # keyword automatically.

  3. moved this from Pending Evaluation to Released in Simple Chat Roadmapon Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions