Skip to content

Add on_hold property to CardColumn#188

Merged
jeremy merged 2 commits intobasecamp:mainfrom
nnemirovsky:feat/card-column-on-hold
Mar 18, 2026
Merged

Add on_hold property to CardColumn#188
jeremy merged 2 commits intobasecamp:mainfrom
nnemirovsky:feat/card-column-on-hold

Conversation

@nnemirovsky
Copy link
Copy Markdown
Contributor

@nnemirovsky nnemirovsky commented Mar 16, 2026

Summary

The Basecamp API returns an on_hold object on card column responses containing the on-hold section's ID, enabled status, cards count, and cards URL. This data was missing from the Smithy spec and all SDK types, causing it to be silently dropped during JSON deserialization.

  • Add CardColumnOnHold shape to the Smithy model (spec/basecamp.smithy)
  • Add CardColumnOnHold schema and on_hold reference in CardColumn to openapi.json
  • Add on_hold field and CardColumnOnHold type to all 5 SDKs (Go, TypeScript, Ruby, Swift, Kotlin)
  • Add on_holdCardColumnOnHold mapping in Go service layer (cardColumnFromGenerated)

Motivation

Without the on_hold property, SDK consumers cannot programmatically move cards to/from on-hold sections — the on-hold column ID is only available through this field.

Testing

  • Go SDK: go build ./... and go test ./... pass
  • Verified against live Basecamp API: columns with on-hold sections correctly populate the new field

Summary by cubic

Expose the on_hold section on card columns with the full BC3 schema across the spec and all SDKs. Adds tests to verify parsing and service responses.

  • New Features

    • Added CardColumnOnHold to the Smithy/OpenAPI with: id, status, inherits_status, title, created_at, updated_at, cards_count, cards_url.
    • Added on_hold to CardColumn in Go, TypeScript, Ruby, Swift, Kotlin, plus Go service-layer mapping.
  • Bug Fixes

    • Stopped dropping on_hold during JSON deserialization; added Go unmarshal tests and fixtures.
    • Aligned schema with the BC3 API (removed synthetic enabled, added real fields); updated Ruby and TypeScript tests to verify enable/disable behavior.

Written for commit f3fb042. Summary will update on new commits.

The Basecamp API returns an `on_hold` object on card columns containing
the on-hold section's id, enabled status, cards count, and cards URL.
This data was missing from the spec and all SDK types, causing it to be
silently dropped during deserialization.

Add `CardColumnOnHold` shape to the Smithy spec and propagate through
all generated types (Go, TypeScript, Ruby, Swift, Kotlin).
@nnemirovsky nnemirovsky requested a review from a team as a code owner March 16, 2026 05:27
Copilot AI review requested due to automatic review settings March 16, 2026 05:27
@github-actions github-actions bot added typescript Pull requests that update TypeScript code ruby Pull requests that update the Ruby SDK go kotlin swift spec Changes to the Smithy spec or OpenAPI labels Mar 16, 2026
@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Summary of Changes
- **Modified Type:** `CardColumn`
  - Added `on_hold` property.

### Impact Analysis
- **SDKs Needing Regeneration:** All SDKs require regeneration for this update.
- **Breaking Change:** No (adding a property is backward-compatible).

### Checklist of SDKs Requiring Updates:
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift

Copy link
Copy Markdown

@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 10 files

nnemirovsky added a commit to nnemirovsky/basecamp-cli that referenced this pull request Mar 16, 2026
Move a card to the on-hold section of its current column (--on-hold) or
a target column (--to <column> --on-hold). Requires the SDK to expose
the on_hold property on CardColumn (basecamp/basecamp-sdk#188).
@nnemirovsky
Copy link
Copy Markdown
Contributor Author

Required by basecamp/basecamp-cli#325 (adds --on-hold flag to cards move command)

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 support for the Basecamp API’s on_hold object on card column responses across the Smithy spec, OpenAPI schema, and all generated SDK models, ensuring the field is no longer dropped during deserialization.

Changes:

  • Add CardColumnOnHold shape to the Smithy model and CardColumnOnHold schema to openapi.json, referenced from CardColumn.on_hold.
  • Regenerate/update SDK models/types in TypeScript, Ruby, Swift, Kotlin, and Go to include the new on_hold field/type.
  • Map the new generated Go on_hold field into the hand-written Go service type (cardColumnFromGenerated).

Reviewed changes

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

Show a summary per file
File Description
typescript/src/generated/schema.d.ts Adds on_hold to CardColumn and defines CardColumnOnHold TS schema type.
swift/Sources/Basecamp/Generated/Models/CardColumnOnHold.swift Introduces Swift model for CardColumnOnHold.
swift/Sources/Basecamp/Generated/Models/CardColumn.swift Adds onHold property to Swift CardColumn.
spec/basecamp.smithy Adds on_hold: CardColumnOnHold member and defines CardColumnOnHold structure.
ruby/lib/basecamp/generated/types.rb Adds on_hold to Ruby CardColumn and implements CardColumnOnHold.
openapi.json Adds on_hold property to CardColumn and defines CardColumnOnHold schema.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/CardColumnOnHold.kt Introduces Kotlin model for CardColumnOnHold.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/CardColumn.kt Adds onHold to Kotlin CardColumn.
go/pkg/generated/client.gen.go Adds generated Go model CardColumnOnHold and CardColumn.OnHold.
go/pkg/basecamp/cards.go Adds clean Go CardColumnOnHold, CardColumn.OnHold, and mapping from generated types.

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

@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Summary of Changes
- **Modified Type**: Added `on_hold` property to the `CardColumn` type.

### Impact Analysis
- This is **not a breaking change** because it only adds a new property to an existing type and does not modify or remove existing operations or fields.

### SDK Regeneration
- All SDKs need regeneration to include the new `on_hold` property.

### Checklist of SDKs needing updates:
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift

@github-actions github-actions bot added the bug Something isn't working label Mar 16, 2026
The Smithy spec defined a synthetic `enabled: Boolean` field that
doesn't exist in the API and was missing 5 of 8 real fields. Replace
with the actual shape emitted by the BC3 kanban list renderer:
id, status, inherits_status, title, created_at, updated_at,
cards_count, cards_url — all required when the object is present.
@jeremy jeremy force-pushed the feat/card-column-on-hold branch from f5ec05a to f3fb042 Compare March 17, 2026 17:29
Copilot AI review requested due to automatic review settings March 17, 2026 17:29
@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Summary of Changes:
- **Modified Type:** Added `on_hold` property to the `CardColumn` type.

### SDK Impact:
- This change requires regeneration of all SDKs: 
  - Addition of a new property is a non-breaking change, but all SDKs must be updated to include the `on_hold` property in generated models.

### Breaking Change?
- **No**, this is not a breaking API change since no operations, fields, or types were removed.

### Checklist of SDKs needing updates:
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift

@github-actions github-actions bot added enhancement New feature or request and removed bug Something isn't working labels Mar 17, 2026
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 support for the on_hold object on card column responses across the Smithy/OpenAPI specs and all generated SDKs, so the field is no longer dropped during deserialization.

Changes:

  • Added CardColumnOnHold shape/schema and referenced it from CardColumn.on_hold in Smithy + OpenAPI.
  • Regenerated SDK models/types to include on_hold (Go/TypeScript/Ruby/Swift/Kotlin) and updated fixtures/tests to assert it deserializes.
  • Added Go service-layer mapping for on_hold (cardColumnFromGenerated) and expanded Go unmarshal tests/fixtures.

Reviewed changes

Copilot reviewed 8 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
typescript/tests/services/card-columns.test.ts Extends CardColumns service tests to assert on_hold deserialization behavior.
typescript/src/generated/schema.d.ts Adds CardColumnOnHold and optional CardColumn.on_hold typing.
typescript/src/generated/openapi-stripped.json Adds CardColumnOnHold schema and CardColumn.on_hold $ref.
typescript/src/generated/metadata.json Regenerated TS metadata (includes additional operation config changes beyond on_hold).
swift/Sources/Basecamp/Generated/Models/CardColumnOnHold.swift New Swift model for CardColumnOnHold.
swift/Sources/Basecamp/Generated/Models/CardColumn.swift Adds onHold property to Swift CardColumn.
spec/fixtures/cards/column.json Adds on_hold object to the card column fixture.
spec/fixtures/cards/card_table.json Adds on_hold object to embedded columns in card table fixture.
spec/basecamp.smithy Adds CardColumnOnHold shape and CardColumn.on_hold member.
ruby/test/basecamp/services/card_columns_service_test.rb Updates Ruby service tests to treat on_hold as an object (or missing).
ruby/lib/basecamp/generated/types.rb Adds on_hold parsing/type + introduces additional generated types beyond on_hold.
ruby/lib/basecamp/generated/metadata.json Regenerated Ruby metadata (includes additional operation config changes beyond on_hold).
openapi.json Adds CardColumnOnHold schema and CardColumn.on_hold $ref.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/CardColumnOnHold.kt New Kotlin model for CardColumnOnHold.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/CardColumn.kt Adds onHold field to Kotlin CardColumn.
go/pkg/generated/client.gen.go Adds generated Go CardColumnOnHold and CardColumn.OnHold.
go/pkg/basecamp/cards_test.go Adds fixture-backed unmarshal assertions for on_hold (present + absent).
go/pkg/basecamp/cards.go Adds OnHold to Go CardColumn, defines CardColumnOnHold, and maps from generated types.

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

@jeremy
Copy link
Copy Markdown
Member

jeremy commented Mar 18, 2026

@nnemirovsky I've aligned the API spec and SDKs with the Rails app. I'll update the CLI to use the updated SDK as well.

@jeremy jeremy merged commit 4784bb2 into basecamp:main Mar 18, 2026
44 of 45 checks passed
jeremy added a commit that referenced this pull request Mar 18, 2026
* origin/main:
  Add hill chart API support (GetHillChart, UpdateHillChartSettings) (#195)
  Switch CODEOWNERS from sip to cli team (#199)
  Use linked CodeQL CLI for Kotlin 2.3.x support (#197)
  Fix escaped markdown in spec-change-impact PR comments (#196)
  Add on_hold property to CardColumn (#188)
jeremy pushed a commit to nnemirovsky/basecamp-cli that referenced this pull request Mar 18, 2026
Move a card to the on-hold section of its current column (--on-hold) or
a target column (--to <column> --on-hold). Requires the SDK to expose
the on_hold property on CardColumn (basecamp/basecamp-sdk#188).
jeremy added a commit to basecamp/basecamp-cli that referenced this pull request Mar 18, 2026
* Add --on-hold flag to cards move command

Move a card to the on-hold section of its current column (--on-hold) or
a target column (--to <column> --on-hold). Requires the SDK to expose
the on_hold property on CardColumn (basecamp/basecamp-sdk#188).

* Address PR review feedback

- Reject --position when combined with --on-hold
- Fix help examples to use numeric column IDs
- Rename annotation key from "notes" to "agent_notes"
- Use CardColumns().Get() for numeric column IDs and current column
  to avoid requiring --card-table in multi-table projects
- Fix SKILL.md example to use numeric column ID
- Add tests for --position + --on-hold rejection and --on-hold
  without --card-table
- Update go.mod replace to latest SDK fork commit

* Remove temporary replace directive for SDK fork

* Address second round of PR review feedback

- Fix usage hint to match actual command syntax (no --enable flag)
- Update --to flag description to note it's optional with --on-hold
- Add SKILL.md example for --card-table with named column + --on-hold
- Replace weak on-hold test with mock transport that verifies full flow

* Address Copilot review feedback

- Fix agent_notes on cards move: replace irrelevant assignee filtering
  note with --position/--on-hold incompatibility note
- Fix mock transport comment to reflect actual request sequence
- Add tests for --on-hold with numeric --to and disabled on-hold error

* Address second round of Copilot review feedback

- Mock transports now error on unexpected requests instead of returning
  empty 200s, catching unintended API calls in tests
- On-hold error hint now includes the concrete column ID instead of a
  generic placeholder

* Bump SDK to on-hold merge commit (PR 188)

Pin to 4784bb2fda18 which adds CardColumnOnHold types, EnableOnHold,
and DisableOnHold service methods.

* Add named-column on-hold test and update surface baseline

Cover the named-column + --on-hold code path with
TestCardsMoveOnHoldWithNamedColumn. Fix mock JSON to match real
CardColumnOnHold struct shape. Regenerate .surface for --on-hold flag.

* Improve error hint when card has no parent column

Use ErrUsageHint with a concrete --to suggestion instead of a bare
ErrUsage, so users know how to recover when the API returns a card
without a parent column reference.

* Tidy go.sum after rebase onto main

---------

Co-authored-by: Jeremy Daer <jeremy@37signals.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go kotlin ruby Pull requests that update the Ruby SDK spec Changes to the Smithy spec or OpenAPI swift typescript Pull requests that update TypeScript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants