8000 feat(search): a Similar tab, and similar content when selecting text anywhere by adeelahmad · Pull Request #307 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(search): a Similar tab, and similar content when selecting text anywhere - #307

Merged
adeelahmad merged 5 commits into
mainfrom
claude/project-thread-5mx3gh
Oct 14, 2026
Merged

adeelahmad merged 5 commits into
mainfrom
claude/project-thread-5mx3gh

Conversation

@adeelahmad
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: the web app had no way to see what else is like a resource, a passage, a topic or an entity.

After: every resource has a Similar tab (after Entities) listing the resources most like it, each citing why: the closest passages (opening at that line or page), the shared key words, topics and entities. Selecting text anywhere in the app (a transcript, a page, a title, a summary, a graph label) opens a popover with the five most similar resources and Find more, which opens the full list at /similar with paging and a search for the key words. Topic and entity drawers, and a resource, topic or entity selected on the graph canvas, list similar content too. The account menu's Similar on select switches the popover between showing at once and showing a small Similar button first.

How: components/similar/ holds the query hooks over GET /similar (#296), the result list, the full page, the selection popover (mounted once in the app shell; it ignores fields, editors, dialogs and menus, waits for the selection to settle and the pointer to lift, and closes on Esc, scroll or a click outside) and the per-browser preference. Results come from the API that already works without search by meaning.

Motivation and Context

Adeel asked for similar content as a dedicated tab, and in a popover with "find more" when selecting any text or title, for concepts and topics too, the graph canvas included. #296 was the API; this is the web app.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (eslint, prettier, tsc clean).
  • I added or updated tests (__tests__/similar.test.tsx).
  • My change requires documentation updates, and I have updated docs/ accordingly (processing.md#similar-content, CHANGELOG, DEVLOG refine-later list).

Done questions (AGENTS.md)

  • Goal: the tab, the selection popover with Find more, topics, entities and graph nodes. Merged on green CI.
  • Agents: the same results through GET /similar, assistant and MCP find_similar (feat(search): find content similar to a text, a resource, a topic or an entity #296).
  • Zero setup: no new prerequisite or setting needed.
  • Fewest clicks: selecting text is the only action; the popover needs no click unless the person switches it to the button.
  • Configurable: "Similar on select" (show or button) in the account menu, default show; per browser.
  • Light: no new dependency; words, topics and entities answer without embeddings.
  • Private and secure: read-only, through the same namespace and collection checks as search; no new surface.
  • Cost: no LLM call; a selected text costs at most one embedding request when search by meaning is on (ledgered, cached), results cached for a minute.
  • User decides: read-only; existing defaults unchanged.
  • Upgrades: n/a, no stored-data change.
  • Honest: every result cites the passages, words, topics and entities behind it.
  • Tests, docs updated; no generated file changes.
  • Open: no new dependencies.
  • Reported in the project thread; refine-later items in DEVLOG (editors excluded from the popover).

🤖 Generated with Claude Code

https://claude.ai/code/session_01NSG4xbWi1TYHFmWSUh1CSt


Generated by Claude Code

…rything like it

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSG4xbWi1TYHFmWSUh1CSt
…tities and graph nodes

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSG4xbWi1TYHFmWSUh1CSt
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NSG4xbWi1TYHFmWSUh1CSt
@adeelahmad adeelahmad self-assigned this Oct 10, 2026
…-5mx3gh

# Conflicts:
#	CHANGELOG.md
#	nextjs-frontend/components/app-shell/account-menu.tsx
@adeelahmad
adeelahmad merged commit 412ed94 into main Oct 14, 2026
11 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-5mx3gh branch October 14, 2026 10:13
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

0