From c2ba1d8f25463bf6342ac635850500a9738b31e9 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 1 Jun 2026 17:33:09 -0500 Subject: refactor: rename saved-query surface to local-view vocabulary I renamed Pearl's "saved query" surface to the local/Linear view vocabulary, with no obsolete aliases, since Pearl has no users to protect. The defcustom pearl-saved-queries is now pearl-local-views. The commands pearl-run-saved-query, pearl-delete-saved-query, pearl-sync-saved-query-to-linear, pearl-run-view, and pearl-publish-current-source become pearl-run-local-view, pearl-delete-local-view, pearl-publish-local-view, pearl-run-linear-view, and pearl-publish-current-view. User-facing prompts, messages, and docstrings drop "saved query" for "local view", and the publish command reads "publish" instead of "sync". Internal GraphQL and helper names keep their "query" terms, which a user never sees. A naming-regression test asserts the new symbols exist, the old ones are gone rather than aliased, and no public command exposes "query". Phase 1 of docs/local-and-linear-views-spec.org. No behavior change. Suite, compile, and lint are green. --- tests/test-pearl-saved.el | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tests/test-pearl-saved.el') diff --git a/tests/test-pearl-saved.el b/tests/test-pearl-saved.el index 88bf468..d5f14e0 100644 --- a/tests/test-pearl-saved.el +++ b/tests/test-pearl-saved.el @@ -1,4 +1,4 @@ -;;; test-pearl-saved.el --- Tests for saved queries + sort -*- lexical-binding: t; -*- +;;; test-pearl-saved.el --- Tests for local views + sort -*- lexical-binding: t; -*- ;; Copyright (C) 2026 Craig Jennings @@ -19,8 +19,8 @@ ;;; Commentary: -;; Tests for local saved queries and the sort layer: the client-side -;; `--sort-issues', the sort->orderBy mapping, and `pearl-run-saved-query' +;; Tests for local views and the sort layer: the client-side +;; `--sort-issues', the sort->orderBy mapping, and `pearl-run-local-view' ;; threading the filter, source, and order through. ;;; Code: @@ -69,8 +69,8 @@ ;;; run-saved-query (ert-deftest test-pearl-run-saved-query-threads-filter-and-source () - "Running a saved query compiles its filter and renders with a sorted source." - (let ((pearl-saved-queries + "Running a local view compiles its filter and renders with a sorted source." + (let ((pearl-local-views '(("My bugs" :filter (:labels ("bug") :open t) :sort priority :order asc))) (built nil) (rendered-source nil) (order nil)) (cl-letf (((symbol-function 'pearl--build-issue-filter) @@ -80,7 +80,7 @@ (funcall cb (pearl--make-query-result 'ok :issues nil)))) ((symbol-function 'pearl--render-query-result) (lambda (_result source) (setq rendered-source source)))) - (pearl-run-saved-query "My bugs") + (pearl-run-local-view "My bugs") (should (equal '(:labels ("bug") :open t) built)) (should (eq 'priority (plist-get rendered-source :sort))) (should (eq 'asc (plist-get rendered-source :order))) @@ -89,8 +89,8 @@ (ert-deftest test-pearl-run-saved-query-unknown-errors () "An unknown saved-query name signals a user error." - (let ((pearl-saved-queries '(("Known" :filter (:open t))))) - (should-error (pearl-run-saved-query "Missing") :type 'user-error))) + (let ((pearl-local-views '(("Known" :filter (:open t))))) + (should-error (pearl-run-local-view "Missing") :type 'user-error))) ;;; render applies the source sort -- cgit v1.2.3