diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-28 09:12:41 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-28 09:12:41 -0500 |
| commit | c8b9ad1b72c60f87c15e942f17f7ff1066a41cb2 (patch) | |
| tree | 714d360d2f0dc9e565f04ac67a7bd784650fd2bc /tests/run-coverage-file.el | |
| parent | 60a026be803e4fb2e56520dd9e2cc72ba6bfc0e3 (diff) | |
| download | pearl-c8b9ad1b72c60f87c15e942f17f7ff1066a41cb2.tar.gz pearl-c8b9ad1b72c60f87c15e942f17f7ff1066a41cb2.zip | |
feat(view-sync): extend pearl-delete-saved-query with delete-on-Linear prompt
Phase 3 of docs/saved-query-sync-spec.org. pearl-delete-saved-query on a synced entry (one carrying :linear-view-id) now asks a second question after the local-delete confirmation: also delete the linked Linear view? Yes calls customViewDelete, no unlinks only and leaves the Linear view in place. Local-only entries take the unchanged single-prompt path.
If customViewDelete fails on the API side, a fallback yes-or-no prompt asks whether to drop the local entry anyway. Accepting orphans the Linear view, and the success message names the view id explicitly so the user can clean it up by hand. The same view-id-in-message pattern fires on the timeout branch, since a timeout doesn't tell us whether the delete actually completed server-side.
I added pearl--customview-delete-async (the mutation, parallel to the create and update helpers from Phase 2) and pearl--delete-saved-query-local (factors the cl-remove + customize-save-variable that both the local-only and the synced-unlink branches need). The new pearl--delete-saved-query-do-linear-delete carries the API path so the top-level command stays readable.
I added 7 tests in test-pearl-saved-query-sync.el covering the customViewDelete success and failure parses, the synced yes/yes path (API call fires + local removed), the synced yes/no path (unlink only, no API call), the API-failure-then-delete-anyway path (orphan message names the view id), the API-failure-then-keep path (asserts the API call fired so a refactor can't silently route through the unlink branch), and the local-only entry unchanged path. The existing pearl-delete-saved-query tests in test-pearl-adhoc.el stay green. Their fixtures don't carry :linear-view-id, so they take the local-only branch. 638 tests total green. make compile and make lint clean.
Diffstat (limited to 'tests/run-coverage-file.el')
0 files changed, 0 insertions, 0 deletions
