Bugs
Under Review

In-page search (Ctrl/Cmd + F) - Incorrect result counting, infinite loops and crashes with embedded objects

Issue 1 — Incorrect search behavior with nested and circular embeds

Description

The in-page search functionality seems to have an issue with the way it traverses embedded objects, particularly when objects are embedded multiple times, contain nested embeds, or have circular embedding relationships.

Depending on the complexity of the page, this results in incorrect search result counts, incorrect navigation between matches, or the application freezing and crashing altogether.

Actual behavior

In my Sandbox space:

I created a simplified environment to isolate and reproduce the issue.

  • There are only three actual occurrences of the word test.
  • The search returns five results instead of three.
  • When navigating through the results, some matches highlight previously encountered instances of Page B or Page C rather than distinct occurrences.

This suggests that the search may be traversing the same objects through multiple embedding paths and counting their content multiple times.

However, a simple circular embedding relationship (Page A embeds Page B, and Page B embeds Page A) is not sufficient to reproduce the crash.

In my actual Second Brain space:

On an affected page (Page A):

  • Without the problematic embed, the search returns 10 results.
  • When embedding my AI Driven Development object, the number of results increases to 57.
  • When embedding my Artificial Intelligence (A.I.) / Machine Learning content, the number of results increases into the thousands, ultimately causing the application to freeze or crash.

On the web version, the search result counter can continue increasing until the application becomes unresponsive.

On the Windows desktop application, the application can freeze or crash almost immediately.

Removing the problematic embeds restores normal search functionality.

Expected behavior

  • Search should correctly handle nested and circular embedding relationships.
  • The same underlying content should not be counted repeatedly simply because it is accessible through multiple embedding paths.
  • Navigating between search results should consistently highlight the corresponding occurrence.
  • Circular references should not cause infinite traversal.
  • Searching within complex pages should never cause the application to freeze or crash.

Additional context and impact

I extensively use embedded objects to organize my knowledge base and build Maps of Content (MOCs), where multiple interconnected objects can reference and embed one another.

This makes the in-page search functionality particularly important, as it allows me to search through related knowledge directly from a central page.

Currently, this issue makes searching within some of my more interconnected pages impossible.

I haven't yet identified the exact combination of embedding relationships responsible for the crash, but the issue appears to go beyond a simple circular reference.

Simple Quick fix

A very simple & quick fix would be to add an option in the settings to remove embeds from page-search. Search would only search the actual content of the page, not the content of embeded pages.

Issue 2 — Find in page unavailable in Calendar / Daily Notes view

The in-page search functionality also appears to be unavailable when viewing Daily Notes through the Calendar.

  • Pressing Ctrl + F does nothing.
  • The Find / Search action is not available in the Daily Note's three-dot menu.

Expected behavior

It should be possible to search within a Daily Note in Calendar view, just as it is possible within any other object.

The Find action should be accessible through both the keyboard shortcut and the corresponding menu, with the shortcut documentation updated accordingly.

0 Comments

Sign in to comment

No comments yet. Be the first to share your thoughts!