Add on_hold property to CardColumn#188
Conversation
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).
## 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 |
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).
|
Required by basecamp/basecamp-cli#325 (adds |
There was a problem hiding this comment.
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
CardColumnOnHoldshape to the Smithy model andCardColumnOnHoldschema toopenapi.json, referenced fromCardColumn.on_hold. - Regenerate/update SDK models/types in TypeScript, Ruby, Swift, Kotlin, and Go to include the new
on_holdfield/type. - Map the new generated Go
on_holdfield 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.
## 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 |
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.
f5ec05a to
f3fb042
Compare
## 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 |
There was a problem hiding this comment.
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
CardColumnOnHoldshape/schema and referenced it fromCardColumn.on_holdin 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.
|
@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. |
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).
* 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>
Summary
The Basecamp API returns an
on_holdobject 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.CardColumnOnHoldshape to the Smithy model (spec/basecamp.smithy)CardColumnOnHoldschema andon_holdreference inCardColumntoopenapi.jsonon_holdfield andCardColumnOnHoldtype to all 5 SDKs (Go, TypeScript, Ruby, Swift, Kotlin)on_hold→CardColumnOnHoldmapping in Go service layer (cardColumnFromGenerated)Motivation
Without the
on_holdproperty, SDK consumers cannot programmatically move cards to/from on-hold sections — the on-hold column ID is only available through this field.Testing
go build ./...andgo test ./...passSummary by cubic
Expose the
on_holdsection on card columns with the full BC3 schema across the spec and all SDKs. Adds tests to verify parsing and service responses.New Features
CardColumnOnHoldto the Smithy/OpenAPI with: id, status, inherits_status, title, created_at, updated_at, cards_count, cards_url.on_holdtoCardColumnin Go, TypeScript, Ruby, Swift, Kotlin, plus Go service-layer mapping.Bug Fixes
on_holdduring JSON deserialization; added Go unmarshal tests and fixtures.enabled, added real fields); updated Ruby and TypeScript tests to verify enable/disable behavior.Written for commit f3fb042. Summary will update on new commits.