Skip to content

Add --list flag to todos position for cross-list moves#372

Merged
jeremy merged 10 commits intomainfrom
invented-heather
Mar 25, 2026
Merged

Add --list flag to todos position for cross-list moves#372
jeremy merged 10 commits intomainfrom
invented-heather

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 24, 2026

Summary

  • Adds --list (-l) flag to todos position command for cross-list moves within the same project via the API's parent_id field
  • Detects cross-project list URLs and errors with guidance
  • Updates SKILL.md
  • Fixes notifications list breadcrumb to include --page when not on first page

Closes #337

Test plan

  • Rebase onto main after SDK bump lands
  • bin/ci passes (only pre-existing check-smoke-coverage gap from new SDK commands)
  • todos position with --list moves todo to different list (unit test: TestTodosPositionAcceptsSameProjectListURL)
  • todos position without --list still works (unit test: TestTodosPositionRequiresPosition)
  • Cross-project --list errors clearly (unit test: TestTodosPositionRejectsCrossProjectListURL)
  • Regenerate .surface snapshot (includes --list for position/move/reorder)

Copilot AI review requested due to automatic review settings March 24, 2026 20:12
@github-actions github-actions bot added commands CLI command implementations skills Agent skills labels Mar 24, 2026
Copy link
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.

No issues found across 2 files

Copy link

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 support for moving a todo to a different todolist (within the same project) via basecamp todos position by introducing a --list/-l destination flag and wiring it through to the API payload (parent_id), plus a small docs update.

Changes:

  • Extend todos position to accept --list/-l (todolist ID or URL) for cross-list moves within a project.
  • Detect cross-project todolist URLs and return a usage error.
  • Update skills/basecamp/SKILL.md with an example for cross-list moves.

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.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
internal/commands/todos.go Adds --list/-l handling to todos position, parses IDs/URLs with project-aware extraction, and passes parentID into the SDK reposition call.
skills/basecamp/SKILL.md Documents the new todos position --list usage example.

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

Copy link

@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: b9bb514d5a

ℹ️ 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".

Copilot AI review requested due to automatic review settings March 24, 2026 20:24
Copy link

@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: d867324106

ℹ️ 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".

Copy link

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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


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

@jeremy jeremy force-pushed the invented-heather branch from d867324 to 0b7360d Compare March 24, 2026 20:40
@github-actions github-actions bot added tui Terminal UI sdk SDK wrapper and provenance tests Tests (unit and e2e) docs deps enhancement New feature or request labels Mar 24, 2026
Copy link

@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: 0b7360d542

ℹ️ 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".

Copilot AI review requested due to automatic review settings March 24, 2026 20:48
@github-actions github-actions bot added the breaking Breaking change label Mar 24, 2026
@github-actions
Copy link

⚠️ Potential breaking changes detected:

  • The method signature of Move in the Cards API has changed: previously accepted two parameters (cardID and columnID), now requires a third parameter (nil). This change may break scripts or integrations relying on the previous method signature.

Review carefully before merging. Consider a major version bump.

@jeremy jeremy changed the base branch from main to sdk-0.7.0 March 24, 2026 20:53
@github-actions github-actions bot removed tui Terminal UI sdk SDK wrapper and provenance docs deps labels Mar 24, 2026
Copy link

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.


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

Copy link

@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: 8b36141509

ℹ️ 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".

@jeremy jeremy force-pushed the sdk-0.7.0 branch 4 times, most recently from d6a2cae to 6ea302a Compare March 25, 2026 07:07
Copilot AI review requested due to automatic review settings March 25, 2026 07:11
@jeremy jeremy force-pushed the invented-heather branch from 628f8e8 to bc04986 Compare March 25, 2026 07:11
Copy link

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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


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

Copilot AI review requested due to automatic review settings March 25, 2026 07:28
Copy link

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

Copilot reviewed 26 out of 27 changed files in this pull request and generated 1 comment.


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

Base automatically changed from sdk-0.7.0 to main March 25, 2026 07:37
jeremy added 8 commits March 25, 2026 00:38
Support moving a todo to a different todolist within the same project
via the reposition endpoint's parent_id field. Detects and rejects
cross-project moves with guidance.

Blocked on SDK exposing parentID on Reposition — will compile after
rebasing onto main with the new SDK release.

Closes #337
- Resolve --list via resolveTodolistInTodoset so names like "Sprint 1"
  work, not just numeric IDs and URLs
- Use project context from todo URL, --in flag, and config for both
  name resolution and cross-project validation
- Use ErrUsageHint for the cross-project error to show actionable guidance
- Update help text and SKILL.md placeholder to reflect name support
Project context from --in may be a name like "myproject" while the
list URL yields a numeric project ID. Resolve the name to an ID
before comparing, so --in myproject --list <same-project-url> doesn't
falsely reject.

Also consolidates project resolution: the resolved ID is reused for
both cross-project validation and todolist name resolution.
Cover the new cross-list move path:
- Cross-project URL rejection
- Same-project URL passes validation
- List name without project context requires --in
- Cross-project via config project ID
…id in response

- Only fire the cross-project check when the todo's project comes from
  its URL, not from config/flags. Config project is a default context
  that may not match where a bare-ID todo actually lives.
- Include todolist_id in JSON response when --list is used so automation
  can confirm the cross-list move.
ResolveProject was called unconditionally when --list was provided and
the project context was non-numeric, even when the list was already a
numeric ID and no resolution was needed. This made otherwise valid
moves fail if the configured project name was stale.

Now only resolves when cross-project URL validation or todolist name
resolution actually requires the numeric project ID.
The read breadcrumb from 'notifications list --page 2' said
'basecamp notifications read <id>' without --page, leading users
into a "not found" error because read defaults to page 0. Now
carries the page context forward.
@jeremy jeremy force-pushed the invented-heather branch from 7292d67 to 635e6ac Compare March 25, 2026 07:39
extractWithProject can return an empty recording ID for URLs that
parse but have no recording segment (e.g. project URLs). Fail fast
with a targeted error instead of falling through to a confusing
"Invalid todolist ID".
Copilot AI review requested due to automatic review settings March 25, 2026 07:44
Copy link

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

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


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

A todo URL or project URL passed as --list would silently extract the
wrong ID and use it as a todolist ID. Now validates via urlarg.Parse
that the URL is actually a todolists URL (correct type, not a
collection, has a recording ID).
@jeremy jeremy merged commit da54d0c into main Mar 25, 2026
27 checks passed
@jeremy jeremy deleted the invented-heather branch March 25, 2026 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations enhancement New feature or request skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Expose ability to move todos between lists

2 participants