Skip to content

feat(notes): find a note by its words, on the Notes page and in Jump to - #397

Merged
adeelahmad merged 3 commits into
mainfrom
claude/project-thread-wm7xc9
Oct 15, 2026
Merged

adeelahmad merged 3 commits into
mainfrom
claude/project-thread-wm7xc9

Conversation

@adeelahmad

Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: a note could not be found. Jump to (⌘K) said "No matches" for a note's title, and the Notes page was one flat list with no search or filter: notes inside other notes lost where they sat, and archived notes mixed with the rest.

After: the Notes page has a search box that finds notes by the words in their title, summary or text (the pages of recordings and entities too), with the words around each match shown and marked; Enter opens the first. A filter shows only Projects, Areas, Resources or Archive, with how many each has. Each note says which notes it is inside ("In Home lab › Pi 5 shopping list"); on a phone the place and date go under the title so the title keeps its width. Jump to finds notes beside recordings, pages and settings.

How: GET /api/v1/notes/search?q=&ns=&place=&free= reuses notebook.find (the assistant's and MCP's find_notes), which now also returns the note each page is inside and the words around the match in its text (snippet); find_notes passes both on to agents. useDebounced moved to lib/hooks/debounce.ts.

Motivation and Context

First of the gaps in the notes UI audit (Adeel: "notes ui is very bad and is missing tons of things"). The audit, with before screenshots, is in the project files at notes-ui/audit.md; the next PRs cover the note page (breadcrumbs, notes inside, layout), delete with undo, and the tree in the sidebar.

Steps to reproduce (if appropriate):

Notes → type a word that is only in a note's text → the note shows with the words around it; Enter opens it. Pick Archive → only archived notes. ⌘K → type a note's title → Notes group.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md.

Done questions (AGENTS.md)

  • Goal: notes can be found by name and text from the Notes page and Jump to; merged on green CI.
  • Agents: GET /api/v1/notes/search; MCP and assistant find_notes now give snippet and inside.
  • Zero setup: nothing to install or configure.
  • Fewest clicks: typing finds; Enter opens the first; the filter is one click.
  • Configurable: n/a, no new settings.
  • Light: no new dependency; the search reads the plain text already stored per note.
  • Private and secure: same namespace check as listing notes (members only, 404 elsewhere); no new surface for the threat model.
  • Cost: no model calls.
  • User decides: nothing acts on its own; defaults unchanged (All still lists every note).
  • Upgrades: nothing stored changes.
  • Honest: docs describe what is built.
  • Tests (backend search and snippet, MCP snippet, web search/filter/path/⌘K), docs and generated files (make openapi) updated. Local: backend 1085 passed, web 870 passed.
  • Open standards: n/a; no new dependencies.
  • Refine later: search matches the phrase as typed; word-by-word and ranking by more than title-first can come with the full-text index.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb


Generated by Claude Code

The Notes page gets a search box (title, summary and text, the pages of things too,
with the words around each match marked; Enter opens the first), a Projects / Areas /
Resources / Archive filter with counts, and the notes each note sits inside. Jump to
(Ctrl+K) finds notes as well. GET /api/v1/notes/search serves both, and find_notes
gives agents the words around each match and the note it's inside.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb
@adeelahmad adeelahmad self-assigned this Oct 15, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb
The journey failed now and then (on main too) with a 20 s timeout: an entity
is in the graph once something links it twice, which takes import-file's
episode as well, and a slow runner can still be reading it. The same wait as
in #396, not counted.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RrY2byt5BHVeBXJUyfwWpb

Copy link
Copy Markdown
Owner Author

Clicks and keystrokes per feature failed on graph-merge (computer only: locator.waitFor: Timeout 20000ms exceeded). It isn't this PR's: the journey touches only the graph, and it failed the same way on main (run 38712328330, #388). The cause is a race: an entity shows in the graph once a second import links it, and a slow runner can still be reading that import. I ported the fix from #396 (the journey waits, uncounted, for the imports' jobs to finish) in 7577603, along with a merge of main.


Generated by Claude Code

@adeelahmad
adeelahmad merged commit 5435665 into main Oct 15, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-wm7xc9 branch October 15, 2026 11:54
adeelahmad pushed a commit that referenced this pull request Oct 15, 2026
Ported from #397: the journey fails now and then on main too with a 20 s
timeout while a slow runner is still reading import-file's episode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q
adeelahmad added a commit that referenced this pull request Oct 15, 2026
* feat(sources): Gmail and Google Workspace as an email sensor

A new "gmail" source reads a Gmail or Google Workspace mailbox, by the
Gmail API (read only) or by IMAP with XOAUTH2. It signs in as a person
with the Google client from Settings › Sign-in (OAuth, refresh token
sealed on the source), or as a Workspace service account with
domain-wide delegation. Watches follow Gmail's history ids, so a first
scan of a big mailbox reads nothing and later scans read only new mail.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q

* fix(sources): bring Google sign-in back to Sources

Sources live at /sources; /sensors/{id} is a different thing with its own
ids, so a Gmail source signed in there landed on the wrong page.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q

* test(clicks): graph-merge waits for the imports' jobs to finish

Ported from #397: the journey fails now and then on main too with a 20 s
timeout while a slow runner is still reading import-file's episode.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q

* refactor(sources): Gmail signs in through the shared Google flow, not its own

Calendar's Connect with Google (#407) brings the browser consent for Google
sources; Gmail joins it in the next pull request. This one keeps the source:
a connected account's token, or a Workspace service account, read through
the Gmail API or over IMAP. The wording says to connect the Google account
again, as Calendar's does.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q

---------

Co-authored-by: Adeel Ahmad <noreply@anthropic.com>
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