feat: reopen resolved items + search returns empty on no match - #32
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.--json: emits[](guarded against a nil slice marshaling tonull), exit 0.--section, config/store failures) still exit nonzero.#26 —
devlog reopen <id>The inverse of
resolve. ClearsResolvedandResolvedAt, matching by full UUID or 8-char prefix. Reopening an already-unresolved item is idempotent.Store.ReopenItemmirroringResolveItem(reusesmodifyItems/matchesID).cmd/reopen.gomirroringcmd/resolve.go.Testing
go test ./...passes for touched packages (cmd,internal/store). A pre-existing failure ininternal/git(TestGetOriginSlug_WithGitHubRemote) is unrelated to this change and fails identically onmain.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