Skip to content

feat(cli): claw -i files the ticket through the server - #96

Merged
EdmondDantes merged 1 commit into
mainfrom
feat/cli-i-thin-client
Jul 27, 2026
Merged

feat(cli): claw -i files the ticket through the server#96
EdmondDantes merged 1 commit into
mainfrom
feat/cli-i-thin-client

Conversation

@EdmondDantes

Copy link
Copy Markdown
Contributor

What

Folds the last frequent CLI writer behind the server. claw -i stops 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}/issues with {"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, prints OK — issue #N opened.
  • Removed the CLI's inline 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 -c stays local — deliberately

Project 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/projects only creates folders inside the workspace while -c registers any folder. Making it server-dependent would break that for no gain — -c is a one-shot local write with no concurrent writer.

Verified live

claw -i "…" on a cold workspace: autospawned a server, opened issue #10, printed OK — issue #10 opened., and returned in the same second (triage running behind it on the server).

Checks

composer qa green — cs, PHPStan level 8, Testo (463 tests). New tests: openIssue returns the id and carries the title; a 400 surfaces the server's reason.

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.
@EdmondDantes
EdmondDantes merged commit 373c338 into main Jul 27, 2026
2 checks passed
@EdmondDantes
EdmondDantes deleted the feat/cli-i-thin-client branch July 27, 2026 19: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.

1 participant