Skip to content

feat!: write-through to Jira by default - #17

Merged
sthadka merged 2 commits into
mainfrom
feat/write-through-default
Aug 3, 2026
Merged

feat!: write-through to Jira by default#17
sthadka merged 2 commits into
mainfrom
feat/write-through-default

Conversation

@sthadka

@sthadka sthadka commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • jai set, jai comment: now push changes to Jira immediately instead of queuing locally. Errors surface at command time, not at jai push time.
  • jai transition: calls ExecuteTransition directly instead of queuing then calling ProcessQueue (which had the surprising side effect of pushing ALL queued changes).
  • TUI inline edit: writes through via background tea.Cmd; falls back to queue on API error.
  • --queue / -q flag added to all three commands to preserve the old queue-first behavior.
  • AddComment now returns (string, error) so write-through comments get real Jira IDs instead of synthetic local_* IDs.
  • JSON output "status" field changes from "pending" to "synced" (write-through) or "queued" (with --queue).

Breaking Changes

Before After
jai set queues locally, needs jai push jai set pushes to Jira immediately
jai comment queues locally jai comment pushes to Jira immediately
jai transition pushes ALL queued changes jai transition pushes only the transition
Works offline (deferred push) Requires network (use --queue for offline)
JSON status: "pending" JSON status: "synced" or "queued"

Migration

Add --queue / -q to any scripts that relied on the old queue-first behavior:

# Before (implicit queue)
jai set ROX-123 priority High
jai push

# After (explicit queue)
jai set ROX-123 priority High --queue
jai push

Test plan

  • go build -tags fts5 ./... — clean build
  • go test -tags fts5 ./... — 258 tests pass
  • Manual: jai set <key> priority Minor pushes immediately (staging, 19/19 tests pass)
  • Manual: jai set <key> priority Major --queue queues for push
  • Manual: jai comment <key> "test" posts immediately
  • Manual: jai transition <key> "In Progress" transitions immediately
  • Manual: jai set <key> labels --add/--remove array ops push immediately
  • Manual: TUI field edit saves via API (not tested — requires interactive session)

sthadka added 2 commits August 3, 2026 23:28
BREAKING CHANGE: `jai set` and `jai comment` now push changes to
Jira immediately instead of queuing them locally. `jai transition`
no longer side-pushes all queued changes. Use `--queue` / `-q` to
restore the old queue-first behavior.

- `jai set`: calls Jira UpdateField/UpdateFieldOp directly; updates
  local DB only on success
- `jai comment`: calls Jira AddComment directly; stores real comment
  ID instead of synthetic local_* ID
- `jai transition`: calls ExecuteTransition directly without
  ProcessQueue; refreshes local DB after success
- TUI inline edit: writes through via background tea.Cmd; falls back
  to queue on API error
- AddComment now returns (string, error) to surface the comment ID
- All three commands accept --queue/-q to defer push to `jai push`
- JSON output status field changes from "pending" to "synced"/"queued"
Update CLAUDE.md, README.md, docs/spec.md, and docs/user-guide.md
to reflect that jai set, comment, and transition now push to Jira
immediately by default, with --queue/-q to defer.
@sthadka
sthadka merged commit f6e2b76 into main Aug 3, 2026
2 checks passed
@sthadka
sthadka deleted the feat/write-through-default branch August 3, 2026 22:28
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