Commit Graph
10 Commits
Author SHA1 Message Date
sudacode 10424a57d5 fix(plugins): tag cards with the episode playing when they were added
- episode-tags: match each note id to the file history instead of the current media, so late card-mined events (YouTube media, field grouping) get the right episode
- episode-tags: group notes per file into one addTags call; skip cards added before the plugin started
- auto-jimaku: track a generation counter so a pending check goes stale when the same file reloads
- docs: describe the per-card episode matching in plugins.md
2026-10-27 22:41:32 -07:00
sudacode 15f32b10c7 feat(plugins): add episode-tags and auto-jimaku example plugins
- episode-tags: tag mined cards with show/episode parsed from the file name or stream title
- auto-jimaku: open Jimaku search when a file starts without a Japanese subtitle track
- Hold card-mined for notes merged into a note still waiting on queued YouTube media
- Route YouTube media settle reports through reportCardsReady
- Document both plugins in docs-site and changelog fragment
2026-10-27 22:31:34 -07:00
sudacode 390cf03e8d fix(plugins): report merged card-mined ids as the kept note
- Resolve note ids merged away by field grouping to the surviving note before emitting card-mined, deduplicating results
- Update plugin docs and setCardsReadyCallback comment to match
2026-10-27 22:16:24 -07:00
sudacode d2ab808bc3 fix(plugins): delay card-mined until field grouping and YouTube media
- Hold a sentence card's ready report until field grouping finishes
- Report cards waiting on queued YouTube media once it is applied or the download fails
- Proxy reports added notes ready right away when auto-update is off
- Polling keeps enriching the rest of a batch after one note fails
- Update plugin and architecture docs
2026-10-27 21:35:57 -07:00
sudacode ff012f0497 feat(plugins): add Anki card-mined event, AnkiConnect invoke, anki-sync
- Add ctx.anki.on('card-mined') fed by polling, proxy, and card creation once enrichment finishes
- Add ctx.anki.invoke to send one AnkiConnect action to the effective url with no retries
- Ship example anki-sync plugin that syncs to AnkiWeb after mining goes quiet or playback ends
- Unload plugins that finish activating after unloadAll gave up on them
- Document the Anki API and anki-sync plugin in docs-site and architecture docs
2026-10-27 20:04:34 -07:00
sudacode 4bb85f19bc fix(plugins): unload late-loading plugins before quit teardown
- unloadAll waits for an in-progress load so plugins still activating get deactivated too
- One 2 s budget covers the load wait and all deactivates
- Quit cleanup awaits plugin unload before any other teardown
- Force-quit timer now allows the plugin budget plus 2 s
2026-10-27 00:33:29 -07:00
sudacode 7a526531d7 fix(plugins): await plugin unload on quit with deactivate timeout
- Move plugin unload into the will-quit cleanup handler so it starts first and quit waits for it
- Give each plugin's deactivate 3 s (configurable via deactivateTimeoutMs) before disposing it anyway
- Document the quit timeout in docs-site/plugins.md
2026-10-26 23:22:25 -07:00
sudacode d5fb43caa3 feat(plugins): add plugin windows, CLI actions, and data dirs
- Add `--plugin-action <id>/<name>` CLI flag, dispatched via runPluginAction
- Add ctx.ui.openWindow for plugin-owned BrowserWindows with sandboxed preload
- Add ctx.dataDir (`plugin-data/<id>/`), ctx.actions.run, ctx.mpv.ensureRunning
- Emit mpv end-file events to plugins with reason, entry id, and error
- Run Windows .cmd/.bat shims through cmd.exe in exec, killing the tree on abort
- Update plugin docs, usage, architecture notes, and e2e coverage
2026-10-26 22:40:25 -07:00
sudacode 0f53b8beca fix(plugins): SIGKILL exec children that ignore SIGTERM
- Escalate timed-out or aborted plugin exec children to SIGKILL after a grace period
- Move ai-explain example to assets/plugins and convert it to CommonJS
- Update plugin docs for the new path and the .js/.mjs module formats
2026-10-26 21:55:51 -07:00
sudacode ca534cd232 feat(plugins): add JavaScript plugin system with overlay panel
- Load plugins from <config dir>/plugins/<id>/ when enabled under `plugins` in config
- Expose ctx with mpv events/commands, timers, subtitle context, actions, notify, exec, and panel
- Bind plugin actions via `__plugin-action:<id>/<action>` keybindings (runPluginAction session action)
- Add plugin-panel modal with markdown rendering; closing aborts the panel signal
- Add ai-explain example plugin that queries `codex exec` for the current line
- Add e2e harness `files` option and plugin e2e scenario; document plugins in docs-site and internal docs
2026-10-26 21:38:51 -07:00