Skip to content

[BUG] Search all pages ignores notebooks opened outside the main notebooks folder #127

Closed

Description

@DWAA1660

Environment

Windows, Rust 1.99.1, NoteCraft 0.0.9 at 33429876e885613f6ff8f29a762b15b2be736401 (current main when tested). Verified against the real workspace libraries / front end with synthetic files and an isolated profile. No product source changes or mocks.

Reproduction

  1. Start a session rooted at an empty root/ folder.
  2. Create a valid notebook under a separate away/ folder, with a page containing the unique text external_unique_token.
  3. Open that notebook using Session::open_notebook / the notebook.open command (the same supported workflow used by File > Open).
  4. Run search.query q=external_unique_token in that same session.
  5. As a control, load the external page through page.load.

Actual result

EXTERNAL_SEARCH Ok(Hits([]))
EXTERNAL_OPEN Ok(Page(... body: "<p>external_unique_token</p>" ...))

The notebook is open and its page loads, but the global search does not search it. The desktop search box is labelled Search all pages and calls this same command.

Expected result

Search all open notebooks, including those opened from another location. Keep one hit per page if roots overlap, and apply the requested result limit across the full set.

Cause

commands.rs, search_query, searches only s.root(). It ignores s.opened_elsewhere(), which the UI and link resolver already know about.

This is not #104/#105's formatting normalization: the unique query here has no formatting or punctuation issue and a whole notebook is excluded.

Duplicate check

Checked all open/closed issues and PRs, including the first audit's #102-#116 and new PRs #117-#120. No existing issue or PR covering this specific behavior was found.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions