Skip to content

Add todos update command#348

Merged
jeremy merged 1 commit intomainfrom
todos-update
Mar 18, 2026
Merged

Add todos update command#348
jeremy merged 1 commit intomainfrom
todos-update

Conversation

@jeremy
Copy link
Copy Markdown
Member

@jeremy jeremy commented Mar 18, 2026

Summary

  • Add basecamp todos update <id|url> [title] with flags: --title, --description, --assignee, --due, --starts-on, --notify
  • Positional title takes precedence over --title flag (matches cards steps update pattern)
  • Description pipeline: Markdown→HTML + local image resolution (matches todos create)
  • Assignee supports comma-separated names/IDs via resolveAssigneeIDs; --to alias added
  • Bump SDK to pick up fix for unsafe partial-update serialization in TodosService.Update() — fields now set conditionally, matching the cards pattern (Fix unsafe partial-update serialization across all Go SDK Update methods basecamp-sdk#201)
  • Adapt checkins and schedule commands to SDK's new pointer types (Hour/Minute*int, AllDay*bool)

Triggered by https://3.basecamp.com/2914079/buckets/46292715/card_tables/cards/9693937142

Test plan

  • bin/ci passes (all checks: lint, vet, unit tests, e2e, catalog parity, surface snapshot, skill drift, smoke coverage, provenance)
  • Smoke: basecamp todos update <id> "Updated title" — title updated, confirmed via todos show
  • Smoke: basecamp todos update <id> --title "Flag title" — title updated
  • Smoke: basecamp todos update <id> --due "next friday" — due_on set to 2026-03-27, confirmed via todos show
  • Smoke: basecamp todos update <id> --description "**bold**" — HTML description persisted, confirmed via todos show

Copilot AI review requested due to automatic review settings March 18, 2026 23:06
@github-actions github-actions bot added commands CLI command implementations tui Terminal UI sdk SDK wrapper and provenance tests Tests (unit and e2e) docs deps enhancement New feature or request labels Mar 18, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 12 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="e2e/smoke/smoke_todos_write.bats">

<violation number="1" location="e2e/smoke/smoke_todos_write.bats:94">
P2: Missing `-p "$QA_PROJECT"` flag. Every other ID-based todo command in this file (complete, uncomplete, position, trash, restore) and the analogous `cards update` smoke test all pass `-p "$QA_PROJECT"`. Without it, the command may fail to resolve the project context or silently rely on a `.basecamp/config.json` default that won't exist in CI.</violation>
</file>

<file name="internal/commands/todos_test.go">

<violation number="1" location="internal/commands/todos_test.go:1517">
P3: `TestTodosSubcommandsIncludesUpdate` is a duplicate of the check already performed in `TestTodosSubcommands`, which was modified in this same PR to include `"update"` in its expected list. Remove the redundant test.</violation>
</file>

<file name="internal/commands/todos.go">

<violation number="1" location="internal/commands/todos.go:969">
P1: Missing nil check for `app` after `appctx.FromContext`. All sibling commands guard against `app == nil` before calling `ensureAccount`, which dereferences `app.Config` and will panic on nil.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new basecamp todos update <id|url> [title] write command to the CLI, aligning behavior with existing “update” patterns and updating the Basecamp Go SDK dependency to support safer partial updates.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Introduce todos update with support for title (positional/flag precedence), description (Markdown→HTML + local images), assignee resolution, due/starts-on, and notify.
  • Bump github.com/basecamp/basecamp-sdk/go and adapt schedule/checkins callers to SDK fields that moved to pointer types.
  • Expand unit + smoke coverage and update CLI surface / API coverage docs to reflect the new command.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
internal/commands/todos.go Adds the todos update command implementation and adds an update breadcrumb from todos show.
internal/commands/todos_test.go Adds unit tests for todos update request shaping and help/no-op behavior.
e2e/smoke/smoke_todos_write.bats Adds a smoke test that updates a previously-created todo.
internal/commands/commands.go Registers update in the todos command category metadata.
API-COVERAGE.md Updates coverage table to include todos update.
.surface Updates CLI surface snapshot for the new subcommand and flags.
go.mod / go.sum Bumps Basecamp SDK dependency version.
internal/version/sdk-provenance.json Records SDK + API provenance revisions for the bump.
internal/commands/schedule.go Adapts schedule requests to SDK *bool for AllDay.
internal/tui/workspace/views/schedule.go Adapts TUI schedule create request to SDK *bool for AllDay.
internal/commands/checkins.go Adapts checkins question schedule to SDK *int for Hour/Minute.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3d337269e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Edit an existing todo's title, description, assignees, dates, and notify
flag.  Modeled on `cards update`: positional title takes precedence over
`--title`, description goes through Markdown→HTML + local-image
resolution, and `--assignee` accepts comma-separated names/IDs.

Bumps the SDK to pick up the fix for unsafe partial-update serialization
in `TodosService.Update()` (fields are now set conditionally, matching
the cards pattern).  Adapts checkins and schedule commands to the SDK's
new pointer types for `Hour`/`Minute` (*int) and `AllDay` (*bool).
@jeremy jeremy merged commit 2dcea18 into main Mar 18, 2026
25 checks passed
@jeremy jeremy deleted the todos-update branch March 18, 2026 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations deps docs enhancement New feature or request sdk SDK wrapper and provenance tests Tests (unit and e2e) tui Terminal UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants