Vault import dialog in the pond settings #118

Closed
opened 2026-07-14 16:36:41 +02:00 by fable-5 · 1 comment
Collaborator

Context

Pond admins need the UI: upload the vault ZIP and set the import options the backend expects. Today's sidebar ImportControl has neither a parent picker nor label selection — the vault flow gets its own admin section.

Scope

  • New "Import Obsidian vault" section on PondSettingsPage (admin-visible, like the other admin sections) opening a dialog: ZIP file input, indented parent-page picker (extract/reuse the picker from MovePageDialog), label multi-select over the pond's label tree (reuse use-pond-labels), frontmatter radio (strip / preserve as code block).
  • Submit → POST /ponds/:id/import/vault; poll GET /jobs/:id (extend the use-import.ts pattern with a larger poll budget — vaults take longer than single files); render queued/converting/succeeded/failed with the translated errorCode and a retry.
  • On success: link to the mount page, invalidate ['pages'], ['pond-links'], ['phantom-links'], and the labels query so the sidebar tree, graph, and label pickers show the import without a reload.
  • i18n de+en.

Acceptance criteria

  • Admin sees the section, a plain editor does not; the dialog requires a file and defaults to frontmatter strip.
  • Progress states render; a failed import shows the translated error and offers retry.
  • After success the sidebar folder view shows the imported hierarchy and the chosen labels are visible — without a manual reload.

Technical notes

apps/web/src/pages/PondSettingsPage.tsx, new apps/web/src/import/VaultImportDialog.tsx, apps/web/src/import/use-import.ts, apps/web/src/pages/MovePageDialog.tsx (picker extraction), i18n namespace import.

Dependencies

Requires #117 (API contract; UI work can start against the agreed DTO).

Size

~1.5 days.

## Context Pond admins need the UI: upload the vault ZIP and set the import options the backend expects. Today's sidebar `ImportControl` has neither a parent picker nor label selection — the vault flow gets its own admin section. ## Scope - New "Import Obsidian vault" section on `PondSettingsPage` (admin-visible, like the other admin sections) opening a dialog: ZIP file input, indented parent-page picker (extract/reuse the picker from `MovePageDialog`), label multi-select over the pond's label tree (reuse `use-pond-labels`), frontmatter radio (strip / preserve as code block). - Submit → `POST /ponds/:id/import/vault`; poll `GET /jobs/:id` (extend the `use-import.ts` pattern with a larger poll budget — vaults take longer than single files); render queued/converting/succeeded/failed with the translated `errorCode` and a retry. - On success: link to the mount page, invalidate `['pages']`, `['pond-links']`, `['phantom-links']`, and the labels query so the sidebar tree, graph, and label pickers show the import without a reload. - i18n de+en. ## Acceptance criteria - [ ] Admin sees the section, a plain editor does not; the dialog requires a file and defaults to frontmatter `strip`. - [ ] Progress states render; a failed import shows the translated error and offers retry. - [ ] After success the sidebar folder view shows the imported hierarchy and the chosen labels are visible — without a manual reload. ## Technical notes `apps/web/src/pages/PondSettingsPage.tsx`, new `apps/web/src/import/VaultImportDialog.tsx`, `apps/web/src/import/use-import.ts`, `apps/web/src/pages/MovePageDialog.tsx` (picker extraction), i18n namespace `import`. ## Dependencies Requires #117 (API contract; UI work can start against the agreed DTO). ## Size ~1.5 days.
fable-5 added this to the M13 — Create-from-link & Obsidian import milestone 2026-07-14 16:36:41 +02:00
fable-5 added the
frontend
label 2026-07-14 16:36:41 +02:00
Author
Collaborator

Implemented in 704ebe4. An admin-only 'Import an Obsidian vault' section in the pond settings opens a dialog with the ZIP input, an indented mount-parent picker over the page tree, a label multi-select, and the frontmatter radio. It uploads, polls the job with a vault-sized budget, invalidates pages/graph/phantom-links/labels so everything shows without a reload, and links to the mount page. apiUploadFile now takes extra multipart fields. import-vault.spec.ts drives the whole flow in the browser.

Implemented in 704ebe4. An admin-only 'Import an Obsidian vault' section in the pond settings opens a dialog with the ZIP input, an indented mount-parent picker over the page tree, a label multi-select, and the frontmatter radio. It uploads, polls the job with a vault-sized budget, invalidates pages/graph/phantom-links/labels so everything shows without a reload, and links to the mount page. `apiUploadFile` now takes extra multipart fields. `import-vault.spec.ts` drives the whole flow in the browser.
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwaidele/dorfteich#118
No description provided.