Route both action tabs through relationship-actions endpoint#370
Merged
Route both action tabs through relationship-actions endpoint#370
Conversation
…h role-based assignee filtering Both "My Actions" and "Coachee Actions" now use the same batch relationship-actions endpoint, differentiated by assignee=coach vs assignee=coachee. This fixes the bug where both tabs showed identical results because My Actions used a different endpoint that wasn't filtering by assignee correctly. - Unified URL query string builder to always include the assignee param (previously dropped on single-relationship endpoint) - Parameterized assignmentFilterToRelationshipActionsParams with assigneeScope so it works for both coach and coachee views - Coachee-only users get assignee=coachee on My Actions (no tab toggle) - Removed dead user-actions path code from use-actions-fetch
The actions kanban page now fetches from the batch
/coaching_relationships/actions endpoint instead of /users/{id}/actions.
Updated mock routes and response format to match the new
BatchCoacheeActionsResponse shape.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes the bug where "My Actions" and "Coachee Actions" tabs showed identical results on the Actions page. Both tabs now use the same batch relationship-actions endpoint, differentiated by
assignee=coachvsassignee=coachee.Changes
relationship-actions.ts— theassigneeparam was previously dropped on single-relationship URLsassignmentFilterToRelationshipActionsParamswithassigneeScopeso it serves both coach and coachee viewsuse-actions-fetch.ts— both tabs now route throughuseBatchRelationshipActionsassignee=coach, coachee-only users getassignee=coacheeon "My Actions"assignmentFilterToUserActionsParams, unused importsScreenshots / Videos Showing UI Changes (if applicable)
None
Testing Strategy
npx tsc --noEmit— passesnpx vitest run— 22 tests pass acrossuse-actions-fetch,relationship-actions, anduse-all-actions-with-contexttest filesassignee=coachand "Coachee Actions" sendsassignee=coacheein network tabassigneeparam on the single-relationship endpointConcerns
/coaching_relationships/{rel_id}/actions) currently ignores theassigneequery param — backend team has confirmed the root cause and is implementing the fixuseUserActionsListis intentionally kept inuser-actions.tssince it's used by 3 other callers (panel-actions, assigned-actions, coaching-tabs-container)