Skip to content

Add hill chart API support (GetHillChart, UpdateHillChartSettings)#195

Merged
jeremy merged 7 commits intobasecamp:mainfrom
robzolkos:feat/hill-charts
Mar 18, 2026
Merged

Add hill chart API support (GetHillChart, UpdateHillChartSettings)#195
jeremy merged 7 commits intobasecamp:mainfrom
robzolkos:feat/hill-charts

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

@robzolkos robzolkos commented Mar 17, 2026

Summary

  • Adds two new hill chart operations across all five SDKs, completing the
    pipeline from Smithy spec through Go, TypeScript, Ruby, Swift, and Kotlin
  • GetHillChart — retrieve hill chart state for a todoset
    (GET /todosets/{todosetId}/hill.json)
  • UpdateHillChartSettings — track/untrack todolists on a hill chart
    (PUT /todosets/{todosetId}/hills/settings.json)

Matches the API endpoints added in basecamp/bc3#9907 and documented in
basecamp/bc3-api#386.

What changed

Layer Files
Smithy spec spec/basecamp.smithy, spec/overlays/tags.smithy
Generated clients openapi.json, go/pkg/generated/client.gen.go, TS/Ruby/Swift/Kotlin generated
Go service wrapper go/pkg/basecamp/hill_charts.go (Get, UpdateSettings)
Client wiring client.go, client.ts, client.rb, Swift/Kotlin accessors (generated)
Generator configs TS, Ruby, Kotlin, Swift TAG_TO_SERVICE mappings
Tests Go fixture tests, TS service tests (vitest), Ruby service tests (minitest)
Fixtures spec/fixtures/hill_charts/ (get, update-settings, update-settings-request)
Provenance Updated to current bc3-api and bc3 HEADs

Operation count: 179 → 181


Summary by cubic

Adds hill chart support across all SDKs so you can fetch a todoset’s hill chart and track/untrack todolists via the API. Includes app_versions_url in models and consistent hook metadata.

  • New Features

    • Endpoints: GET /todosets/{todosetId}/hill.json, PUT /todosets/{todosetId}/hills/settings.json.
    • Spec/models: new HillChart/HillChartDot shapes with app_versions_url; OpenAPI regenerated.
    • SDKs: Go HillChartsService (Get, UpdateSettings) + accessors; generated services wired in typescript, ruby, swift, and kotlin (typed HillChart/HillChartDot models).
    • Reliability: GetHillChart retried on 429/503; UpdateHillChartSettings is naturally idempotent and retried on 429/503.
    • Tests/fixtures: Go, TypeScript (vitest), and Ruby (minitest) tests with JSON fixtures; added not-found and body assertion cases; operations count 179 → 181.
  • Refactors

    • Spec consistency: TodolistIdList now uses TodolistId.
    • Generators: method overrides for get/updateSettings; added hillchart/hillcharts as simple resources; resourceType override so UpdateHillChartSettings reports hill_chart in hooks across typescript, swift, and kotlin.
    • Style: gofmt alignment and Ruby array bracket spacing fixes.

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

@robzolkos robzolkos requested a review from a team as a code owner March 17, 2026 11:37
Copilot AI review requested due to automatic review settings March 17, 2026 11:37
@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 17, 2026
@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Summary of Changes
- **Added Operations**: 
  - `GetHillChart`
  - `UpdateHillChartSettings`
- No resources or types were removed or modified.

### Breaking Change?
- This is **not** a breaking change as no operations, fields, or types were removed.

### SDK Updates Required
All SDKs require regeneration to support the newly added operations.

#### Checklist:
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift

@github-actions github-actions bot added the enhancement New feature or request label Mar 17, 2026
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.

4 issues found across 42 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="go/pkg/basecamp/hill_charts_test.go">

<violation number="1" location="go/pkg/basecamp/hill_charts_test.go:104">
P2: Test name says `Marshal` but the test only performs `Unmarshal`. Should be `TestHillChart_UnmarshalUpdateSettingsRequest` to match the other tests and accurately describe what's being tested.</violation>
</file>

<file name="spec/basecamp.smithy">

<violation number="1" location="spec/basecamp.smithy:927">
P3: Use `TodolistId` instead of `Long` for consistency with the rest of the spec. `PersonIdList` already sets the precedent (`member: PersonId`), and `TodolistId` is a defined type used elsewhere.</violation>
</file>

<file name="kotlin/generator/src/main/kotlin/com/basecamp/sdk/generator/Config.kt">

<violation number="1" location="kotlin/generator/src/main/kotlin/com/basecamp/sdk/generator/Config.kt:98">
P2: `"UpdateHillChartSettings"` is missing from `METHOD_NAME_OVERRIDES`. The analogous `"UpdateScheduleSettings"` is overridden to `"updateSettings"` — without the same treatment, this operation will generate as `hillCharts.updateHillChartSettings()` instead of the expected `hillCharts.updateSettings()`.</violation>

<violation number="2" location="kotlin/generator/src/main/kotlin/com/basecamp/sdk/generator/Config.kt:98">
P2: `"hillchart"` is missing from `SIMPLE_RESOURCES`. Without it, `GetHillChart` on the `HillCharts` service will generate a redundant method name like `getHillChart()` instead of the idiomatic `get()` used by other single-resource services (e.g., `Todosets.get()` from `GetTodoset`).</violation>
</file>

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

Comment thread go/pkg/basecamp/hill_charts_test.go Outdated
Comment thread spec/basecamp.smithy Outdated
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 Hill Chart support end-to-end (Smithy → OpenAPI → generated SDKs + wrappers/tests), introducing GetHillChart and UpdateHillChartSettings operations across Go, TypeScript, Ruby, Swift, and Kotlin.

Changes:

  • Extend the Smithy spec + overlays to include Hill Chart operations and shapes, then regenerate OpenAPI + SDK clients.
  • Wire new HillCharts service accessors into TypeScript/Go/Ruby/Swift/Kotlin clients.
  • Add fixtures and basic SDK-level tests for the new endpoints.

Reviewed changes

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

Show a summary per file
File Description
typescript/tests/services/hill-charts.test.ts Adds Vitest/MSW coverage for HillCharts service calls
typescript/src/index.ts Re-exports HillCharts service/types at package entrypoint
typescript/src/generated/services/index.ts Includes HillChartsService in generated service barrel
typescript/src/generated/services/hill-charts.ts Generated HillCharts service (GET hill chart, PUT settings)
typescript/src/generated/schema.d.ts Adds new paths/operations/schemas for hill charts
typescript/src/generated/path-mapping.ts Maps new Hill Chart paths to operation IDs
typescript/src/generated/openapi-stripped.json Adds stripped OpenAPI entries for the new endpoints/schemas
typescript/src/generated/metadata.json Adds retry/idempotency metadata for new operations
typescript/src/client.ts Wires hillCharts accessor into TS client
typescript/scripts/generate-services.ts Adds HillCharts to TS generator service splits
swift/Sources/BasecampGenerator/ServiceGrouper.swift Adds HillCharts service grouping for Swift generation
swift/Sources/Basecamp/Generated/Services/HillChartsService.swift Generated Swift HillCharts service methods
swift/Sources/Basecamp/Generated/Models/UpdateHillChartSettingsRequest.swift Generated Swift request model for settings update
swift/Sources/Basecamp/Generated/Models/HillChartDot.swift Generated Swift model for hill chart dots
swift/Sources/Basecamp/Generated/Models/HillChart.swift Generated Swift model for hill chart
swift/Sources/Basecamp/Generated/Metadata.swift Adds retry metadata for Hill Chart operations in Swift
swift/Sources/Basecamp/Generated/AccountClient+Services.swift Adds hillCharts accessor on Swift client
spec/overlays/tags.smithy Tags new operations under Todos
spec/fixtures/hill_charts/update-settings.json Fixture for UpdateHillChartSettings response
spec/fixtures/hill_charts/update-settings-request.json Fixture for UpdateHillChartSettings request body
spec/fixtures/hill_charts/get.json Fixture for GetHillChart response
spec/basecamp.smithy Adds Hill Chart operations + shapes to the Smithy service
spec/api-provenance.json Updates upstream provenance pins
ruby/test/basecamp/services/hill_charts_service_test.rb Adds Minitest coverage for HillCharts Ruby service
ruby/scripts/generate-services.rb Adds HillCharts to Ruby generator service splits
ruby/lib/basecamp/generated/types.rb Adds HillChart/HillChartDot Ruby generated types
ruby/lib/basecamp/generated/services/hill_charts_service.rb Adds Ruby HillCharts service methods
ruby/lib/basecamp/generated/metadata.json Adds retry/idempotency metadata for new Ruby operations
ruby/lib/basecamp/client.rb Adds hill_charts accessor to Ruby client
openapi.json Adds OpenAPI paths/schemas for hill chart endpoints
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/hill-charts.kt Generated Kotlin HillCharts service
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/Types.kt Adds Kotlin request body type for UpdateHillChartSettings
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/ServiceAccessors.kt Adds Kotlin hillCharts accessor
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/Metadata.kt Adds Kotlin operation metadata entries
kotlin/generator/src/main/kotlin/com/basecamp/sdk/generator/Config.kt Adds HillCharts to Kotlin generator service splits
go/pkg/generated/client.gen.go Adds generated Go models + client methods for Hill Charts
go/pkg/basecamp/url-routes.json Adds URL routing patterns for new hill chart endpoints
go/pkg/basecamp/hill_charts_test.go Adds Go fixture-based marshal/unmarshal tests
go/pkg/basecamp/hill_charts.go Adds Go wrapper service for Get + UpdateSettings
go/pkg/basecamp/client.go Adds HillCharts() accessor to Go AccountClient
go/pkg/basecamp/api-provenance.json Updates Go-side provenance pins
behavior-model.json Adds behavior/retry/idempotency model entries for new operations

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

You can also share your feedback on Copilot code review. Take the survey.

Comment thread typescript/tests/services/hill-charts.test.ts
Comment thread typescript/src/index.ts
@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Changes:
- **Added Operations**: 
  - `GetHillChart`
  - `UpdateHillChartSettings`
- **No Removed or Modified Operations** detected.

### Impact:
- This is **not a breaking change** (no operations or fields were removed or altered).
- All SDKs require regeneration to include the new operations.

### SDK Regeneration Checklist:
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift

Copy link
Copy Markdown
Member

@jeremy jeremy left a comment

Choose a reason for hiding this comment

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

1. Medium — app_versions_url missing from HillChart model

spec/basecamp.smithy:890 defines HillChart without app_versions_url, but the upstream JSON renderer emits that field whenever a chart has history (show.json.jbuilder:7). Because the Smithy model omits it, every SDK silently drops it:

  • go/pkg/basecamp/hill_charts.go:12 — no field on struct
  • swift/Sources/Basecamp/Generated/Models/HillChart.swift:4 — no property
  • TS schema won't type it
  • Kotlin returns raw JsonElement (see #2) so it would surface there by accident

Fix: Add app_versions_url: String (optional) to the HillChart structure in Smithy and regenerate.

2. Medium — Kotlin returns raw JsonElement instead of typed models

kotlin/generator/.../Config.kt:251 defines TYPE_ALIASES mapping OpenAPI schema names to Kotlin types. No HillChart or HillChartDot entries were added, so the generated service falls back to raw JsonElement at:

  • hill-charts.kt:19 (get returns JsonElement)
  • hill-charts.kt:40 (updateSettings returns JsonElement)

Adjacent resources like todosets.kt:16 are strongly typed. This is a public API regression for Kotlin consumers.

Fix: Add "HillChart" to "HillChart" and "HillChartDot" to "HillChartDot" to TYPE_ALIASES in Config.kt, then regenerate the Kotlin service.

3. Low — resourceType inconsistent across SDKs for UpdateSettings

The hooks contract's resourceType field diverges:

SDK Get UpdateSettings
Go (hill_charts.go:44,77) hill_chart hill_chart
TS (hill-charts.ts:51,82) hill_chart hill_chart_setting
Swift (HillChartsService.swift:7,16) hill_chart hill_chart_setting
Kotlin (hill-charts.kt:23,44) hill_chart hill_chart_setting
Ruby nil nil (Ruby omits resourceType entirely — consistent)

Go's hand-written layer uses hill_chart for both, while all generated SDKs use hill_chart_setting for UpdateSettings. Since resourceType is part of the public hooks contract (hooks.ts:38), this fragments metrics/tracing/policy logic by language.

Fix: Align Go's UpdateSettings OperationInfo at hill_charts.go:77 to use ResourceType: "hill_chart_setting" matching the generated SDKs. Or if hill_chart is intentional for both, update the generator to match.

4. Low — Ruby tests lack negative cases and body assertions

ruby/test/basecamp/services/hill_charts_service_test.rb only exercises happy paths (test_get, test_update_settings). TS tests add 404 error cases and request-body assertions (hill-charts.test.ts:83). Ruby should have at least one negative case and a body assertion verifying tracked/untracked are sent correctly.

@jeremy
Copy link
Copy Markdown
Member

jeremy commented Mar 18, 2026

Fixed all 4 issues from review:

  1. app_versions_url — Added to Smithy spec, fixture (get.json), Go struct + mapping, and test assertions across Go/TS/Ruby.
  2. Kotlin typed models — Added HillChart and HillChartDot to TYPE_ALIASES. Service now returns HillChart instead of JsonElement.
  3. resourceType override — Added RESOURCE_TYPE_OVERRIDES map in TS/Swift/Kotlin generators. All SDKs now emit "hill_chart" for both operations, matching Go.
  4. Ruby test coverage — Added test_get_not_found, test_update_settings_not_found, and test_update_settings_sends_body.

robzolkos and others added 6 commits March 18, 2026 11:26
Add two new operations for hill chart management on todosets:
- GetHillChart: GET /todosets/{todosetId}/hill.json
- UpdateHillChartSettings: PUT /todosets/{todosetId}/hills/settings.json

This enables tracking and untracking todolists on hill charts via the API,
matching the endpoints added in bc3#9907 and documented in bc3-api#386.

Changes span the full SDK pipeline:
- Smithy spec: new operations, shapes (HillChart, HillChartDot, TodolistIdList)
- OpenAPI + generated clients regenerated (181 operations, up from 179)
- Go: hand-written HillChartsService with Get and UpdateSettings methods
- TypeScript, Ruby, Swift, Kotlin: generated services + client wiring
- Tests: Go fixture tests, TypeScript service tests, Ruby service tests
- Fixtures: get.json, update-settings.json, update-settings-request.json
- Provenance updated to current bc3-api and bc3 HEADs
- Rename test from MarshalUpdateSettingsRequest to UnmarshalUpdateSettingsRequest
  (it only performs Unmarshal)
- Use TodolistId instead of Long in TodolistIdList for spec consistency
- Add METHOD_NAME_OVERRIDES for GetHillChart ("get") and
  UpdateHillChartSettings ("updateSettings") across all 4 SDK generators
- Add "hillchart"/"hillcharts" to SIMPLE_RESOURCES across all 4 generators
- Regenerate all SDK services with idiomatic method names (get, updateSettings)
- Update TS and Ruby tests for new method names
- Assert request payload in TS updateSettings test
Upstream JBuilder conditionally emits app_versions_url for hill charts
with version history. Add the field to the Smithy spec, fixture, Go
struct/mapping, and test assertions across Go/TS/Ruby SDKs.
Add TYPE_ALIASES entries so the Kotlin generator emits typed model
classes instead of returning raw JsonElement from hill chart operations.
The algorithmic derivation produces hill_chart_setting, but Go's
hand-written layer uses hill_chart for both operations. Add
RESOURCE_TYPE_OVERRIDES to TS/Swift/Kotlin generators so all SDKs
emit consistent resourceType values in the hooks contract.
Add not-found error cases for get and update_settings, plus a body
assertion test verifying tracked/untracked IDs are sent correctly.
Copilot AI review requested due to automatic review settings March 18, 2026 19:21
@jeremy jeremy force-pushed the feat/hill-charts branch from 6921e41 to 5a139a2 Compare March 18, 2026 19:21
@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Changes:
- **Added Operations**: `GetHillChart`, `UpdateHillChartSettings`
- **Resources/Types**: New resources or types associated with Hill Chart API introduced.

### Impact:
- All SDKs need regeneration to include new operations and resources.
- This is **not** a breaking change (no operations or fields were removed).

### Checklist for SDK Updates:
- [ ] Go  
- [ ] TypeScript  
- [ ] Ruby  
- [ ] Kotlin  
- [ ] Swift  

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

This PR adds Hill Chart support end-to-end (Smithy → OpenAPI → generated SDKs), exposing APIs to fetch a todoset’s hill chart and to track/untrack todolists on that chart across Go, TypeScript, Ruby, Swift, and Kotlin.

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:

  • Adds new Smithy operations/shapes for GetHillChart and UpdateHillChartSettings, plus tags/fixtures/provenance updates.
  • Regenerates OpenAPI + all SDK clients/services/models, wiring in the new HillCharts service accessors.
  • Adds/updates tests in Go (fixture unmarshal), TypeScript (MSW + vitest), and Ruby (minitest) for the new operations.

Reviewed changes

Copilot reviewed 25 out of 47 changed files in this pull request and generated no comments.

Show a summary per file
File Description
spec/basecamp.smithy Defines new hill chart operations, inputs/outputs, and shapes.
spec/overlays/tags.smithy Tags new operations under Todos.
spec/fixtures/hill_charts/get.json Fixture for hill chart GET response.
spec/fixtures/hill_charts/update-settings.json Fixture for update-settings response.
spec/fixtures/hill_charts/update-settings-request.json Fixture for update-settings request payload.
spec/api-provenance.json Bumps provenance revisions/dates.
openapi.json Regenerated OpenAPI with new paths/schemas/metadata extensions.
behavior-model.json Adds retry/idempotency behavior for new operations.
go/pkg/generated/client.gen.go Regenerated Go client/models for hill chart endpoints.
go/pkg/basecamp/hill_charts.go Adds Go wrapper service (Get, UpdateSettings) and clean types.
go/pkg/basecamp/hill_charts_test.go Adds Go fixture-based unmarshal tests for hill chart types and request payload.
go/pkg/basecamp/client.go Wires HillChartsService onto AccountClient.
go/pkg/basecamp/url-routes.json Adds URL routing patterns for the new hill chart endpoints.
go/pkg/basecamp/api-provenance.json Bumps Go package provenance revisions/dates.
typescript/src/generated/openapi-stripped.json Regenerated stripped OpenAPI used by the TS package.
typescript/src/generated/schema.d.ts Adds new paths/operations and HillChart/HillChartDot schemas.
typescript/src/generated/path-mapping.ts Maps hill chart routes to operationIds for instrumentation.
typescript/src/generated/metadata.json Adds retry/idempotency metadata entries for new operations.
typescript/scripts/generate-services.ts Groups operations into HillCharts, adds naming/resourceType overrides.
typescript/src/generated/services/hill-charts.ts New generated HillCharts service (get, updateSettings).
typescript/src/generated/services/index.ts Exports HillChartsService from generated services index.
typescript/src/client.ts Exposes hillCharts service on the public TS client.
typescript/src/index.ts Re-exports HillChartsService + request type from package entrypoint.
typescript/tests/services/hill-charts.test.ts Adds vitest coverage for get/updateSettings, including request-body assertion.
ruby/scripts/generate-services.rb Adds HillCharts service split + method overrides + simple resource list update.
ruby/lib/basecamp/generated/services/hill_charts_service.rb Adds generated Ruby HillCharts service (get, update_settings).
ruby/lib/basecamp/generated/types.rb Adds HillChart/HillChartDot types (typed models).
ruby/lib/basecamp/generated/metadata.json Adds retry/idempotency metadata for new operations.
ruby/lib/basecamp/client.rb Adds hill_charts service accessor on the Ruby client.
ruby/test/basecamp/services/hill_charts_service_test.rb Adds minitest coverage for new Ruby service methods + body assertion.
swift/Sources/BasecampGenerator/ServiceGrouper.swift Adds HillCharts split to Swift generator grouping.
swift/Sources/BasecampGenerator/MethodNaming.swift Adds method name overrides + simple resource additions for hill charts.
swift/Sources/BasecampGenerator/Utilities.swift Adds resourceType override for UpdateHillChartSettings.
swift/Sources/Basecamp/Generated/Services/HillChartsService.swift New generated Swift HillCharts service.
swift/Sources/Basecamp/Generated/Models/HillChart.swift New generated Swift HillChart model.
swift/Sources/Basecamp/Generated/Models/HillChartDot.swift New generated Swift HillChartDot model.
swift/Sources/Basecamp/Generated/Models/UpdateHillChartSettingsRequest.swift New generated Swift request model.
swift/Sources/Basecamp/Generated/Metadata.swift Adds retry config entries for hill chart operations.
swift/Sources/Basecamp/Generated/AccountClient+Services.swift Adds Swift hillCharts service accessor.
kotlin/generator/src/main/kotlin/com/basecamp/sdk/generator/Config.kt Adds HillCharts grouping, naming, resourceType overrides, and simple resources.
kotlin/generator/src/main/kotlin/com/basecamp/sdk/generator/OperationParser.kt Applies resourceType overrides during parsing.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/hill-charts.kt New generated Kotlin HillCharts service.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/services/Types.kt Adds request body type for UpdateHillChartSettings.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/HillChart.kt New generated Kotlin HillChart model.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/models/HillChartDot.kt New generated Kotlin HillChartDot model.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/ServiceAccessors.kt Adds Kotlin hillCharts accessor on AccountClient.
kotlin/sdk/src/commonMain/kotlin/com/basecamp/sdk/generated/Metadata.kt Adds operation config entries for new hill chart operations.

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

@github-actions
Copy link
Copy Markdown

## Spec Change Impact

### Changes:
- **Added Operations:**
  - `GetHillChart`
  - `UpdateHillChartSettings`
- **Added Types:**
  - New request/response structures associated with the added operations.

### SDK Impact:
- All SDKs need regeneration to support the new operations and types.

### Breaking Change:
- No breaking changes detected (no operations or fields were removed or modified in a backward-incompatible manner).

### SDKs Needing Updates:
- [ ] Go
- [ ] TypeScript
- [ ] Ruby
- [ ] Kotlin
- [ ] Swift

@jeremy jeremy merged commit 3ed8541 into basecamp:main Mar 18, 2026
41 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)
robzolkos added a commit to basecamp/basecamp-cli that referenced this pull request Mar 18, 2026
Bump SDK to pick up HillChartsService (basecamp/basecamp-sdk#195) and
add `basecamp hillcharts` with three subcommands:

- show: display hill chart state for a todoset
- track: add todolists to the hill chart
- untrack: remove todolists from the hill chart

When `show` gets a 403 (BC3 returns forbidden for disabled hill charts),
the CLI detects whether the project has todolists and returns an
actionable hint instead of a generic "access denied".
robzolkos added a commit to basecamp/basecamp-cli that referenced this pull request Mar 18, 2026
Bump SDK to pick up HillChartsService (basecamp/basecamp-sdk#195) and
add `basecamp hillcharts` with three subcommands:

- show: display hill chart state for a todoset
- track: add todolists to the hill chart
- untrack: remove todolists from the hill chart

When `show` gets a 403 (BC3 returns forbidden for disabled hill charts),
the CLI detects whether the project has todolists and returns an
actionable hint instead of a generic "access denied".
jeremy pushed a commit to basecamp/basecamp-cli that referenced this pull request Mar 20, 2026
Bump SDK to pick up HillChartsService (basecamp/basecamp-sdk#195) and
add `basecamp hillcharts` with three subcommands:

- show: display hill chart state for a todoset
- track: add todolists to the hill chart
- untrack: remove todolists from the hill chart

When `show` gets a 403 (BC3 returns forbidden for disabled hill charts),
the CLI detects whether the project has todolists and returns an
actionable hint instead of a generic "access denied".
jeremy added a commit to basecamp/basecamp-cli that referenced this pull request Mar 20, 2026
* Add hill chart commands (show, track, untrack)

Bump SDK to pick up HillChartsService (basecamp/basecamp-sdk#195) and
add `basecamp hillcharts` with three subcommands:

- show: display hill chart state for a todoset
- track: add todolists to the hill chart
- untrack: remove todolists from the hill chart

When `show` gets a 403 (BC3 returns forbidden for disabled hill charts),
the CLI detects whether the project has todolists and returns an
actionable hint instead of a generic "access denied".

* Fix misleading --todoset help text and remove dead disabled branch

- The help example showed --todoset as standalone but it always requires
  --project; updated the example to show both flags together and added
  an e2e test covering the --todoset-without-project path.
- BC3 returns 403 when hill charts are disabled, never a 200 with
  enabled: false, so the "Hill chart disabled" summary was dead code.
  Added a FIXME noting the upstream 403 behavior.

* Fix hint placeholder to match command usage pattern

Change <id> to <todolist-ids> in the 403 hint message to be
consistent with the track subcommand's usage string.

* Fix hillcharts to work with --todoset alone and validate ownership

Gate project resolution: when --todoset is explicit, skip project
resolution entirely (DockTool short-circuits anyway). When both
--project and --todoset are provided, validate the todoset belongs
to the stated project via Todosets().Get() bucket check.

Narrow the 403 heuristic to only replace the error when
TodolistsCount == 0 (unambiguous: can't have a hill chart with no
todolists). The TodolistsCount > 0 case was ambiguous between
"disabled" and genuine access denial — let it fall through.

Breadcrumbs and hints now use --todoset when the todoset was
explicitly provided, --in when auto-detected from project.

* Add hillcharts unit tests and update e2e coverage

Unit tests cover 403 heuristic (empty/non-empty/probe-fail),
project-todoset mismatch validation, todoset-only success paths
for show/track/untrack, and the scope/hint helpers.

E2e tests verify --todoset bypasses project requirement for all
three subcommands (show, track, untrack).

* Handle non-numeric project ID in validateTodosetOwnership

Return a usage error instead of silently defaulting to 0, which
would produce a misleading ownership mismatch message.

* Fix empty-project hint in todolist resolution and add test coverage

Use ErrUsageHint helper instead of struct literal for the empty-todoset
error. Fix resolveTodolistInTodoset to omit --in when projectID is
empty, avoiding broken hints like '--in  --todoset'. Add tests for
comma-separated ID parsing and todolist name resolution.

---------

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