Skip to content

Inbox search: a one-time tip that words in quotes are an exact phrase - #4124

Merged
backnotprop merged 5 commits into
mainfrom
feat/inbox-search-quotes-tip
Nov 27, 2026
Merged

backnotprop merged 5 commits into
mainfrom
feat/inbox-search-quotes-tip

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Draft: shows new words to people. Needs the owner's approval of the words and the pictures before it merges.

Exact search with quotes merged in #4117. People will not find quotes by themselves, so the next time someone opens the search palette, it shows a one-time tip about them.

The words (SEARCH_TIP_WORDS in packages/inbox/search/searchTip.ts; same layout as the Launch and Sidebar tips)

  • Label: New
  • Title: Search for an exact phrase
  • Line: Put words in "quotes" to find them side by side, in that order.
  • Button: Got it

It reuses the existing one-time tip system, with nothing new invented

  • The card is the Launch tip's (.ib-tour-coach.ib-ctip, as in compose/LaunchTipCard.tsx). Like the Launch tip, it is drawn inside the modal dialog. Placement follows the Launch tip's rule: beside the palette at the same height as the search box, with its arrow pointing at the box, when the window has room. On a narrow window or a phone it sits under the box, inside the palette's own layout. It pushes the results down, so it covers neither the box nor any result.
  • The Inbox decides who sees it and remembers that it was shown, the same way it does for the Sidebar tip (packages/shared/inbox/search-tip.ts):
    • Settings report reveal.search_tip as due only a day or more after first use, only if it was never shown, never if a recent search already has a quote mark, and never inside the 40-minute gap after another one-time dialog.
    • Claiming it (POST /api/inbox/reveal id: "search_tip") stamps inboxReveals.search_tip. The stamp also starts the gap (tipShownAt), so no other dialog or tip can follow it right away.
    • Every window shares the stamp. The same page retrying after a lost answer is shown it again; any other window gets a no.
  • The window shows it only outside the tour and the first-run screen, and only when no other one-time dialog or tip is claimed or open (App's revealBlocked, lineBusy). It also stays hidden if another one-time dialog showed on this load (oneTimeDialogShownThisLoad). Once shown, it holds the others back with noteOneTimeDialogShown.

Behaviour

  • It appears 300 ms after the palette opens and never takes focus, so typing and results carry on. While the tip is up, the search box is described by the tip's line.
  • It goes away on Got it, on Escape, on a quote mark typed in the box (straight, curly, „“ or «»), or when the palette closes. There is no timer.
  • The first Escape closes only the tip; the next Escape closes the palette. This is what the Launch and Sidebar tips do.
  • A quote typed before the tip appears keeps it away for that open, and nothing is claimed.
  • No new keyboard shortcut and no new setting.

"Already used quotes" is read from the Inbox's own list of recent searches: the last six, kept when a result is opened. No new tracking was added for this.

Pictures (whole window, same made-up data, static built window with mocked routes, no server)

  • 01 before, 1440 light; 02 after, 1440 light; 03 after, 1440 dark; 04 after, phone 390 light.

Tests

  • packages/inbox/searchTip.test.tsx (DOM, listed in tests/dom-test-list.txt): shown once per page, also after a reopen or remount; Got it; the first Escape closes only the tip; a typed quote closes it; a quote typed early keeps it away; a refused claim; not shown while another one-time dialog showed on this load or while the window withholds it.
  • packages/shared/inbox/search-tip.test.ts: who sees it and the claim.
  • New Search tip cases at the end of packages/server/inbox-reveal.test.ts: the gap in both directions, first-run day, a recent quoted search. That file starts an Inbox, so it runs in CI only.
  • The e2e worlds and the DOM server now start with the tip already seen (E2E_GROUP_TIP_SEEN, tests/helpers/inbox-dom-server.ts), so no spec's first search opens it.

No agent-facing words changed. The Inbox is Bun-only, so the Pi server has nothing to change. App.tsx stays at its size ceiling.

@backnotprop backnotprop added the ci:e2e Run the full browser suite (Inbox window e2e) on this PR label Nov 27, 2026
… after a refused claim

The card is decided as the palette opens (a layout effect) from what the page already
knows, so it is drawn in the first paint and never pushes a row down after it was drawn.
Under the box it sets its measured height on the dialog and the results list gives it
up, so the palette ends inside the window at every size. A refused or lost claim leaves
it up for that open (no jump back); only the Inbox's yes holds the other one-time things
back. The server reads the recent searches only while the tip could still be due.
searchTip is a required prop, and a window-level test covers App's wiring.
…m for three results

- Drawn, the tip is kept in this browser's localStorage
  (plannotator-inbox-search-tip-seen) and never offered there again, so a
  refused or lost claim (a read-only data folder, a full disk) can no
  longer bring it back at every page load. The Inbox's stamp still keeps
  it to once across the computer's browsers. Storage that cannot be used
  throws nothing.
- While it is offered, the window reads the settings again when the tab is
  shown or focused (at most every 10 s, no timer), so a tab left open while
  another device showed it learns that before the next open.
- The card is placed from offsetLeft/offsetWidth/offsetTop, which the
  palette's 150 ms scale-in does not shrink: beside the palette it now sits
  16 px from it (was 2.4 px), and 1290-1303 px windows no longer pick the
  side from the shrunken width.
- Under the box it shows only when the results list keeps three measured
  rows of room; otherwise not at that open, nothing claimed or kept.
- The server reads the recent searches again only when the file changed.
@backnotprop
backnotprop marked this pull request as ready for review November 27, 2026 16:14
@backnotprop
backnotprop merged commit 1e53a0d into main Nov 27, 2026
73 of 74 checks passed
yermakoffivan pushed a commit to yermakoffivan/plannotator that referenced this pull request Nov 27, 2026
…d Pele 1.13

core 0.25.35 carries what merged after 0.25.34 went to npm: exact-phrase
search in inbox-search (words in double quotes, backnotprop#4117, backnotprop#4124) and the
agent-gone event in external-annotation's ExternalAnnotationEvent (backnotprop#3698).
No exports subpath changes.

ui handles that agent-gone event, so its pin follows and core goes first.
ui 0.67.0 is a minor: DiagramSourceAcceptContext lets a host refuse a fence
by its source before any engine runs (backnotprop#4146), DIAGRAM_REFUSED_RESULT is
exported, Pele 1.13.0 with the inline fit changes (backnotprop#4113), the agent-gone
send failures (backnotprop#3698) and the plan header seams (backnotprop#3905). README and HANDOFF
name the new pair and the order (core first), and the hook and Pele notes
now name ui 0.67.0 instead of "the first ui after 0.66.0".

bun.lock is bun install's own output: the two package version lines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:e2e Run the full browser suite (Inbox window e2e) on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant