summaryrefslogtreecommitdiff
path: root/docs/plans/2026-04-09-journal-open-narrowing-implementation.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/plans/2026-04-09-journal-open-narrowing-implementation.md')
-rw-r--r--docs/plans/2026-04-09-journal-open-narrowing-implementation.md85
1 files changed, 0 insertions, 85 deletions
diff --git a/docs/plans/2026-04-09-journal-open-narrowing-implementation.md b/docs/plans/2026-04-09-journal-open-narrowing-implementation.md
deleted file mode 100644
index 59a80de..0000000
--- a/docs/plans/2026-04-09-journal-open-narrowing-implementation.md
+++ /dev/null
@@ -1,85 +0,0 @@
-# Journal Open Narrowing Implementation Plan
-
-> **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
-
-**Goal:** Make `ss-open-journal` narrow to today's subtree when today's journal entry exists, while preserving the current fallback when it does not.
-
-**Architecture:** Add focused ERT coverage for the journal-open helper in `tests/`, then update `lisp/ss-org.el` so it widens first, reuses the existing `ss-journal-goto-date` lookup, and narrows only on the successful path. Keep the missing-entry case unchanged by leaving point at the end of the journal buffer without creating new headings.
-
-**Tech Stack:** Emacs Lisp, ERT, batch Emacs verification
-
----
-
-### Task 1: Add failing journal-open test
-
-**Files:**
-- Modify: `tests/ss-capture-tests.el`
-- Modify: `lisp/ss-org.el`
-
-**Step 1: Write the failing test**
-
-```elisp
-(ert-deftest ss-open-journal-narrows-to-today-when-entry-exists ()
- ...)
-```
-
-**Step 2: Run test to verify it fails**
-
-Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit`
-Expected: FAIL because `ss-open-journal` currently widens and jumps, but does not narrow.
-
-**Step 3: Write minimal implementation**
-
-```elisp
-(when (ss-journal-goto-date)
- (org-narrow-to-subtree))
-```
-
-**Step 4: Run test to verify it passes**
-
-Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit`
-Expected: PASS, with the fallback case still leaving the buffer widened at end of file.
-
-**Step 5: Commit**
-
-```bash
-git add tests/ss-capture-tests.el lisp/ss-org.el
-git commit -m "Narrow journal open to today"
-```
-
-### Task 2: Run regression verification
-
-**Files:**
-- Review: `README.md`
-- Verify: `lisp/ss-org.el`
-
-**Step 1: Write the failing test**
-
-```elisp
-(ert-deftest ss-open-journal-falls-back-to-end-when-today-missing ()
- ...)
-```
-
-**Step 2: Run test to verify it fails**
-
-Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -f ert-run-tests-batch-and-exit`
-Expected: FAIL until the fallback remains explicitly covered.
-
-**Step 3: Write minimal implementation**
-
-```elisp
-(unless (ss-journal-goto-date)
- (goto-char (point-max)))
-```
-
-**Step 4: Run test to verify it passes**
-
-Run: `emacs --batch -Q -L . -L lisp -l tests/ss-capture-tests.el -l tests/ss-crm-tests.el -f ert-run-tests-batch-and-exit`
-Expected: PASS, then run `emacs --batch -Q --load ./init.el` to confirm startup remains healthy.
-
-**Step 5: Commit**
-
-```bash
-git add tests/ss-capture-tests.el lisp/ss-org.el README.md
-git commit -m "Preserve journal open fallback"
-```