Skip to content

refactor: Rename overarching_goal to goal#321

Closed
jhodapp wants to merge 2 commits intomainfrom
refactor/rename-overarching-goal-to-goal
Closed

refactor: Rename overarching_goal to goal#321
jhodapp wants to merge 2 commits intomainfrom
refactor/rename-overarching-goal-to-goal

Conversation

@jhodapp
Copy link
Member

@jhodapp jhodapp commented Mar 1, 2026

Description

Renames all overarching_goal references to goal across the entire frontend codebase — types, API client, SSE event handlers, components, and tests.

This is the first step in a wider refactor and enhancement of goals throughout the platform.

GitHub Issue: Complements backend refactor-platform-rs PR #234

Changes

  • Renamed 4 source files via git mv (overarching-goal.tsgoal.ts, overarching-goals.tsgoals.ts, overarching-goal.tsxgoal.tsx, overarching-goal-container.tsxgoal-container.tsx)
  • Updated all type definitions: OverarchingGoalGoal, OverarchingGoalSortFieldGoalSortField, SSE event types, EnrichedCoachingSession.overarching_goal.goal, GoalContext.overarchingGoalId.goalId
  • Rewrote API client: URL /overarching_goals/goals, OverarchingGoalApiGoalApi, all SWR hooks renamed
  • Updated SSE cache invalidation: event names overarching_goal_*goal_*, endpoint path /overarching_goals/goals
  • Updated 6 component/consumer files (goal component, goal container, coaching session page, session selector, today session card, join session popover)
  • Updated buildGoalContext() and groupActionsByGoal() in assigned-actions utils
  • Updated 14 test files (mock paths, mock data fields, variable names)

Testing Strategy

  • npx tsc --noEmit — 0 new errors (1 pre-existing in unrelated prototype file)
  • npm run lint — 0 errors
  • npm test — 58 test files, 596 tests all passing
  • grep -ri "overarching" src/ __tests__/ — 0 matches

Concerns

Complements backend PR #234 which renames the overarching_goals DB table,
API endpoints, and SSE events. This PR updates all frontend references to
match: types, API client, SSE cache invalidation, components, consumers,
and 14 test files (~90 references across 30 files).

Must deploy simultaneously with backend PR #234.
@jhodapp jhodapp self-assigned this Mar 1, 2026
@jhodapp jhodapp added the enhancement Improves existing functionality or feature label Mar 1, 2026
@jhodapp jhodapp moved this to 🏗 In progress in Refactor Coaching Platform Mar 1, 2026
@jhodapp jhodapp added this to the 1.0.0-beta3 milestone Mar 1, 2026
@jhodapp jhodapp changed the title refactor: rename overarching_goal to goal refactor: Rename overarching_goal to goal Mar 1, 2026
@jhodapp jhodapp marked this pull request as ready for review March 1, 2026 18:13
@jhodapp jhodapp moved this from 🏗 In progress to Review in Refactor Coaching Platform Mar 1, 2026
@jhodapp jhodapp requested a review from calebbourg March 1, 2026 18:13
@jhodapp
Copy link
Member Author

jhodapp commented Mar 2, 2026

Closing to re-open as a fresh PR to trigger a clean CI run for the PR Preview pipeline fixes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improves existing functionality or feature

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant