chore(output): say task, not to-do, in the --json error kind - #231
Merged
Merged
Conversation
The kind field spelled one concept two ways: task everywhere except the not a project failure, which said to-do, while type on a task row has said task since #214. Settle on task, the word the CLI uses elsewhere. kind feeds the rendered message as well as the JSON, so the plain-text error moves with it. The value has never shipped: it arrived in #193, after v0.7.0, so no published contract changes. Import payloads keep to-do. That is Things' own URL scheme format, and it stays documented as the exception, now with a line in the skill's --json section saying so. Closes #219
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.
Closes #219
The
--jsonerror payload spelled one concept two ways.kindwas"task"everywhere except thenot a projectfailure, where it was"to-do", whiletypeon a task row has said"task"since #214. One word wins, and that word istask.What changed
ProjectEditCmd.Runnow builds itswrongKindErrorwithKind: "task". That field feeds both the JSONkindand the rendered message, so the message moves with it:"Post letter" is a task; use things edit. Every other producer already saidtask,project,areaortag.The docs that print or explain the payload follow: the error-payload example in the bundled skill, the token paragraph on the agents page, and the README paragraph explaining what
kindcarries. The skill gains a one-line note in its--jsonsection saying a to-do is ataskin every JSON value the CLI emits, namingimportpayloads as the one exception.commands.mdandconfiguration.mdare untouched. Neither documents the error payload, and no command or flag changed.Not a breaking change
kind: "to-do"was introduced in #193, which is not an ancestor ofv0.7.0. The value has never appeared in a release, so no published contract moves and there is nothing for the 0.8.0 notes to warn about. That is the same reasoning #223 applied to thetyperename. Theerrortoken is untouched either way: it staysnot a project.Out of scope, deliberately
importpayloads still spell a to-do"to-do". That is Things' own JSON URL scheme format and it stays documented as the exception.Three other
kindvariables hold"to-do"and were left alone, because none of them reaches JSON. They only compose English prose: the repeating-item refusal inverify.go, the per-item refusal line inimportcheck.go, and the agent brief's opening sentence ininternal/output/agent.go. The issue scopes itself to JSON values, and renaming these would rewrite prose and its tests well outside that. The new comment on theKindfield says so explicitly, so the next reader does not take the rule as wider than it is.How tested
make testandmake lintboth green.TestRunProjectEditRefusesTodoReferenceasserts the newkindand message and carries a comment saying why. The built binary was run against the live Things database to confirm the payload it prints.