T-985N-vault-ontogen-ops
State: planning/draft · Impact: medium · Complexity: medium
Expose the vault feature to the frontend as the minimal ontogen op set, in one PR, so the generated transports change once.
| Location | Role today |
|---|---|
apps/pumice/src-tauri/src/api/v1/vault.rs | get_config, set_path, set_template, reset_template, render_preview |
apps/pumice/src-tauri/src/schema/vault.rs | wire VaultConfig { vault_path, template } |
apps/pumice/src-nuxt/app/utils/browser-mock.ts | one handler per IPC command; a missing one throws |
apps/pumice/src-nuxt/app/stores/settings.ts | loadVaultConfig, setVaultPath, saveTemplate, resetTemplate, renderPreview |
solutions/determined/crates/determined-platform/src/openers.rs | the reveal rule and eligibility predicate to port |
Proposed
Section titled “Proposed”Ops: get_config, set_config, detect_flavor (stateless),
candidate_vaults, render_preview(PreviewRequest), write_session(id),
open(OpenRequest), list_openers(path) (stateless), create_sample_base
(generated from the property config). render_preview renders the template
of the current write mode.
set_path, set_template, reset_template removed. path-opener is a
direct dependency of src-tauri. Every op has a browser-mock.ts handler
and a settings-store method.
Approach
Section titled “Approach”- Wire structs in
schema/vault.rswithspecta::Type. - Ops in
api/v1/vault.rs; opener helpers insrc-tauri/src/openers.rsciting the determined-platform port. cargo buildto regenerate; commit generated output.- Mock handlers and store methods; a
vault:*event listener in the store.
| Area | Note |
|---|---|
apps/pumice/src-tauri/src/api/v1/vault.rs | new op set |
apps/pumice/src-tauri/src/schema/vault.rs | wire types |
apps/pumice/src-tauri/src/openers.rs | path-opener helpers |
apps/pumice/src-tauri/Cargo.toml | path-opener, dir-aspect |
apps/pumice/src-tauri/src/api/transport/http/generated.rs | regenerated |
apps/pumice/src-tauri/src/api/transport/ipc/generated.rs | regenerated |
apps/pumice/src-nuxt/app/generated/ | regenerated |
apps/pumice/src-nuxt/app/utils/browser-mock.ts | handlers |
apps/pumice/src-nuxt/app/stores/settings.ts | methods and events |
Acceptance criteria
Section titled “Acceptance criteria”-
moon run pumice:codegen-driftis clean. -
CAPTURE_SHOTS=1 bunx playwright test tests/e2e/capture-appearance.e2e.tsreports no missing mock handler. -
openon a note inside an Obsidian vault launches Obsidian on macOS.
Out of scope
Section titled “Out of scope”- Extracting the opener catalog to a shared crate (T-I2MG-opener-catalog-extraction); this task ports the forty lines it needs.
- Wiring the ops into settings or session UI (T-TJCU-vault-settings-ungated-open-note).
- A backfill op (T-20QT-vault-backfill-past-sessions).