feat: saved import presets for bulk fetch - #91
Conversation
Capture the full fetch-modal configuration (collections, tag filter +
match type, content types, subcollections, vault path, append tags,
filename, new-only/update, template overrides) as named presets stored
in plugin data. A Presets section at the top of the fetch modal loads,
saves, and deletes presets, and each preset gets its own command-palette
entry ("Fetch: {name}") that is re-registered as presets change.
Backward compatible: existing saved settings without importPresets
default to an empty list, and modal defaults are unchanged.
Generated with Codebuff 🤖
Co-Authored-By: Codebuff <noreply@codebuff.com>
This comment was marked as resolved.
This comment was marked as resolved.
Reset modal fields to defaults when the preset selection is cleared, add an Import Presets management section (rename/delete) to the settings tab, and document the feature in CHANGELOG and product specs. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Re-review findingsRe-reviewed PR #91 through Devin’s latest commit Verification
MEDIUM — failed save/rename operations leave stale in-memory state
The modal save flow assigns Please snapshot and restore the previous state when LOW — preset records are only shallowly validated
LOW — focus is lost after preset selection
Selecting a preset rebuilds the full modal and loses the current focus position. Restoring focus to the preset dropdown would improve keyboard and screen-reader usability. No CRITICAL or HIGH findings remain. The PR is otherwise safe from the reviewed security and performance perspectives. I recommend addressing the MEDIUM persistence rollback issue before merge. |
… focus Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
All three addressed in 683dd46. MEDIUM — stale in-memory state on failed save/rename: LOW — shallow preset validation: added LOW — focus lost after preset selection: the modal sets a Build, lint, secret scan pass; 335 tests pass. |
Pull Request Summary by devActivityMetricsAchievements
|
Summary
Adds saved import presets for the bulk fetch workflow. Users can capture the full fetch-modal configuration as a named preset and reuse it in one click — no more re-entering collections, tag filters, folders, and toggles on every import.
What's included
RaindropFetchModal): a dropdown listing saved presets plus a Save current as preset and Delete preset action. Selecting a preset applies all captured options and re-renders the modal.Fetch: {preset name}command, re-registered automatically when presets are created, updated, or deleted (viaPlugin.removeCommand, available since Obsidian 1.7.2; pluginminAppVersionis 1.13.0).importPresetToOptions()keeps the live modal fetch and command fetches in lockstep.importPresetsdefault to an empty list; modal defaults are unchanged.Verification
npm run build(tsc + esbuild) — cleannpm run lint— cleannpx jest— 21 suites, 324 tests passing (new coverage for preset rendering/apply/snapshot,SavePresetModal,upsertPresetid stability, and command registration)Notes
importPresetsadded to the settings schema (defaults to[]).modals.ts/main.ts/ plugin-data patterns.