Skip to content

feat(coachhelm): consolidate coach CoachHelm nav + fix player-route mis-targets - #300

Closed
njrini99-code wants to merge 2 commits into
mainfrom
feat/coachhelm-coach-consolidation
Closed

feat(coachhelm): consolidate coach CoachHelm nav + fix player-route mis-targets#300
njrini99-code wants to merge 2 commits into
mainfrom
feat/coachhelm-coach-consolidation

Conversation

@njrini99-code

@njrini99-code njrini99-code commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Why

Companion to the player consolidation (#299). Audit finding: the coach CoachHelm is already tabbed — every coach surface (Brief / Signals / Players / Effectiveness / Ask) already mounts the shared CoachHelmShell tab strip. A 9-agent route map confirmed all 7 coach routes mount the shell with the correct active tab and zero duplicate mastheads. So the coach side needed the residual scatter removed, not a re-tabbing.

What

1. Rail — drop the duplicate "Development" item (both coach rails):

File Removed
GolfSidebar.tsx (coachSecondaryNav) Development → /golf/dashboard/development
FairwayDashboardShell.tsx (coach 'Operations') Development → /golf/dashboard/development

It duplicated the CoachHelm Players tab (Players → /development), re-scattering one CoachHelm surface into Operations next to genuine team-ops. Development plans stay reachable via CoachHelm AI → Players tab and the unchanged cmd-K "Development Plans". The coach now has one rail entry into CoachHelm: CoachHelm AI.

2. Bug — two coach entry points dead-ended on the PLAYER-only front door. /golf/dashboard/coachhelm shows coaches a "Player Dashboard Only" dead-end; the coach home is /intelligence (the Brief).

  • cmd-K "Today's Calls" → repointed to /intelligence.
  • Stats page "View all in CoachHelm" link (StatsIntelligenceStrip) → made audience-aware: coach → /intelligence, player → /coachhelm.

3. cmd-K palette — consolidate the CoachHelm cluster (folds the two approved follow-ups in):

  • Merged the two entries that both point at /intelligence ("Today's Calls" + "CoachHelm AI" — the duplicate the re-target above exposed) into one "CoachHelm AI" Brief entry.
  • Folded the Alerts / Insights / Open Patterns triplet (three routes that are all the one Signals tab) into one "CoachHelm Signals" entry → /alerts.
  • All member routes stay searchable via keywords ("today's calls", "command center", "patterns", "insights", "triage"…) so nothing becomes unreachable. Net: 5 coach palette entries → 2, mirroring the tabs. Distinct surfaces (Effectiveness, Ask/Chat, Genome Compare, Development Plans) keep their own deep-links.

Intentionally NOT changed (verified, with reasons):

  • Insights route signalCount = null — a documented anti badge-vs-tile-contradiction choice ("badge 13 vs tile 8"), not scatter.
  • The in-page CoachHelm "surface-hub grid" — it lives only in the legacy flag-OFF Brief (IntelligenceCommandCenter); the live flag-ON Brief (FairwayBrief) has no grid. The flag-OFF page has no sub-nav tab strip, so that grid is its only cross-surface nav — removing it would strand the fallback, not consolidate it. Nothing redundant to remove in the live experience.

Verification

  • Map workflow (9 agents): 7/7 coach routes mount the shell, correct active tabs, 0 duplicate mastheads.
  • Adversarial review (3 lenses — diff-correctness, regression/deep-links, completeness): all ship, zero blockers, zero verified must-fix. Confirmed /development stays reachable (Players tab + cmd-K), no test/e2e asserts the removed items, IconTarget still used, coachhelm badge untouched.
  • tsc --noEmit clean · npm run lint 0 errors · 2510 unit tests pass.

Reviewer note

Companion to #299 (player). Edits different lines than #299 in the two shared rail files, so they merge cleanly. Not merged — review alongside the player PR.

🤖 Generated with Claude Code

Greptile Summary

This PR removes duplicate "Development" nav entries from both coach rail implementations, consolidates five scattered CoachHelm cmd-K shortcuts into two tab-aligned entries (CoachHelm AI / CoachHelm Signals), and fixes two dead-end links that were sending coaches to the player-only /coachhelm front door instead of the coach home at /intelligence.

  • Rail cleanup (GolfSidebar.tsx, FairwayDashboardShell.tsx): removes the lone "Development" item that re-exposed a CoachHelm Players-tab route as a standalone Operations item, leaving one entry into CoachHelm for coaches.
  • CommandPalette consolidation (CommandPalette.tsx): todays-calls, alerts, insights, and patterns are folded into two entries whose keyword lists keep every former entry discoverable; the todays-calls dead-end (/coachhelm) is eliminated in the process.
  • Audience-aware routing (StatsIntelligenceStrip.tsx): the "View all in CoachHelm" link now sends coaches to /intelligence and players to /coachhelm, fixing the same dead-end class that affected todays-calls.

Confidence Score: 5/5

All four changes are safe to merge: two are pure removals of duplicate nav entries, one is a keyword-consolidation in the command palette, and one is a targeted audience-aware routing fix with a correctly-typed prop guard.

The routing fix in StatsIntelligenceStrip is guarded by the typed audience prop, the removed nav items remain reachable via CoachHelm AI tab and cmd-K, and the palette consolidation preserves every old keyword. No logic paths are left broken or unreachable.

No files require special attention.

Important Files Changed

Filename Overview
src/components/golf/stats/StatsIntelligenceStrip.tsx Audience-aware routing fix: coaches now link to /intelligence instead of the /coachhelm dead-end; audience prop is correctly typed as 'player'
src/components/golf/CommandPalette.tsx Consolidates 5 coach CoachHelm palette entries (todays-calls, intelligence, alerts, insights, patterns) into 2 (CoachHelm AI + CoachHelm Signals); old keywords preserved so routes stay discoverable.
src/components/golf/layout/GolfSidebar.tsx Removes duplicate "Development" entry from coachSecondaryNav; route stays reachable via CoachHelm AI → Players tab and cmd-K.
src/app/golf/(dashboard)/FairwayDashboardShell.tsx Removes duplicate "Development" entry from the Operations section of the Fairway coach nav, matching the GolfSidebar change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph before [Before PR]
        A1[Coach: View all in CoachHelm] --> B1[dead-end at coachhelm]
        A2[Coach cmd-K: Todays Calls] --> B2[dead-end at coachhelm]
        A3[Coach cmd-K: alerts / insights / patterns] --> B3[3 scattered entries]
        A4[Coach rail: Development] --> B4[duplicate Players tab route]
    end

    subgraph after [After PR]
        C1[Coach: View all in CoachHelm] --> D1[intelligence - Coach Brief]
        C2[Coach cmd-K: CoachHelm AI] --> D2[intelligence - Coach Brief]
        C3[Coach cmd-K: CoachHelm Signals] --> D3[alerts - Signals tab]
        C4[Coach rail: Development removed] --> D4[CoachHelm AI Players tab]
    end

    E[Player: View all in CoachHelm] --> F[coachhelm - unchanged]
Loading

Fix All in Claude Code

Reviews (2): Last reviewed commit: "feat(coachhelm): consolidate the coach c..." | Re-trigger Greptile

…is-targets

The coach CoachHelm is already tabbed — every coach surface (Brief/Signals/
Players/Effectiveness/Ask) already mounts the shared CoachHelmShell tab strip,
verified by a per-route audit. So the coach side needed only the residual
scatter removed, not a re-tabbing:

- Rail: drop the standalone "Development" item from BOTH coach rails
  (GolfSidebar coachSecondaryNav + FairwayDashboardShell 'Operations'). It
  duplicated the CoachHelm "Players" tab (Players → /development) — re-scattering
  one CoachHelm surface into Operations next to genuine team-ops. Development
  plans stay reachable via CoachHelm AI → Players tab and cmd-K "Development
  Plans" (unchanged). One rail entry into CoachHelm now: "CoachHelm AI".

- Bug: two coach entry points dead-ended coaches on the PLAYER-only CoachHelm
  front door (/coachhelm shows coaches a "Player Dashboard Only" state):
    • cmd-K "Today's Calls" → repointed to the coach Brief /intelligence (its
      description "Open the CoachHelm command center" already meant the
      IntelligenceCommandCenter).
    • Stats page "View all in CoachHelm" link (StatsIntelligenceStrip) → made
      audience-aware: coach → /intelligence, player → /coachhelm. (Same bug
      class; surfaced by the consolidation review.)

The Insights route's deliberate Signals-badge suppression (signalCount=null, a
documented anti badge-vs-tile-contradiction choice) was intentionally left as-is.

Verification: 9-agent map (all 7 coach routes mount the shell with correct
active tabs, zero duplicate mastheads) + 3-lens adversarial review (all ship,
zero blockers). typecheck clean · lint 0 errors · 2510 unit tests pass.

Out of scope (noted for follow-up): the in-page CoachHelm surface-hub grid on
the Brief page is now redundant with the tab strip (owner decision); the cmd-K
Alerts/Insights/Patterns triplet could fold into one "Signals" entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
helmv3 Ready Ready Preview, Comment Jun 15, 2026 3:05am

Request Review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Removes the "Development" nav item from the coach role's sidebar and dashboard shell Operations menu, consolidates five CoachHelm command palette entries into two, and makes the StatsIntelligenceStrip "View all" link route to different destinations based on the audience prop (coach vs. player).

Changes

Coach Navigation Restructure

Layer / File(s) Summary
Remove Development from coach nav surfaces
src/components/golf/layout/GolfSidebar.tsx, src/app/golf/(dashboard)/FairwayDashboardShell.tsx
"Development" entry removed from the coach secondary nav array and Operations section; "Recruiting HQ" added as replacement in the sidebar.
Consolidate CoachHelm command palette entries
src/components/golf/CommandPalette.tsx
coachQuickActions replaces five discrete CoachHelm sub-tab entries ("Today's Calls", "Intelligence", "Alerts", "Insights", "Patterns") with two consolidated items ("CoachHelm AI", "CoachHelm Signals") bearing updated routes and broader keyword arrays.
Audience-aware "View all" routing in StatsIntelligenceStrip
src/components/golf/stats/StatsIntelligenceStrip.tsx
The top-insight "View all" href is now conditionally set: coaches get /golf/dashboard/intelligence, players get /golf/dashboard/coachhelm.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • njrini99-code/helmv3#209: Directly modifies the same FairwayDashboardShell.tsx coach navigation sections and CommandPalette.tsx coach quick actions that this PR restructures.
  • njrini99-code/helmv3#35: Also touches audience-dependent navigation around the "Development" area and player-facing routing, overlapping with the Development removal and audience-aware link changes here.
🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (11 passed)
Check name Status Explanation
Title check ✅ Passed Title follows Conventional Commits with required scope 'coachhelm' and clearly describes the main changes: consolidating coach CoachHelm navigation and fixing player-route mis-targets.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No Service-Role In Client Bundles ✅ Passed All 4 modified files (FairwayDashboardShell.tsx, CommandPalette.tsx, GolfSidebar.tsx, StatsIntelligenceStrip.tsx) are free of SUPABASE_SERVICE_ROLE_KEY references; they contain only navigation UI a...
Rls Coverage On New Tables ✅ Passed PR contains zero database migrations. Check requires migration with CREATE TABLE; no migrations exist in this UI/navigation consolidation PR.
Auth Check In Server Actions ✅ Passed PR modifies only UI components (CommandPalette.tsx, FairwayDashboardShell.tsx, GolfSidebar.tsx, StatsIntelligenceStrip.tsx), not server action files. Auth check does not apply.
Sport-Prefixed Table Names ✅ Passed All four modified files (FairwayDashboardShell.tsx, CommandPalette.tsx, GolfSidebar.tsx, StatsIntelligenceStrip.tsx) are UI/navigation components with no Supabase .from() queries. Check is not ap...
No Destructive Writes ✅ Passed PR modifies only frontend navigation/routing components with no database operations. No save/submit/sync code paths, no DELETE+INSERT patterns, no destructive writes detected.
No Edits To Historical Migrations ✅ Passed PR modifies only source files (src/components/, src/app/, ios/, scripts/) and does not edit any files under supabase/migrations/. No historical migrations are being modified.
Conventional Commits ✅ Passed Commit message "feat(coachhelm): consolidate the coach cmd-K CoachHelm cluster" matches the Conventional Commits pattern: type (feat) + scope (coachhelm) + separator + description.
Description check ✅ Passed The description directly addresses the changeset: removal of duplicate 'Development' rail entries, fixing dead-end coach routes to /coachhelm, and consolidating CoachHelm palette entries.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/coachhelm-coach-consolidation

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment thread src/components/golf/CommandPalette.tsx Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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: 84ca5887dd

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

{ name: 'Tasks', href: '/golf/dashboard/tasks', icon: IconClipboardList },
{ name: 'Recruiting HQ', href: '/golf/dashboard/recruiting', icon: IconUserPlus },
{ name: 'Development', href: '/golf/dashboard/development', icon: IconTarget },
{ name: 'Qualifiers', href: '/golf/dashboard/qualifiers', icon: IconFlag },];

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep Development in the legacy coach sidebar

When NEXT_PUBLIC_REDESIGN is unset or false, GolfSidebar is the active shell and /dashboard/development renders the legacy DevelopmentPlansClient without the CoachHelm Players tab; that tab exists only inside the route's isRedesignEnabled() branch. Removing this entry therefore does not consolidate a duplicate in the supported flag-off experience—it removes the only visible navigation link to Development Plans, leaving coaches dependent on Cmd+K or a direct URL. Keep this item for the legacy sidebar and remove it only from the Fairway navigation.

Useful? React with 👍 / 👎.

Follow-up to the rail consolidation in this PR. The cmd-K palette repeated a
single CoachHelm tab's member routes as separate entries, which read as scatter
once the sub-nav unified them:

- Merge the two entries that both pointed at /intelligence — "Today's Calls"
  and "CoachHelm AI" (the duplicate the Today's-Calls re-target in this PR
  exposed) — into ONE "CoachHelm AI" Brief entry. "today's calls" / "command
  center" stay as keywords so the old search terms still resolve.
- Fold the Alerts / Insights / Open Patterns triplet (three routes that are all
  the one "Signals" tab) into ONE "CoachHelm Signals" entry → /alerts, with
  every member's keywords (alerts/insights/patterns/triage/mining) preserved so
  nothing becomes unreachable.

Net: 5 coach palette entries → 2, mirroring the consolidated tabs. Distinct
CoachHelm surfaces (Effectiveness/Analytics, Ask/Chat, Genome Compare,
Development Plans) keep their own deep-links.

NOT done — the in-page CoachHelm "surface-hub grid" is ONLY in the legacy
flag-OFF Brief (IntelligenceCommandCenter); the live flag-ON Brief (FairwayBrief)
has no grid. In the flag-OFF page there is no sub-nav tab strip, so that grid is
its ONLY cross-surface nav — removing it would strand the fallback, not
consolidate it. So there is nothing redundant to remove in the live experience.

typecheck clean · lint 0 errors · 2510 unit tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@njrini99-code

Copy link
Copy Markdown
Owner Author

Superseded by #304, which rolls this onto a single branch (feat/coachhelm-stats-roundup) with all four PRs merged clean + a merge-interaction fix. Branch feat/coachhelm-coach-consolidation is untouched and this PR can be reopened if needed.

@njrini99-code
njrini99-code deleted the feat/coachhelm-coach-consolidation branch June 29, 2026 12:17
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.

1 participant