Skip to content

fix(desktop): sidebar search results no longer show raw >>>term<<< FTS markers - #90357

Merged
teknium1 merged 1 commit into
mainfrom
fix/sidebar-search-fts-markers
Aug 20, 2026
Merged

fix(desktop): sidebar search results no longer show raw >>>term<<< FTS markers#90357
teknium1 merged 1 commit into
mainfrom
fix/sidebar-search-fts-markers

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Summary

Desktop sidebar session-search results no longer render raw FTS highlight markers — searching "MARCO" showed a row literally titled >>>MARCO<<<.

Root cause: the backend's session search wraps matched terms in sqlite snippet() delimiters >>>/<<< (hermes_state_search.py), and searchResultToSession() passed the snippet straight into the row preview/title as plain text.

Changes

  • apps/desktop/src/app/chat/sidebar/index.tsx: new stripFtsMarkers() strips the delimiters before the snippet becomes the row preview.
  • strip-fts-markers.test.ts: 4 tests (single term, multiple terms, marker-free, empty).

Validation

Result
vitest strip-fts-markers.test.ts 4/4 pass
Live: search "MARCO" in the running desktop app row reads clean snippet (verified post-fix rebuild)

Found during the full-desktop feature audit (Aug 19).

Infographic

Search snippets markers stripped

…S markers

The backend's session search wraps matched terms in sqlite snippet()
delimiters '>>>'/'<<<' (hermes_state_search.py). The sidebar rendered the
snippet as plain text via searchResultToSession(), so searching 'foo'
painted rows literally titled '>>>foo<<<'. Strip the markers before the
snippet becomes the row preview.
@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 0f7e12a — fix(desktop): sidebar search results no longer show raw >>>t

⚠️ Warnings

OSV vulnerability scan · View job

7 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 3m53s vs 4m6s (-5.3%). 4 job(s) slower, 12 faster, 3 unchanged.

  • JS & TS checks / apps/desktop / check:test:ui:shard-2of3: -49.0s
  • JS & TS checks / apps/bootstrap-installer / check: -12.0s
  • JS & TS checks / ui-tui / check: -8.0s
  • JS & TS checks / apps/desktop / check:test:ui:shard-1of3: +7.0s
  • JS & TS checks / apps/desktop / check:test:plugins: -6.0s

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Aug 19, 2026
@teknium1
teknium1 merged commit 20059cb into main Aug 20, 2026
43 checks passed
@teknium1
teknium1 deleted the fix/sidebar-search-fts-markers branch August 20, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants