Skip to content

Boost from Hey!, Assignments, and Pulse with cross-account routing#155

Merged
jeremy merged 2 commits intomainfrom
boost-cross-account
Feb 25, 2026
Merged

Boost from Hey!, Assignments, and Pulse with cross-account routing#155
jeremy merged 2 commits intomainfrom
boost-cross-account

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Feb 25, 2026

Summary

  • Add b/B boost key to Hey!, Assignments, and Pulse views (matching existing Todos/Messages/Cards pattern)
  • Add AccountID to BoostTarget for cross-account boost routing
  • Hub.CreateBoost uses ClientFor(accountID) when target is from a different account
  • Error on nil client when account lookup fails

Test plan

  • TestWorkspace_BoostTarget_PreservesAccountID — OpenBoostPickerMsg stores cross-account target
  • TestWorkspace_BoostEmoji_PassesCrossAccountTarget — createBoostFunc spy verifies account-aware routing
  • TestWorkspace_BoostPickerDismiss_ClearsState — Esc dismisses picker

Introduce FocusedItemScope (AccountID, ProjectID, RecordingID) to replace
the previous recording-ID-only interface. The workspace's `o` handler now
merges all non-zero fields from the focused item into the scope before
building the Basecamp URL, so pressing `o` from Hey!, Assignments, Pulse,
or any other global view opens the correct item — not the project root.

All 9 list views implement FocusedItem(): assignments, hey, pulse, activity,
timeline, search, messages, todos, campfire (returns zero — no single-item
URL for chat).
Add b/B key to Hey!, Assignments, and Pulse views — all three emit
OpenBoostPickerMsg with full scope (AccountID, ProjectID, RecordingID).

BoostTarget gains an AccountID field. Hub.CreateBoost now accepts
accountID and routes through multi.ClientFor() when non-empty, falling
back to the current account client otherwise. This fixes cross-account
boosting where items from a different account would silently hit the
wrong API endpoint.
Copilot AI review requested due to automatic review settings February 25, 2026 05:44
@jeremy jeremy enabled auto-merge (squash) February 25, 2026 05:44
@jeremy jeremy merged commit b9e49e8 into main Feb 25, 2026
12 checks passed
@jeremy jeremy deleted the boost-cross-account branch February 25, 2026 05:47
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

This PR adds boost functionality to three cross-account views (Hey!, Assignments, and Pulse) with proper account routing support. The implementation extends the existing boost pattern to handle items from multiple accounts by adding an AccountID field to BoostTarget and updating Hub.CreateBoost to route requests to the appropriate account client.

Changes:

  • Add b/B key binding and boostSelected() methods to Hey!, Assignments, and Pulse views
  • Extend BoostTarget with AccountID field for cross-account routing
  • Update Hub.CreateBoost to accept accountID parameter and use ClientFor() for cross-account operations

Reviewed changes

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

Show a summary per file
File Description
internal/tui/workspace/msg.go Add AccountID field to BoostTarget struct for cross-account routing
internal/tui/workspace/workspace.go Add createBoostFunc injection point for testing; update createBoost to pass AccountID to Hub
internal/tui/workspace/data/hub.go Update CreateBoost signature to accept accountID parameter; implement cross-account client routing with nil check
internal/tui/workspace/views/hey.go Add boost key binding and boostSelected() method that includes meta.AccountID
internal/tui/workspace/views/pulse.go Add boost key binding and boostSelected() method that includes meta.AccountID
internal/tui/workspace/views/assignments.go Add boost key binding and boostSelected() method that includes meta.AccountID
internal/tui/workspace/workspace_test.go Add comprehensive tests for cross-account boost targeting, picker state, and dismissal; initialize boostPicker in test helpers

💡 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: f623b4eb08

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

Comment on lines 1300 to +1301
ctx := w.session.Hub().ProjectContext()
_, err := w.session.Hub().CreateBoost(ctx, target.ProjectID, target.RecordingID, emoji)
_, err := w.session.Hub().CreateBoost(ctx, target.AccountID, target.ProjectID, target.RecordingID, emoji)

Choose a reason for hiding this comment

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

P2 Badge Use target-scoped context for cross-account boosts

This boost mutation always uses ProjectContext(), which resolves to the currently active account/project realm, not the target item's account. After this commit, Hey!/Assignments/Pulse can boost recordings from other accounts, so switching accounts while the request is in flight can cancel the context and fail the boost even though the target account is different. For cross-account targets (target.AccountID != ""), use a context that is not tied to the current account realm (for example global or target-account scoped) to avoid spurious cancellations.

Useful? React with 👍 / 👎.

jeremy added a commit that referenced this pull request Feb 25, 2026
)

* Open-in-browser from list views with full cross-account scope

Introduce FocusedItemScope (AccountID, ProjectID, RecordingID) to replace
the previous recording-ID-only interface. The workspace's `o` handler now
merges all non-zero fields from the focused item into the scope before
building the Basecamp URL, so pressing `o` from Hey!, Assignments, Pulse,
or any other global view opens the correct item — not the project root.

All 9 list views implement FocusedItem(): assignments, hey, pulse, activity,
timeline, search, messages, todos, campfire (returns zero — no single-item
URL for chat).

* Boost from Hey!, Assignments, and Pulse with cross-account routing

Add b/B key to Hey!, Assignments, and Pulse views — all three emit
OpenBoostPickerMsg with full scope (AccountID, ProjectID, RecordingID).

BoostTarget gains an AccountID field. Hub.CreateBoost now accepts
accountID and routes through multi.ClientFor() when non-empty, falling
back to the current account client otherwise. This fixes cross-account
boosting where items from a different account would silently hit the
wrong API endpoint.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants