From 3d8abfe75555e8f34e28324574d09c29096a0e6b Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Tue, 22 Sep 2026 17:05:15 -0500 Subject: [PATCH 1/2] Move to actioncable-client v2 basecamp/actioncable-go was renamed to basecamp/actioncable-client and its Go module now lives at github.com/basecamp/actioncable-client/go/v2. Switch the import path and require to v2.0.2. The exported API is a superset of v1.1.0 and client.go is unchanged, so WithStopOnError keeps stopping reconnects on an authentication failure. --- AGENTS.md | 2 +- API-COVERAGE.md | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- internal/cable/cable.go | 2 +- internal/cable/cable_test.go | 2 +- internal/cmd/tui_watch.go | 2 +- internal/cmd/tui_watch_test.go | 2 +- internal/cmd/watch.go | 2 +- internal/cmd/watch_calendar.go | 2 +- internal/cmd/watch_new_test.go | 2 +- internal/cmd/watch_test.go | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index aa5bb86b..1d2bfab2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -647,7 +647,7 @@ This works in Kitty and Ghostty. Other terminals show the text content normally ### Watching for changes over Action Cable `hey watch` is told when a box changed instead of polling for it. -`internal/cable` dials HEY's cable server with [actioncable-go](github.com/basecamp/actioncable-go), +`internal/cable` dials HEY's cable server with [actioncable-client](https://github.com/basecamp/actioncable-client/tree/main/go)'s Go module, authorizing the upgrade request with the same credentials the SDK sends on an API request (`HEY_CABLE_URL` overrides the endpoint). `internal/cmd/watch.go` subscribes to haystack's `Postings::ChangesChannel`, which broadcasts only `{change, account_id, box_id, diff --git a/API-COVERAGE.md b/API-COVERAGE.md index 1480e1db..02af350e 100644 --- a/API-COVERAGE.md +++ b/API-COVERAGE.md @@ -115,8 +115,8 @@ which is what `Entries().ListDraftsPage` and `hey draft list --page` exist for. | `/calendar/todos/{id}/completions.json` | DELETE | SDK `CalendarTodos().Uncomplete` | `hey todo uncomplete ` | covered | | `/calendar/todos/{id}.json` | DELETE | SDK `CalendarTodos().Delete` | `hey todo delete ` | covered | | `/boxes/{id}/postings/changes.json` | GET | SDK `Postings().AllChanges` | `hey watch` | covered | -| `/cable` (`Postings::ChangesChannel`) | WS | `internal/cable` + actioncable-go | `hey watch`, TUI mail list | covered | -| `/cable` (`Turbo::StreamsChannel`) | WS | `internal/cable` + actioncable-go | TUI Screener (stream name from `/clearances.json`) | covered | +| `/cable` (`Postings::ChangesChannel`) | WS | `internal/cable` + actioncable-client | `hey watch`, TUI mail list | covered | +| `/cable` (`Turbo::StreamsChannel`) | WS | `internal/cable` + actioncable-client | TUI Screener (stream name from `/clearances.json`) | covered | | `/identity.json` | GET | SDK `Identity().GetIdentity` | `hey account list`, `--account` validation | covered | | `/oauth/authorizations/new` | GET | `internal/auth` (PKCE S256) | `hey auth login` | covered | | `/oauth/tokens` | POST | `internal/auth` | `hey auth login`, `hey auth refresh`, automatic refresh | covered | diff --git a/go.mod b/go.mod index f1cadb43..90c9228b 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( charm.land/bubbletea/v2 v2.0.9 charm.land/glamour/v2 v2.0.1 charm.land/lipgloss/v2 v2.0.6 - github.com/basecamp/actioncable-go v1.1.0 + github.com/basecamp/actioncable-client/go/v2 v2.0.2 github.com/basecamp/hey-sdk/go v0.31.1 github.com/basecamp/mcp v0.0.0-20260828100356-2d6f44b51e9d github.com/charmbracelet/x/ansi v0.11.8 diff --git a/go.sum b/go.sum index 656af9d5..2617aaf5 100644 --- a/go.sum +++ b/go.sum @@ -87,8 +87,8 @@ github.com/aymanbagabas/go-udiff v0.4.1 h1:OEIrQ8maEeDBXQDoGCbbTTXYJMYRCRO1fnodZ github.com/aymanbagabas/go-udiff v0.4.1/go.mod h1:0L9PGwj20lrtmEMeyw4WKJ/TMyDtvAoK9bf2u/mNo3w= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/basecamp/actioncable-go v1.1.0 h1:AizmCxoKvmUMdqwMQCCLQrFaVbjp8RhkneWidxygc7E= -github.com/basecamp/actioncable-go v1.1.0/go.mod h1:ezaV5z1GXQAsqyejqTs6wCFl2D8Wj+COLQkHc/kwoRs= +github.com/basecamp/actioncable-client/go/v2 v2.0.2 h1:h2Sl15gj2lI/EX5E0EUxjyYgf0LF9Gn1zqEUInSrUpc= +github.com/basecamp/actioncable-client/go/v2 v2.0.2/go.mod h1:3Y0N9V5LXclT5nQWcPhq/+6rj4eKXgKAX8dx15X8yB8= github.com/basecamp/hey-sdk/go v0.31.1 h1:dFlCe4LMmLAHgRB05QRHaE26XPPkZVIMp0qCGEanVQU= github.com/basecamp/hey-sdk/go v0.31.1/go.mod h1:eCJOhTLOpi2FCQUXireHZQ7DzRs2TUqvYhRDTfVLoDY= github.com/basecamp/mcp v0.0.0-20260828100356-2d6f44b51e9d h1:zEQVGq1x1nhKMZ2TudFAcSJ32CHT8richI1vQakIKz4= diff --git a/internal/cable/cable.go b/internal/cable/cable.go index 5e5aa7b3..46871395 100644 --- a/internal/cable/cable.go +++ b/internal/cable/cable.go @@ -12,7 +12,7 @@ import ( "strings" "time" - "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" "github.com/basecamp/hey-cli/internal/apierr" "github.com/basecamp/hey-cli/internal/auth" diff --git a/internal/cable/cable_test.go b/internal/cable/cable_test.go index 1dd6d728..a5b86f64 100644 --- a/internal/cable/cable_test.go +++ b/internal/cable/cable_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - actioncable "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" "github.com/basecamp/hey-cli/internal/apierr" "github.com/basecamp/hey-cli/internal/auth" diff --git a/internal/cmd/tui_watch.go b/internal/cmd/tui_watch.go index 2a0e554b..8b53270b 100644 --- a/internal/cmd/tui_watch.go +++ b/internal/cmd/tui_watch.go @@ -5,7 +5,7 @@ import ( "sync" "time" - actioncable "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" hey "github.com/basecamp/hey-sdk/go/pkg/hey" diff --git a/internal/cmd/tui_watch_test.go b/internal/cmd/tui_watch_test.go index 038f5ea3..dd17b2f9 100644 --- a/internal/cmd/tui_watch_test.go +++ b/internal/cmd/tui_watch_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - actioncable "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" hey "github.com/basecamp/hey-sdk/go/pkg/hey" diff --git a/internal/cmd/watch.go b/internal/cmd/watch.go index 4f4b1b6d..d0a55d61 100644 --- a/internal/cmd/watch.go +++ b/internal/cmd/watch.go @@ -19,7 +19,7 @@ import ( "syscall" "time" - actioncable "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" "github.com/spf13/cobra" "github.com/basecamp/hey-sdk/go/pkg/generated" diff --git a/internal/cmd/watch_calendar.go b/internal/cmd/watch_calendar.go index 35b26fd5..a52732f5 100644 --- a/internal/cmd/watch_calendar.go +++ b/internal/cmd/watch_calendar.go @@ -8,7 +8,7 @@ import ( "sync" "time" - actioncable "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" "github.com/basecamp/hey-sdk/go/pkg/generated" hey "github.com/basecamp/hey-sdk/go/pkg/hey" diff --git a/internal/cmd/watch_new_test.go b/internal/cmd/watch_new_test.go index 120afa57..4ed71d2f 100644 --- a/internal/cmd/watch_new_test.go +++ b/internal/cmd/watch_new_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - actioncable "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" "github.com/basecamp/hey-sdk/go/pkg/generated" hey "github.com/basecamp/hey-sdk/go/pkg/hey" diff --git a/internal/cmd/watch_test.go b/internal/cmd/watch_test.go index 969a37ae..81b39445 100644 --- a/internal/cmd/watch_test.go +++ b/internal/cmd/watch_test.go @@ -15,7 +15,7 @@ import ( "testing" "time" - actioncable "github.com/basecamp/actioncable-go" + actioncable "github.com/basecamp/actioncable-client/go/v2" "github.com/basecamp/hey-sdk/go/pkg/generated" hey "github.com/basecamp/hey-sdk/go/pkg/hey" From f33fe8bd4630ddd40b276e0bd2cb0f6db104a9a1 Mon Sep 17 00:00:00 2001 From: Jeremy Daer Date: Tue, 22 Sep 2026 17:08:45 -0500 Subject: [PATCH 2/2] Refresh the Nix vendorHash for actioncable-client v2 --- nix/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index 1fd2d6e6..afdbe7a4 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -18,7 +18,7 @@ buildGoModule.override { inherit go; } (finalAttrs: { # To update: run `make update-nix-hash` (Docker). It rewrites this quoted # value in place, so keep it a string literal rather than lib.fakeHash. - vendorHash = "sha256-ZfLot6LMYS4yL+5A4Jb9qzNVRobgUuVqXkuWfnX751k="; + vendorHash = "sha256-jNT2p5zntEEnnZZXFWC+QAR/rVCITrUl2tq1GheiHeM="; subPackages = [ "cmd/hey" ];