Repository navigation
feat(add): read back the created item and print it as show does - #332
Merged
Merged
Conversation
things:///add returns no uuid, so add and project add now find the item they created (same type and title, created after the write started, not there before it) and print it through printItem. A dropped add exits non-zero and says to search before retrying. Two candidates, --no-verify, or an unreadable database print an unconfirmed line and exit 0.
… errors Poll two more rounds after the first match, so a same-titled item saved a moment later is reported as ambiguous instead of missed. A read error that lasts to the deadline now warns and prints the unconfirmed line (exit 0) rather than failing. The not-found hint shell-quotes the title. Also correct the docs that said write commands print nothing, and the README's read-back lines.
This was referenced Oct 3, 2026
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.
editandproject editconfirm their write and print the item, butaddandproject addprinted nothing. Now they find the item they created and print it the waythings showdoes. This is a follow-up to #280.Visible change
things addandthings project addnow print to stdout. Before, they printed nothing.things show <uuid>does, in plain text and under--json.--verify-timeout), they exit non-zero withadd not confirmed: …and tell you to runthings searchbefore retrying.--no-verify(orno_verify = true) skips the read-back. It printsSent to Things, not confirmed (--no-verify): "<title>", or under--jsonit prints{"title", "confirmed": false, "reason": "no-verify"}.How the item is found
things:///addreturns no UUID, so the CLI looks for the item.TasksCreatedSincefor an item of the right type with the same title (whitespace trimmed) that was not there before.rt1_repeatingTemplate, probed like the recurrence column).What happens in each case:
printItem, likethings show.--jsonthe reason isambiguousandcandidateslists the UUIDs.unreadable, and exits 0.Out of scope
import, which already reads back its status changes.--listor--headingdidn't resolve.Docs
commands.md(Capturing, and the verify-timeout paragraph)agents.mdconfiguration.md(theno_verifyrow and the agent notes)SKILL.md--no-verifyflag helpTests
New
cmd/things/add_test.go:addandproject addprint the same output asshow, plain and--json--no-verifyand an unreadable database give the unconfirmed output, with nouuidThe template and instance cases fail when their filters are removed. Existing tag tests that call
addand aren't about the read-back now pass--no-verify.make testandmake lintpass.Not verified: