Skip to content

Alert users when the embedding model isn't installed - #60

Merged
samkeen merged 1 commit into
mainfrom
claude/embedding-model-install-alert-exg27p
Jul 19, 2026
Merged

Alert users when the embedding model isn't installed#60
samkeen merged 1 commit into
mainfrom
claude/embedding-model-install-alert-exg27p

Conversation

@samkeen

@samkeen samkeen commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

On a fresh install with no model, opening a vault runs the model-free
projection pass (keyword index + graph) and then silently stops before
embedding: semantic ranking and similar-note discovery are off, with
almost no visible sign beyond the small search caveat most users miss.
This surfaces that state prominently and closes the download loop.

  • New pure, tested predicate (embedreminder.ts) gates a dismissible
    banner under the top bar, shown only when a vault with notes is open,
    the model is genuinely absent, no download is running, and the user
    hasn't opted out.
  • The banner offers Open Settings (the in-app Download), a ✕ that hides
    it for this session (it returns next launch — a gentle nag), and a
    "Don't remind me again" checkbox that persists the opt-out in
    localStorage for users who only want keyword search.
  • In-app Download now closes the loop: after provisioning, re-read
    vault_info so the banner and search caveat clear, then auto-embed the
    vault (Desktop: auto-index a vault on open (project immediately, embed in background) #25) so semantic search actually turns on — instead of waiting
    behind a manual Reindex the user is unlikely to find.

Frontend-only; ui test suite, tsc --noEmit, and vite build all green.

Co-Authored-By: Claude Opus 4.8 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01EG1R4y2x1WWJ9dyxvzpteq

Summary by CodeRabbit

  • New Features

    • Added a reminder banner when semantic search is unavailable and embeddings can be installed.
    • Banner actions open Settings, dismiss the reminder for the session, or disable future reminders.
    • Downloading the model now automatically refreshes embedding coverage and starts indexing.
  • Bug Fixes

    • Prevented reminders from appearing for empty vaults, during downloads, or when semantic search is already enabled.
  • Tests

    • Added coverage for reminder display conditions and dismissal behavior.

On a fresh install with no model, opening a vault runs the model-free
projection pass (keyword index + graph) and then silently stops before
embedding: semantic ranking and similar-note discovery are off, with
almost no visible sign beyond the small search caveat most users miss.
This surfaces that state prominently and closes the download loop.

- New pure, tested predicate (embedreminder.ts) gates a dismissible
  banner under the top bar, shown only when a vault with notes is open,
  the model is genuinely absent, no download is running, and the user
  hasn't opted out.
- The banner offers Open Settings (the in-app Download), a ✕ that hides
  it for this session (it returns next launch — a gentle nag), and a
  "Don't remind me again" checkbox that persists the opt-out in
  localStorage for users who only want keyword search.
- In-app Download now closes the loop: after provisioning, re-read
  vault_info so the banner and search caveat clear, then auto-embed the
  vault (#25) so semantic search actually turns on — instead of waiting
  behind a manual Reindex the user is unlikely to find.

Frontend-only; ui test suite, tsc --noEmit, and vite build all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EG1R4y2x1WWJ9dyxvzpteq
@samkeen
samkeen merged commit d5e3d4e into main Jul 19, 2026
1 check was pending
@samkeen
samkeen deleted the claude/embedding-model-install-alert-exg27p branch July 19, 2026 04:30
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 67f253b8-4bdf-4b7a-a985-9edc161d8f63

📥 Commits

Reviewing files that changed from the base of the PR and between 232d16a and 5d5ddf0.

📒 Files selected for processing (7)
  • ui/package.json
  • ui/src/embedreminder.test.ts
  • ui/src/embedreminder.ts
  • ui/src/main.ts
  • ui/src/render.ts
  • ui/src/state.ts
  • ui/style.css

📝 Walkthrough

Walkthrough

Adds a semantic-search install reminder with tested gating, persistent and session dismissal, banner rendering and styling, delegated controls, and automatic indexing after model download.

Changes

Embedding install reminder

Layer / File(s) Summary
Reminder predicate and behavioral tests
ui/src/embedreminder.ts, ui/src/embedreminder.test.ts, ui/package.json
Defines and tests the conditions controlling whether the install reminder appears, and adds the test to the npm test script.
Banner state and presentation
ui/src/state.ts, ui/src/render.ts, ui/style.css
Adds dismissal state, conditional banner HTML, controls, and install-banner styling.
Application wiring and provisioning flow
ui/src/main.ts
Mounts the banner, loads and persists dismissal preferences, handles interactions, and starts indexing after model provisioning.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant Banner
  participant User
  participant ModelProvisioning
  participant Indexing

  App->>Banner: render gated reminder
  Banner-->>User: show install action
  User->>ModelProvisioning: open Settings and download model
  ModelProvisioning->>Indexing: start automatic indexing
  User->>App: dismiss for session or permanently
Loading

Possibly related PRs

  • AlteredCraft/B2#54: Both changes modify embedding and indexing behavior in ui/src/main.ts.

Suggested reviewers: claude

Poem

I’m a rabbit with a banner bright,
Guiding models into sight.
Click or hush, the choice is clear,
Then indexing hops right here.
Semantic carrots, fresh and neat!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/embedding-model-install-alert-exg27p

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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