Skip to content

feat: reopen resolved items + search returns empty on no match - #32

Merged
kacheo merged 3 commits into
mainfrom
feat/reopen-and-search-empty
Jul 17, 2026
Merged

kacheo merged 3 commits into
mainfrom
feat/reopen-and-search-empty

Conversation

@kacheo

@kacheo kacheo commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Two small, self-contained good first issues shipped together.

#28 — search returns empty instead of erroring on no match

devlog search <query> now treats a no-match as a normal empty outcome (exit 0), not a failure — friendlier for scripting and AI-agent use.

  • Text mode: prints nothing, exit 0.
  • --json: emits [] (guarded against a nil slice marshaling to null), exit 0.
  • Genuine errors (bad flags, unknown --section, config/store failures) still exit nonzero.

#26devlog reopen <id>

The inverse of resolve. Clears Resolved and ResolvedAt, matching by full UUID or 8-char prefix. Reopening an already-unresolved item is idempotent.

  • New Store.ReopenItem mirroring ResolveItem (reuses modifyItems / matchesID).
  • New cmd/reopen.go mirroring cmd/resolve.go.

Testing

  • go test ./... passes for touched packages (cmd, internal/store). A pre-existing failure in internal/git (TestGetOriginSlug_WithGitHubRemote) is unrelated to this change and fails identically on main.
  • make lint — 0 issues.
  • go build + end-to-end smoke tests verified: no-match text/JSON (exit 0), bad section (exit 1), and the full resolve → reopen → unresolved roundtrip plus reopen-nonexistent (exit 1).

Closes #28
Closes #26

🤖 Generated with Claude Code

kacheo and others added 3 commits July 16, 2026 18:03
devlog search now treats a no-match as a normal, empty outcome (exit 0)
rather than a failure. Text mode prints nothing; --json emits [] (guarding
against a nil slice marshaling to null). Genuine errors — bad flags,
unknown --section, config/store failures — still exit nonzero.

Closes #28

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Adds Store.ReopenItem (the inverse of ResolveItem): clears Resolved and
ResolvedAt, matching by full UUID or 8-char prefix. New `devlog reopen <id>`
command mirrors `resolve`. Reopening an unresolved item is idempotent.

Closes #26

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Addresses code review on PR #32:
- Add `reopen` to the command list and a dedicated section in the user guide.
- Add a store test asserting ReopenItem on a never-resolved item is a no-op.
- Use len()==0 (not ==nil) when normalizing empty search results to [].

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kacheo
kacheo merged commit 9bdd81b into main Jul 17, 2026
2 of 4 checks passed
@kacheo
kacheo deleted the feat/reopen-and-search-empty branch July 17, 2026 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

search: return empty result instead of an error on no match Reopen a resolved blocker/action item

1 participant