Skip to content

feat: Obsidian plugin — native .nodepad rendering with full provider support#1

Merged
Dev-020 merged 1 commit into
mainfrom
claude/inspiring-haibt-4aa964
May 11, 2026
Merged

feat: Obsidian plugin — native .nodepad rendering with full provider support#1
Dev-020 merged 1 commit into
mainfrom
claude/inspiring-haibt-4aa964

Conversation

@Dev-020
Copy link
Copy Markdown
Owner

@Dev-020 Dev-020 commented May 11, 2026

Summary

What changed

New: plugin/ directory

The plugin bundles all nodepad React components via esbuild and mounts them in an Obsidian TextFileView leaf. .nodepad files are stored in the vault and auto-saved on every state change — no Next.js server needed at runtime.

File Purpose
plugin/src/main.ts Registers .nodepad extension, ribbon icon, command palette entry
plugin/src/view.tsx TextFileView subclass, mounts NodepadApp React component via createRoot()
plugin/src/settings.ts Obsidian settings tab — provider, model, API key, local Ollama toggle
plugin/src/ai-adapter.ts All AI calls via Obsidian's requestUrl() (CORS-free) + child_process for CLI tools
plugin/src/styles.css Tailwind tokens mapped to Obsidian CSS variables for automatic theme adaptation
plugin/esbuild.config.mjs Bundles from local lib/ and components/ — uses your fork's code, not upstream

AI providers in the plugin

Provider Mechanism Notes
OpenRouter, OpenAI, Z.ai requestUrl() → external API CORS-free in Electron
Ollama requestUrl() → localhost:11434 or Cloud Different /api/chat request shape
Gemini CLI child_process.spawn("gemini") Two-stage grounding pipeline preserved

Shared component patches (web app unaffected)

  • components/ui/sheet.tsxSheetPortal/SheetContent accept container? prop for portal scoping
  • components/about-panel.tsx — forwards container to SheetContent
  • components/status-bar.tsx — accepts and forwards portalContainer
  • components/vim-input.tsxisPlugin mode: hides Projects/New Project nav, filters action items to plugin-relevant set, dynamic grid columns

Install instructions

cd plugin
npm install
npm run build

# Run as Administrator — creates a junction so dist/ auto-updates on rebuild
New-Item -ItemType Junction -Path "<vault>\.obsidian\plugins\nodepad" -Target (Resolve-Path .\plugin\dist)

Then: Obsidian → Settings → Community plugins → disable Restricted mode → enable Nodepad

Test plan

  • Ribbon icon creates a new .nodepad file and opens it in a leaf
  • Tiling / Kanban / Graph view modes render correctly inside Obsidian
  • Ctrl+K command palette opens; Projects/New Project hidden; Export MD, Copy MD, Clear shown
  • Settings → Nodepad shows provider dropdown with all 5 providers
  • Gemini CLI selected → API key field hidden, binary check button shown
  • Ollama selected → local toggle and model discovery button shown
  • Adding a note with OpenRouter key enriches it with AI annotation
  • Adding a note with local Ollama enriches it correctly
  • Adding a note with Gemini CLI spawns subprocess and enriches
  • Ghost synthesis fires after 5+ enriched blocks across 2+ categories
  • Export MD command saves a .md file to vault root
  • Web app still functions normally (no regression in shared components)

🤖 Generated with Claude Code

Adds issues mskayyali#22-mskayyali#29 covering the planned Obsidian plugin integration
and future Claude Code AI provider support. Also removes a stale
duplicate bug report block that was accidentally appended at the end
of the file.

New issues:
- mskayyali#22 Core plugin infrastructure (React-in-Obsidian, esbuild, component patches)
- mskayyali#23 Obsidian settings UI (provider/model/key within Obsidian settings)
- mskayyali#24 child_process CLI bridge (shared prereq for Gemini CLI and Claude Code)
- mskayyali#25 Ollama provider support in the plugin
- mskayyali#26 Gemini CLI provider support in the plugin
- mskayyali#27 Structured study guide export to vault (Obsidian-native .md with frontmatter/wikilinks)
- mskayyali#28 Human-in-the-loop review before vault write
- mskayyali#29 Claude Code AI provider (planned, blocked on mskayyali#24)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Dev-020 Dev-020 merged commit 87ccc04 into main May 11, 2026
@Dev-020 Dev-020 deleted the claude/inspiring-haibt-4aa964 branch May 11, 2026 01:50
@Dev-020 Dev-020 changed the title docs: add Obsidian integration and Claude Code provider to backlog feat: Obsidian plugin — native .nodepad rendering with full provider support May 11, 2026
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