13 Commits
Author SHA1 Message Date
james.maesandClaude Opus 4.6 4bcf751887 feat: real streaming, abortable cancellation, progress modal redesign
Three coupled fixes to the processing UX:

Streaming (providers/*, node-stream.ts):
Native fetch() is blocked by Obsidian's Electron CSP, so every provider
was silently falling back to non-streaming requestUrl. Added a Node https
client (bypasses CSP) and switched all four providers to it. onToken
callbacks now fire per chunk as the model streams.

Cancellation (pipeline.ts, service.ts, commands.ts):
Added AbortController per annotation and plumbed signal through the
provider interface. Cancel now actually tears down in-flight requests
via req.destroy() instead of waiting minutes for the current call to
finish.

Progress modal (progress-modal-state.ts, progress-modal.ts):
Split logic from DOM into a pure ProgressModalStateMachine so the
"Cancelling..." sticky-header and Close-re-triggers-Cancel bugs can't
recur -- Cancel and Close are now structurally distinct buttons,
recreated per render. Added a rotating "while we wait together..."
quote panel (quotes.ts) and a placeholder line in the stream preview
while waiting for the first token. Stream preview is the only element
that scrolls internally; outer log fits its content.

Tests: 451 passing (22 files). New coverage for state machine
transitions, cancellation propagation, and the Node stream client.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 17:28:44 -05:00
james.maesandClaude Opus 4.6 7d2e1904fb fix: error modal text invisible on themed backgrounds
Use neutral background with red border instead of themed error
background that can make text invisible in some Obsidian themes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 08:43:55 -05:00
james.maesandClaude Opus 4.6 2d23f8949f feat: real-time streaming output, fix file conflict handling
Streaming:
- All 4 providers (Anthropic, OpenAI, Google, Ollama) now support
  real-time streaming via native fetch + SSE parsing
- Progress modal shows live prose output as the LLM generates it
- onToken callback on CompletionRequest, forwarded through pipeline

File conflicts:
- Fix conflict dialog CSS: use neutral styling instead of error-red
- Add upsertFile() helper that silently overwrites PENNY-managed files
  (version files, reviews) instead of showing conflict dialogs
- Version files and reviews are expected to be overwritten on re-runs
- Reserve safeCreateFile conflict dialog for user-created files only

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 08:38:26 -05:00
james.maesandClaude Opus 4.6 eba9ddfb62 feat: first-run setup wizard for new users
4-step guided setup modal on first install:
1. Welcome -- explains what PENNY does and the 3-step workflow
2. Provider -- pick Anthropic/OpenAI/Google/Ollama with API key input
3. Project Structure -- auto-detects folders, configures paths
4. Done -- quick start guide with annotation examples

Triggered when setupComplete is false. Can be skipped.
Replaces the old single-line Notice on first load.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 06:45:04 -05:00
james.maesandClaude Opus 4.6 e46d3095b8 fix: white text on green for companion plugin badges and success bars
The Obsidian theme's --text-success variable resolved to green-on-green,
making badge and confirmation text invisible. Use explicit white on
solid green instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 06:37:12 -05:00
james.maesandClaude Opus 4.6 082a8c517e feat: compact model routing UI, companion plugins section, audit fixes
- Redesign model routing as compact grid with column headers and tighter spacing
- Shorten "Auto (recommended) -> model-id" to "Auto (Model Name)"
- Add Companion Plugins settings section with auto-detection and auto-configure
  - Slash Commander: injects all PENNY commands as slash bindings
  - Editing Toolbar: adds PENNY submenu with all commands
  - Obsidian Git: listed with install link
- Fix requireProvider() to validate routeResearch (audit HIGH-4)
- JSDoc improvements across all provider files and UI modules

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-17 06:02:42 -05:00
james.maes 1c5d57545a feat: research command, error modal, progress timer
Research: new "PENNY: Do research" command opens a modal, sends query
to LLM, saves result to research folder organized by topic subfolder.
Appends to existing files if topic already exists.

Error modal: persistent modal with error message, stack trace, and log
path instead of flashing notices. Used in processChapter error handler.

Progress: live elapsed timer, inline spinner, "waiting for response"
text during API calls.

Settings: researchFolder added to project structure paths.
2026-04-17 05:15:07 -05:00
james.maes 12c9dbbb4d feat: live elapsed timer and spinner in progress modal
Add real-time elapsed timer (top-right, updates every second) so users
know processing is alive during long API calls. Add inline spinner
animation next to active annotations with "waiting for response..." text.
Timer shows final elapsed on completion ("Done in Xm Ys"). Minimize
button hidden after completion.
2026-04-17 05:03:50 -05:00
james.maes 4dc6c32dfc fix: progress modal CSS and commands cleanup 2026-04-16 15:35:22 -05:00
james.maes 01f042a41b feat: redesign settings header, add dynamic model lists
Header: gradient background, rounded card, version badge, pill-style
link buttons with hover states.

Model lists: Anthropic shows static catalog with context window sizes.
Ollama auto-fetches installed models on settings load with Refresh
button. Both display in styled panels within their provider sections.
2026-04-16 14:53:11 -05:00
james.maes 1e90a415cd feat: settings UI improvements - auto models, detect, validate, help
Auto-latest model: "Auto (recommended)" option for each tier, resolves
to best model at runtime (Haiku/Sonnet/Opus per tier). Default for all
new installs.

Detect project structure: button scans vault for standard folder
patterns and auto-fills empty path settings.

Validate paths: button checks all configured paths exist, reports
OK/MISSING/not set for each.

Commands reference: collapsible help section at bottom of settings
with all 11 commands in a styled table.

Ollama refresh models: button fetches installed models from Ollama
endpoint, shows them in a notice.

310 tests passing (8 new router tests for resolveModel).
2026-04-16 13:39:23 -05:00
james.maes b0369c0bdc feat: settings header, section spacing, governance files, dep updates
Settings: Add full header with name/description/links (docs, getting
started, bugs, GitHub). Add CSS for collapsible section spacing/borders.
Default useSameModelForAll to false (show all three tiers).

Governance: SECURITY.md, CONTRIBUTING.md, CHANGELOG.md, CircleCI
config, PR template, issue templates (bug report, feature request).

Deps: Update esbuild to 0.28.0, vitest to 4.1.4 (fixes both
Dependabot alerts, 0 vulnerabilities).
2026-04-16 13:30:19 -05:00
james.maes f3aff06227 feat: initial PENNY implementation - full Obsidian plugin
Complete implementation of PENNY (Prose Engine for Narrative, Notes,
and Yarns) as an Obsidian community plugin.

Core modules: annotation parser, version assembler, chapter versioner,
frontmatter manager, voice compliance checker, context assembler,
prompt drafter, chapter migrator.

Plugin shell: main plugin class, settings tab with 5 collapsible
sections, 11 command palette commands, project init wizard, status
bar widget, review note generator, activity logger.

Documentation: README, 9 user guides (getting started, annotations,
configuration, project structure, versioning, voice enforcement, git
workflow, troubleshooting, API costs), test fixtures.

Testing: 170 unit tests across 8 test files, all passing.
Build: esbuild production bundle (30KB main.js).
CI: GitHub Actions release workflow.
2026-04-16 09:20:18 -05:00