feat(cli): claw -i files the ticket through the server - #96
Merged
Conversation
claw -i stops writing the db and running triage in its own process: it resolves the project key (read-only), ensures a server (autospawning one if needed), POSTs the title, and prints OK. The server opens the ticket and triages it behind the response, so -i returns at once and shows only the confirmation. claw -c stays local — it is the bootstrap that creates the db a server later opens, and needs no server. Verified live: fire-and-forget, issue created, returns in the same second.
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.
What
Folds the last frequent CLI writer behind the server.
claw -istops opening the project db and running triage in its own process — it hands the ticket to the server and returns.ServerClient::openIssue()—POST /api/projects/{key}/issueswith{"title"}, returns the new id from the 201 (400 surfaces the server's reason).WorkflowMode::createIssue()— resolves the project key (read-only), ensures a server (autospawning one if none answers), posts the title, printsOK — issue #N opened.triage()(and its now-unused imports); the server already triages behind its create response.Behaviour
claw -i "…"returns immediately with the confirmation — the server opens the ticket and triages it behind the response, exactly as the dashboard's create button already does, so a model being slow or down never costs the user the ticket or their prompt. The old inline output (issue detail + triage verdict) is gone by design; the verdict lands on the board/claw log.claw -cstays local — deliberatelyProject creation is not routed through the server: it is the bootstrap that creates the very db a server later opens, it must work before any server exists, and the server's
POST /api/projectsonly creates folders inside the workspace while-cregisters any folder. Making it server-dependent would break that for no gain —-cis a one-shot local write with no concurrent writer.Verified live
claw -i "…"on a cold workspace: autospawned a server, opened issue #10, printedOK — issue #10 opened., and returned in the same second (triage running behind it on the server).Checks
composer qagreen — cs, PHPStan level 8, Testo (463 tests). New tests:openIssuereturns the id and carries the title; a 400 surfaces the server's reason.