Skip to content

Commit 358caf6

Browse files
Yogesh Prajapaticlaude
andcommitted
feat(v1.3.0): Compare (file+folder diff), Recent Files, file watcher, Tier 1 AI, find UX, preview maximize, double-click open fix
═════════════════════════════════════════════════════════════════ 🆕 New features ═════════════════════════════════════════════════════════════════ Compare — file & folder diff (see DIFF.md): - File → Compare → Compare Files / Compare with Saved / Compare Folders - Right-click tab → Select for Compare → "Compare with selected" - New 'diff' tab type rendering Monaco DiffEditor (side-by-side or inline) with Swap / Inline / Next / Prev / Reload toolbar - New 'folder-diff' tab type — side-by-side tree powered by dir-compare, colour-coded (green added · red removed · yellow modified) - Click a modified-file row in folder-diff → opens that file's diff - Skips node_modules / .git / dist / build / out / .next / .cache / .vscode / .idea / __pycache__ automatically; content-hash comparison Recent Files menu: - File → Open Recent → submenu with last 15 opened files (persisted in settings.json, deduped, stale entries auto-pruned) - Mnemonic accelerators &1–&9 for the first nine entries - "Clear Recent Files" at the bottom External file-change watcher: - fs.watch per open editor tab (debounced 250 ms) - Clean tab → auto-reload with toast - Dirty tab → confirm dialog "Reload from disk / Keep my version" - Deletion detection (warning + marks tab dirty) - Knows about our own writes — doesn't fire on the user's saves Find UX overhaul: - Live gutter + minimap markers update as you type (debounced 120 ms) - Yellow bar + ● dot in gutter on every match line - Orange bar + larger orange dot on the CURRENT match - Find status now shows "3 of 58 matches" - Find/Replace input contrast fixed (always white bg + black text) - Find in Files tab — recursive search via main process, results in panel - Mark tab — multi-colour persistent highlights (yellow / cyan / pink / green / orange), survives Find panel close, "Clear Marks" - Notepad++-style search-results panel — green header, per-file group with collapse, click any row to navigate (or open the file in Find-in-Files mode) - Per-tab action buttons hide when not relevant (Mark / Find in Files modes only show their own buttons) Tier 1 AI Assistant additions (see ROADMAP.md): - AGENTS.md + .notepp/memory.md auto-injected into AI system prompt - Quick-action chips: ✨ Polish · 🔧 Refactor · 📝 Comments · 🧪 Tests · 💡 Explain · 📓 Memory (opens .notepp/memory.md) - Multi-model picker — separate model setting for Chat vs Agent Preview pane: - Zoom controls in the preview header (−, %, +) - Ctrl+Wheel inside the preview body zooms - ⛶ Maximise toggle — preview takes the full editor row - Mermaid diagrams zoom via the existing mermaid scale-transform (the new buttons delegate to it so the SVG actually resizes) ═════════════════════════════════════════════════════════════════ 🐛 Fixes ═════════════════════════════════════════════════════════════════ - Double-click a file on Windows now reliably opens it inside Note++ (was: IPC race — main sent open-files before renderer registered the listener; now main buffers and flushes on renderer-ready) - Open dialog: "All Files" is the default filter again + added category filters (Text / Config-Data / Source Code / Web / Whiteboard) - restoreSession editor tabs now get type:'editor' so encryption / compare context-menu checks no longer misfire ═════════════════════════════════════════════════════════════════ 🗑 Removed ═════════════════════════════════════════════════════════════════ Voice / Whisper / Dictation Buddy code: - Removed entirely (src/whisper-main.js, src/audio-capture-worklet.js, DICTATION.md, mic button, dictation buddy UI/CSS, @xenova/transformers + onnxruntime-node deps) - Multiple attempts (Web Speech API, transformers.js in renderer + proxy, main-process onnxruntime-node + AudioWorklet PCM capture) all hit assorted instability in Electron 28. Deferred to a proper whisper.cpp native-bindings rewrite in a future release. ═════════════════════════════════════════════════════════════════ 📦 Dependencies ═════════════════════════════════════════════════════════════════ - + dir-compare (folder-diff backend) - - @xenova/transformers, onnxruntime-node (voice removed) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 39c0c5f commit 358caf6

9 files changed

Lines changed: 2032 additions & 45 deletions

File tree

DIFF.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# Note++ — Compare (File & Folder Diff) Spec
2+
3+
> Status: design locked, implementation in progress.
4+
5+
Inspired by Diff.Net / WinMerge / Beyond Compare. Two flavours:
6+
7+
1. **File compare** — side-by-side text diff of two files
8+
2. **Folder compare** — side-by-side tree of two directories
9+
10+
Both render as new **tabs** (not modals), so they can coexist with editing.
11+
12+
## Locked decisions
13+
14+
| Question | Answer |
15+
|---|---|
16+
| File-diff engine | **Monaco's built-in `createDiffEditor`** (already in our stack) |
17+
| Folder-diff engine | **`dir-compare` npm package** (~150 k weekly downloads, MIT) |
18+
| Where the result goes | A **new tab** of type `'diff'` (files) or `'folder-diff'` (folders) |
19+
| Default view | File-diff: **side-by-side**, syntax-highlighted. Folder-diff: **side-by-side tree**, colour-coded |
20+
| Entry points | `File → Compare → ...` menu + right-click tab → "Select for Compare" / "Compare with Selected" |
21+
| Skip in folder-diff | `node_modules`, `.git`, `dist`, `build`, `out`, `.next`, `.cache`, `.vscode`, `.idea`, `__pycache__` |
22+
| Compare mode (folder) | Filename + size + content-hash. Equal if all match. |
23+
24+
## File compare UX
25+
26+
```
27+
Tab title: ⇆ left.js ↔ right.js
28+
─────────────────────────────────────────────────
29+
Toolbar: [⇆ Swap] [≡ Inline] [↑ Prev] [↓ Next] [↻ Reload]
30+
─────────────────────────────────────────────────
31+
┌──── left.js ────────────────┬──── right.js ──────────────┐
32+
│ Monaco diff editor │ │
33+
│ - removed lines red │ + added lines green │
34+
│ - modified lines yellow │ + modified lines yellow │
35+
│ - syntax-highlighted │ - syntax-highlighted │
36+
│ - line numbers │ - line numbers │
37+
│ - overview ruler shows │ │
38+
│ change density │ │
39+
└─────────────────────────────┴────────────────────────────┘
40+
```
41+
42+
- Shortcuts inside the tab: `F7` next change, `Shift+F7` previous, `Ctrl+Shift+I` toggle inline ↔ side-by-side
43+
- Refresh re-reads both files from disk
44+
- Swap reverses left/right
45+
- Closing the tab disposes the diff models cleanly
46+
47+
## Folder compare UX
48+
49+
```
50+
Tab title: ⇆ /left/folder ↔ /right/folder
51+
─────────────────────────────────────────────────
52+
Toolbar: [⇆ Swap] [☑ Show only changes] [↻ Reload]
53+
Summary: 12 added · 8 removed · 5 differ · 247 equal
54+
─────────────────────────────────────────────────
55+
┌──── /left/folder ───────────┬──── /right/folder ─────────┐
56+
│ 📁 src │ 📁 src │
57+
│ 📄 main.js ✎ │ 📄 main.js ✎ │
58+
│ 📄 old.js ⊖ │ (missing) │
59+
│ (missing) │ 📄 new.js ⊕ │
60+
│ 📄 package.json │ 📄 package.json │
61+
└─────────────────────────────┴────────────────────────────┘
62+
```
63+
64+
Status icons + colours:
65+
- 🟢 `` Added — only in RIGHT (left cell empty, right cell green)
66+
- 🔴 `` Removed — only in LEFT (left red, right empty)
67+
- 🟡 `` Modified — in both, content differs (both yellow)
68+
- ⚪ Equal — in both, identical (no highlight)
69+
70+
Click a **file** row that's marked Modified → opens that file's diff in a new tab.
71+
Click a **folder** row → expand/collapse.
72+
73+
## Entry points
74+
75+
| Where | Action |
76+
|---|---|
77+
| `File → Compare → Compare Files…` | Two file pickers → opens diff tab |
78+
| `File → Compare → Compare with Saved…` | Compare current tab content vs a picked file |
79+
| `File → Compare → Compare Folders…` | Two folder pickers → opens folder-diff tab |
80+
| Right-click a tab → **Select for Compare** | Marks the tab as "left" |
81+
| Right-click another tab → **Compare with Selected** | Opens diff (current as right) |
82+
83+
## IPC additions
84+
85+
| Channel | Purpose |
86+
|---|---|
87+
| `compare-folders` | `dir-compare` invocation in main; returns a flat array of entries with status |
88+
89+
(File compare reads via existing `read-file` IPC — no new handler needed.)
90+
91+
## Out of scope (v1)
92+
93+
- Three-way merge view
94+
- Inline editing in the diff view (it's read-only)
95+
- Saving diff result as a patch file
96+
- Compare two arbitrary tabs that are already open via drag-and-drop
97+
- Folder-diff content hashing for very large files (we skip >10 MB binary files)

ROADMAP.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# Note++ — Roadmap
2+
3+
> Drawn from a 2025/26 deep-dive on the note-taking and code-editor landscape.
4+
> See the conversation-of-record (this repo's session notes) for the underlying research and citations.
5+
6+
## Vision
7+
8+
> **Notepad++ for the agent era. Local-first. AI that acts, with permission. No plugin marketplace, no cloud lock-in, no surprises.**
9+
10+
Note++ sits in the gap between Notepad++ (great launcher, no AI) and Cursor / VS Code (great AI, heavy install, cloud-leaning). The bet is that a small, fast, local-first developer notepad with the right slice of futuristic features will keep mind-share that the bigger players can't.
11+
12+
## Three Differentiators (already shipped, lean into these)
13+
14+
1. **AI auto-magic** — click 🤖, Note++ detects → installs (prompts) → starts daemon → downloads `qwen2.5-coder:1.5b` → connects. No other local AI editor does this. Cursor needs an account, Continue needs config, Cline needs a model picker.
15+
2. **Local-first encryption + AI** — no other product in the landscape combines AES-256-GCM per-file encryption with a local AI agent. Cursor is cloud-only AI; Standard Notes has no AI; Obsidian's encryption is paid-plugin.
16+
3. **Lightweight enough to be a notepad, powerful enough to refactor a function** — boots in <2 s, has a real Source Control panel, runs Ollama locally, edits via Monaco diff preview.
17+
18+
---
19+
20+
## Tier 1 — Ship-now (days)
21+
22+
Quick wins that keep Note++ on the standards curve. Each is small and self-contained.
23+
24+
| Feature | Effort | Why | Status |
25+
|---|---|---|---|
26+
| **`AGENTS.md` support** — read from repo root, inject into AI system prompt | 1 hr | Vendor-neutral standard adopted by Cursor, Codex, Copilot, Jules, Gemini, Windsurf, Zed, Cline (60k+ repos). Free compatibility with the entire agentic ecosystem. | 🟡 In progress |
27+
| **Project memory at `.notepp/memory.md`** — auto-loaded into agent context every turn | 2 hrs | Match Claude Code / VS Code Agent Skills pattern. Tiny but important — gives users a place to write project-specific instructions the AI will always see. | 🟡 In progress |
28+
| **Quick-action buttons** in AI panel — `✨ Polish` / `🔧 Refactor` / `📝 Add comments` / `🧪 Generate tests` | 2 hrs | Granola's $1.5B wedge is "polish my mess." Pre-canned Agent-mode prompts that Just Work. Reuses existing diff modal. | 🟡 In progress |
29+
| **Multi-model picker** — separate models for chat vs agent vs quick-actions | 3 hrs | Speed/quality tradeoff per task; Continue & Cursor both do this. E.g., `qwen2.5-coder:1.5b` for chat speed, `deepseek-coder:6.7b` for agent quality. | 🟡 In progress |
30+
| **Voice prompt input** in AI panel || Tried: Web Speech API (no Google API key in Electron), `@xenova/transformers` whisper-tiny in renderer (renderer killed on inference, both main-thread and proxy modes), the same in main process via `onnxruntime-node` + `AudioWorklet` PCM capture (worked end-to-end but had assorted rough edges). All voice/dictation code removed in v1.3 cleanup. Reintroduce via native `whisper.cpp` bindings when the broader Tier 3 voice work happens. | 🗑 Removed (deferred) |
31+
32+
## Tier 2 — Ship-soon (1–4 weeks)
33+
34+
The leverage moves. Each one moves Note++'s capability ceiling significantly.
35+
36+
| Feature | Effort | Why |
37+
|---|---|---|
38+
| **MCP client support** — connect to community MCP servers (filesystem, GitHub, Brave Search, Postgres, etc.) | 1–2 wks | MCP became the universal tool protocol in ~12 months (~97M monthly SDK downloads). Implementing MCP client multiplies capability instantly. Anthropic's protocol; OpenAI / LF agentic-AI foundation backed it. |
39+
| **Inline AI completion** (Cursor Tab pattern) via Ollama FIM | 1 wk | Predictive ghost-text edits as you type. Cursor's Sept 2025 numbers: −21% suggestions, +28% acceptance once they predicted *where* the cursor jumps. Monaco supports this via `registerInlineCompletionsProvider`. |
40+
| **Repo-wide chat** — when a workspace folder is open, AI can read/search across files | 4–5 days | Closes the gap with Cursor's repo chat. Uses the file-tree code we already have. |
41+
| **Inline git diff gutter** (added/modified/deleted markers in editor) | 3–4 days | Already on `GIT.md`'s deferred list. Showed up in both research streams as the universal expectation. Cheap with Monaco's decoration API. |
42+
| **Local semantic search** via `nomic-embed-text` over open workspace files | 1 wk | "Find similar code" / "find file about X" without uploading anywhere. Karpathy's LLM-Wiki pattern + a small embedding model. Works offline. |
43+
44+
## Tier 3 — Aspirational (months, transformative)
45+
46+
Each one would be a marketing line on its own.
47+
48+
| Feature | Why it's worth it |
49+
|---|---|
50+
| **Encrypted Vault** (multi-note encrypted workspace) | Expand encrypted-pad to a vault model, 1Password-style. Quick toggle between plaintext workspace and encrypted vault. Differentiated against everyone except Standard Notes (and they have no AI). |
51+
| **Background agents on git worktrees** | Cursor 2.0's parallel-agent fan-out, but local. "Try 3 approaches to this refactor in parallel" — Note++ already has git integration; `git worktree add` is the missing piece. |
52+
| **Voice-to-code** (full inline) — Whisper.cpp + Cursor-style voice mode | Real differentiator; Whisper runs offline; opens accessibility. |
53+
| **Vision input** — paste screenshot of a hand-drawn diagram → AI converts to Mermaid | Plays to Note++'s Mermaid + Whiteboard strengths. LLaVA-equivalent runs in Ollama. |
54+
| **Sandbox / permission boundaries** for Agent mode | Confirm-before-shell, confirm-before-multi-file-write, deny-list for sensitive paths. Pitch: "the AI editor that won't `rm -rf` your home folder" — competitive positioning amid the 30+ prompt-injection RCE bugs disclosed across Cursor, Windsurf, Kiro, Copilot, Zed, Roo, Cline, Junie in Dec 2025. |
55+
| **Mobile capture companion** (PWA) | The universal mobile-desktop-parity complaint. Simple PWA captures voice/text → syncs to a Note++ inbox file via cloud-sync. |
56+
| **Karpathy LLM-Wiki view** for `.md` workspaces | "70× more efficient than RAG for personal scale." Curated markdown handed wholesale to long-context model. Good fit for users with a Markdown notes folder. |
57+
58+
---
59+
60+
## What we **won't** do (research-backed)
61+
62+
| ❌ Don't | Why |
63+
|---|---|
64+
| **Plugin marketplace** | #1 unspoken Obsidian complaint is plugin supply-chain risk. Skiff (Notion-acquired then killed Feb 2024) showed the danger of becoming dependent on one platform's ecosystem. |
65+
| **Graph view** | "Universally treated as eye-candy, not a workflow." Tana's typed-node supertags > Roam-style backlinks. Graph view is dead as a feature; schema-on-read is alive. |
66+
| **Cloud-native sync of notes** | Notion fatigue is real (HN/Trustpilot complaints cluster around lock-in, surprise billing). Note++ wins by *not* being that. Cloud session sync (already shipped) is fine; cloud-host of notes themselves is not. |
67+
| **AR/VR notes** | IDC: ~14M units by end-2025 vs ~300M PCs sold/year. No breakout note app on Vision Pro. Treat as long-tail bet, not a 1–3yr play. |
68+
| **Compete with Cursor/Windsurf on parallel worktrees, custom foundation models** | Different product category, they raised $10B+. Compete on **focused, lightweight, local-first**. |
69+
| **Proprietary "Note++ rules" file format** | AGENTS.md won the standards war in 12 months. Don't fragment further. |
70+
| **Brain-dead RAG over notes** | Karpathy's LLM-Wiki pattern (curated markdown → long-context LLM) is "70× more efficient" for personal scale. Skip embeddings for notebooks under ~10k notes. |
71+
72+
---
73+
74+
## Underlying research signals (for posterity)
75+
76+
- **Cursor 2.0** (Oct 2025): own foundation model "Composer", parallel agents on git worktrees, voice control
77+
- **Windsurf** (Cognition): Cascade planner+executor split
78+
- **Zed**: GPL open-source, $32M Sequoia, deep Anthropic integration
79+
- **VS Code + Copilot**: Agent Mode + MCP GA, Next Edit Suggestions, Prompt Files, Agent Skills, Agents Window
80+
- **Cline** (~58k stars), **Roo Code** (~22k stars), **Continue** (~32k stars) — open-source agents winning
81+
- **MCP**: universal in ~12 months; ~97M monthly SDK downloads
82+
- **AGENTS.md**: 60k+ repos in a year
83+
- **Granola**: $43M Series B → $125M Series C ($1.5B val) in months
84+
- **Notion 3.0** (Sept 2025): AI Agents → **Custom Agents** (Feb 2026)
85+
- **Standard Notes** acquired by Proton AG (Apr 2024); **Skiff** acquired and shut by Notion (Feb 2024)
86+
- **Tana**: supertags = the genuine Roam-evolution
87+
- **30+ prompt-injection RCE bugs** in AI IDEs (Dec 2025 disclosure)
88+
- **Local AI**: Qwen2.5-Coder 32B matches GPT-4o on HumanEval; Ollama is the dominant runner
89+
90+
---
91+
92+
## What "done" looks like for v1.3
93+
94+
Tier 1 + a chunk of Tier 2 (MCP + inline completion). Then Note++ has:
95+
96+
- Standards-compliant AI hosting (`AGENTS.md`, `.notepp/memory.md`, MCP)
97+
- Multi-model + quick-action UX
98+
- Voice capture (where supported)
99+
- Inline ghost-text completions
100+
- Repo-wide chat
101+
- Plus everything already shipped (Git, encryption, whiteboard, agent diff)
102+
103+
That stack alone moves Note++ from "good 2024 editor with AI" to "competitive 2026 editor with a clear differentiation story" — without taking on any of the risks (plugin ecosystem, cloud sync, AR/VR) the research warns against.

package-lock.json

Lines changed: 42 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "notepp",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "Note++ - A powerful text editor",
55
"main": "src/main.js",
66
"author": "Yogesh Prajapati",
@@ -362,6 +362,7 @@
362362
},
363363
"dependencies": {
364364
"@excalidraw/excalidraw": "^0.18.1",
365+
"dir-compare": "^5.0.0",
365366
"marked": "^18.0.3",
366367
"mermaid": "^11.14.0",
367368
"monaco-editor": "^0.45.0",

0 commit comments

Comments
 (0)