From 9b9a264edb0c208892fcfe5101912d00858de766 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 1 Jun 2026 18:21:47 -0500 Subject: feat(views): save a Linear view locally via the reverse-compile (copy down) I implemented copy-down, the one direction that needed real engine work. A live probe showed CustomView.filterData is readable but stored as Linear's and/or view-filter tree, not the flat IssueFilter Pearl emits, so pearl--reverse-compile-issue-filter is a normalize-then-match: it flattens the top-level and, unwraps single-branch and/or, reads a one-element in as a scalar, then matches each conjunct to one authoring key. Every helper returns (ok . plist) or (refuse . reason). The contract follows the spec's dimension table: distinct :state and :state-type, canonical numeric :priority, :open t mapped from the exact open-state nin while generic nin refuses, and a multi-value in on any singular key refuses rather than silently narrow the view. Anything outside Pearl's AND-only model refuses with a structured reason that names the construct. pearl-save-linear-view-locally lists favorited Linear views, fetches the chosen view's filterData through a small async helper, reverse-compiles it, and saves a forked local view through pearl--save-local-view: no tracking link, :copied-from-view-id provenance only, active account stamped. On a refusal it points the user at pearl-run-linear-view; on success it states the fork's independence. Bound at f d (down) and the transient Views column. Phase 6 of the views spec. 30 tests cover per-dimension round-trips (build->encode->read bridge), normalize-from-real-JSON trees, the full refusal set, and the command-side. Suite, compile, and lint are green. --- tests/test-pearl-naming.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/test-pearl-naming.el') diff --git a/tests/test-pearl-naming.el b/tests/test-pearl-naming.el index 41077e9..383b913 100644 --- a/tests/test-pearl-naming.el +++ b/tests/test-pearl-naming.el @@ -33,8 +33,11 @@ pearl-delete-local-view pearl-publish-local-view pearl-publish-current-view - pearl-run-linear-view) - "Public commands the rename introduces.") + pearl-run-linear-view + pearl-create-local-view + pearl-edit-local-view + pearl-save-linear-view-locally) + "Public commands the rename and the new phases introduce.") (defconst test-pearl-naming--old-symbols '(pearl-saved-queries -- cgit v1.2.3