Skip to content

Add core API support for standalone task clients - #212

Merged
marcus merged 5 commits into
marcus:mainfrom
jubishop:worktree-browserView
Sep 30, 2026
Merged

marcus merged 5 commits into
marcus:mainfrom
jubishop:worktree-browserView

Conversation

@jubishop

Copy link
Copy Markdown
Contributor

Standalone task clients need to identify the active td project, detect supported API features, and save changes while agents are editing the same tasks. This adds the core API support used by tdb, whose browser UI is maintained separately.

For example, a client can read an issue's revision and send it in If-Match when saving. If an agent has changed that issue in the meantime, the API returns 409 conflict, preserving the saved change and allowing the client to reconcile its draft. The header is optional for existing clients.

Changes

  • Add GET /v1/project for project identity, session, title limits, and API capabilities. Add base_dir to td info --json so clients can resolve worktrees and .td-root through td.
  • Add issue revisions and conditional writes for edits, deletion, workflow transitions, and review decisions. Database snapshot checks run under the write lock, including transactional approval and closure using a recorded review. CORS permits If-Match.
  • Add POST /v1/boards/{id}/move to order tasks by an issue anchor, including boards without explicit positions, while retaining action history.
  • Include direct children in issue details, reject parent cycles, and retain sprint metadata on creation.
  • Make td serve honor context cancellation, close live event streams during shutdown, and remove only its own port file.

Validation

  • Tests, cross-platform builds, lint, and the documentation build pass on 0aa2e85: Go CI, documentation CI.
  • Local validation recorded for this revision includes full make test, focused race tests, Go build, go vet ./..., formatting checks, and Linux lint with golangci-lint v2.13.1.
  • Regression coverage includes stale writes and review decisions, child revision fidelity, transactional rollback, board moves, parent cycles, project metadata, and shutdown with an active event stream.
  • Standalone tdb integration checks covered creation, editing, live CLI changes, preserved drafts, explicit conflict reconciliation, and owned-server shutdown.

Prepared and reviewed in jubishop/td#1.

# Conflicts:
#	go.mod
#	internal/serve/handlers_read.go
#	internal/serve/handlers_transitions.go
#	internal/serve/handlers_write.go
#	internal/serve/response.go
Keep live refreshes and late save responses from replacing drafts, search full task descriptions, recover stale task bookmarks, and update Goldmark with advisory regression coverage.
@marcus
marcus merged commit 3ca4d4a into marcus:main Sep 30, 2026
4 checks passed
@jubishop
jubishop deleted the worktree-browserView branch September 30, 2026 05:01
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.

2 participants