Skip to content

Scribe and Notes: routes, seams and dependencies for the Pro features - #222

Open
alichherawalla wants to merge 75 commits into
mainfrom
feature/scribe-notes
Open

alichherawalla wants to merge 75 commits into
mainfrom
feature/scribe-notes

Conversation

@alichherawalla

@alichherawalla alichherawalla commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Core's half of Scribe (writing help in every text box) and Notes (Olympus Notes with Obsidian behaviour). Core stays inert: it adds routes, seams and dependencies, and every feature lives in Pro (off-grid-ai/desktop-pro, same branch). Without Pro, each entry point leads to the upgrade screen or refuses with "Pro required". Merged with main.

Scribe and Notes routes

Scribe and Notes join the Pro catalog as locked tabs in Work. /scribe and /notes are routes in VIEW_MODES, so both page-shell guards mount them, and their subpages push history. A note deep link opens the upgrade screen for free users, and Pro's Notes screen as its subroute.

Writing API, extension bridge and sync seams

The gateway answers /v1/writing/* with 402 Pro required until Pro registers its Scribe routes. The extension bridge answers a sealed writing request through Pro's Scribe hook, or refuses with pro_required. offgrid:// links open or focus the app on macOS, Windows and Linux, and a link carries no command. The external links list names the extension's Chrome Web Store page. The core sync entities name Scribe's learned words, preferences and style guides, so Pro can sync them.

Build and dependencies

Desktop depends on @offgrid/writing and @offgrid/notes from shared, and on the Notes editors (CodeMirror 6, Tiptap 3, d3-force); the renderer loads one copy of CodeMirror and Lezer. Native staging builds Pro's Scribe overlay helper on macOS, Windows and Linux. @offgrid/operator-ui is pinned to ui-library 7a37271, which brings no glows in either skin, the brand mark for hosts outside the app, the host-triggered accept and the picker's waiting shimmer.

A focused field: 1px emerald border, nothing more

A focused field in Notes

A focused field in Try it: the same border, no halo on the card

A focused field in Try it

A dev or test instance never touches the installed app's engine

OFFGRID_LLAMA_PORT gives a dev or test instance its own preferred model port, like OFFGRID_GATEWAY_PORT; a packaged app keeps 8439. The model-port test now takes a free port of its own, so it passes while an app on the machine holds 8439, and never touches it.

Tests

  • The renderer test setup tracks animation frames. A frame that fires after its file's DOM is gone does nothing, and frames still queued when a file ends are cancelled, so motion never reads a removed document (measureScroll). Animations run unchanged.
  • The fake llama engine can stream exact frames, write as a slow model does, or drop mid-way. An engine whose model reply dies passes that on, and it still stops on SIGTERM.
  • The MemoryChat "Work done" test waits for the conversation to load, not for time.
  • Typecheck (node and web) is clean, lint has 0 errors, and the core no-mock guard passes.

Summary by CodeRabbit

  • New Features
    • Added Notes and Scribe to the app’s navigation, with support for opening their screens and specific subpages through links.
    • Pro users can use Scribe writing features through a paired browser extension; writing features require Pro access.
    • Added Notes vault files and Scribe settings and learned content to core sync.
    • Added support for Off Grid links to launch the app or bring an existing window forward.
  • Bug Fixes
    • Improved handling of links opened in a second app instance so the existing window is restored and focused.
    • Improved model server startup when the preferred port is already in use.

… upgrade screen; /scribe and /notes are routes whose pages push history
…ibe hook; without Pro it refuses with pro_required and state reports writing off
…o the extension's Open Off Grid works; the link carries no command
…nd on the Notes editors: CodeMirror 6, Tiptap 3 and d3-force for the graph
…-win.exe, .NET 8 in the Windows jobs) and stages the X11 helper on Linux
…available before Scribe registers, and forwards to the Scribe hook with the browser's name
… so Pro's Page view can make its own parser; mermaid keeps its own 16.4.2
…tes' editor accepts its extensions when ui-library carries its own copies
… halo or glow on the field or the box around it, in pinned and linked builds
…in, Scribe hosts, and the picker's Show changes toggle
…cused field with only its 1px emerald border
# Conflicts:
#	.github/workflows/ci.yml
#	.github/workflows/release.yml
#	package-lock.json
#	package.json
#	pro
#	src/renderer/src/__tests__/browser-boundaries.setup.ts
…ce itself, so keyboard focus adds no second ring round it
…erlines on arrival with one focus border, in-app chip by the selection
# Conflicts:
#	.github/actions/setup-desktop/action.yml
#	.github/workflows/ci.yml
#	.github/workflows/release.yml
#	.github/workflows/windows-build.yml
…what the person sees; overlay underlines before the edit point stay put
…e, ⌥Enter works in any non-secret field, and the overlay skips IDEs, spreadsheets, Finder and settings
…verlay measures Chromium words through their text runs, so hover opens the fix card there, and never selects text to measure
…ove lays out a wall of text by itself, and its Notes card opens again
@sonarqubecloud

sonarqubecloud Bot commented Nov 3, 2026

Copy link
Copy Markdown

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.

1 participant