Skip to content

chore: agent-legibility sweep — repo map, doc truth pass, dead-code deletion#796

Merged
njrini99-code merged 2 commits into
mainfrom
chore/agent-legibility-sweep
Jul 10, 2026
Merged

chore: agent-legibility sweep — repo map, doc truth pass, dead-code deletion#796
njrini99-code merged 2 commits into
mainfrom
chore/agent-legibility-sweep

Conversation

@njrini99-code

Copy link
Copy Markdown
Owner

Post-mission hygiene wave (task: agent-legibility). Read-only inventory by 6 scouts, write phase by 6 agents, adversarially diff-verified.

  • NEW docs/REPO_MAP.md — route atlas (baseball 106 / golf 64 / lifting 23 / admin 17 pages), canonical-idiom table with file:line anchors (action wrappers, toast, data access, design tokens incl. --notice-error-ink rationale, nav registries), known-traps list, and an agent pre-flight checklist. Linked from AGENTS.md + CLAUDE.md.
  • 77 doc-status headers (STALE / SUPERSEDED / PARKED) across docs/; memory/registry.yml re-pointed off January-era auth docs (YAML-verified).
  • 32 dead files deleted — 19 DEAD-CERTAIN from knip + individual grep verification, plus verified extras. Two unwired guard scripts reconciled: chart-palette.test.mjs deleted (5/6 subjects gone since W1; live coverage in vitest stat-visuals suites), drawers-mobile.test.mjs pruned + re-run green.
  • Config residue: deleted-dir references stripped from tsconfig/eslint.
  • Test hygiene: latent .range() mock-drift bug fixed in team-detail tests; stale skips re-documented; .env.example honesty pass (RESERVED markers on unwired integrations).

Held for owner decisions (NOT in this PR): web-push pipeline, Arccos adapter wiring, /golf/admin retirement, dep removals (need hermetic CI).

🤖 Generated with Claude Code

https://claude.ai/code/session_01J2E46URHkhCnEQSYDtZLJX

…de deletion, config+test hygiene

- NEW docs/REPO_MAP.md (route atlas both products + lifting + admin,
  canonical-idiom table with file:line anchors, traps list, agent
  pre-flight checklist) linked from AGENTS.md + CLAUDE.md.
- 77 doc-status headers (STALE/SUPERSEDED/PARKED) across docs/;
  memory/registry.yml re-pointed off the January auth docs (YAML-verified).
- 32 dead files deleted (19 DEAD-CERTAIN + verified extras incl. the
  golf-mockups .tsx shadowed by its newer .ts barrel); rotten unwired
  guard scripts reconciled: chart-palette.test.mjs deleted (5/6 subjects
  were already gone since W1; live coverage is in the vitest stat-visuals
  suites), drawers-mobile.test.mjs pruned of the deleted IntentDrawer
  case and re-run green (6/6).
- Config residue: next-shadcn-dashboard-starter + helm-vid stripped from
  tsconfig/eslint excludes.
- Test hygiene: team-detail .range mock-drift latent bug fixed; stale
  skip re-documented; env-var honesty pass on .env.example (RESERVED
  markers on unwired integrations).

Gates at commit: targeted suites green; full gates run in PR CI.
--no-verify: documented hook-hang bypass.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J2E46URHkhCnEQSYDtZLJX
@greptile-apps

greptile-apps Bot commented Jul 10, 2026

Copy link
Copy Markdown

Too many files changed for review. (126 files found, 50 file limit)

Bypass the limit by tagging @greptile-apps to review.

@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
helmv3 Ignored Ignored Preview Jul 10, 2026 11:31am

Request Review

@supabase

supabase Bot commented Jul 10, 2026

Copy link
Copy Markdown

Updates to Preview Branch (chore/agent-legibility-sweep) ↗︎

Deployments Status Updated
Database Fri, 10 Jul 2026 11:31:34 UTC
Services Fri, 10 Jul 2026 11:31:34 UTC
APIs Fri, 10 Jul 2026 11:31:34 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Fri, 10 Jul 2026 11:31:34 UTC
Migrations Fri, 10 Jul 2026 11:31:35 UTC
Seeding Fri, 10 Jul 2026 11:31:35 UTC
Edge Functions ⚠️ Fri, 10 Jul 2026 11:31:35 UTC

⚠️ Warning — Only Functions declared in config.toml will be automatically deployed to branches: [functions.my-slug]


View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e36bae21-0b4b-483e-9471-d45b6814cd1f

📥 Commits

Reviewing files that changed from the base of the PR and between a4cf220 and 3cd8fca.

📒 Files selected for processing (1)
  • src/components/golf/layout/AnimatedPage.tsx

Summary by CodeRabbit

  • Documentation
    • Clarified which configuration options are reserved or not currently used.
    • Added a repository “repo map” and updated development guidance.
    • Marked many plans, audits, and reports as superseded, parked, or historical.
  • Maintenance
    • Removed obsolete previews, mockups, and legacy golf analytics/navigation UI elements.
    • Updated dashboard terminology and a few navigation-related references.
  • Tests
    • Re-enabled the golf qualifier E2E test when credentials are present.
    • Improved admin pagination mocking coverage and refreshed the skip-list documentation.

Walkthrough

This PR adds repository structure guidance, archives historical documentation, removes obsolete UI modules, and updates test gating, mocks, metadata references, lint configuration, TypeScript exclusions, and migration status comments.

Changes

Repository guidance and cleanup

Layer / File(s) Summary
Environment and repository guidance
.env.example, AGENTS.md, CLAUDE.md, docs/REPO_MAP.md
Reserved environment variables and repository conventions are documented, including route mappings, canonical idioms, traps, and implementation checklists.
Historical documentation status
docs/**/*.md
Plans, audits, reports, and design documents are marked stale, parked, superseded, or historical; archived E2E audit links are corrected.
Obsolete UI removal
src/components/..., src/hooks/..., src/app/..., src/components/video/...
Obsolete analytics, navigation, dashboard, media, and utility modules are removed, with related exports and regression references updated.
Validation and metadata alignment
e2e/..., src/lib/admin/data/__tests__/..., memory/registry.yml, eslint.config.mjs, tsconfig.json, supabase/migrations/...
Seeded-auth gating, paginated Supabase mocks, documentation references, lint and TypeScript exclusions, skipped-test records, and migration status metadata are updated.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

  • njrini99-code/helmv3#772 — The cleanup removes obsolete files and components in line with the issue’s unused-file cleanup goals.

Possibly related PRs

🚥 Pre-merge checks | ✅ 11 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning Uses Conventional Commits but omits a required scope, so it does not meet the PR title format. Add one required scope, e.g. chore(docs): agent-legibility sweep — repo map, doc truth pass, dead-code deletion.
✅ Passed checks (11 passed)
Check name Status Explanation
Description check ✅ Passed The description is clearly related to the hygiene and dead-code changes in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 Changed source files contain no SUPABASE_SERVICE_ROLE_KEY or service-role client creation outside exempt admin paths.
Rls Coverage On New Tables ✅ Passed PASS: supabase/migrations/20260708140000_bridge_baseball_coach_lifting_revoke.sql:20-105 has only functions/triggers; no CREATE TABLE, so the rule is not triggered.
Auth Check In Server Actions ✅ Passed No files changed under src/app//actions//*.ts in this commit, so there are no server actions to audit for supabase.auth.getUser() ordering.
Sport-Prefixed Table Names ✅ Passed PASS: Changed TS/TSX Supabase calls are all golf_* (team-detail.test.ts:45-47,133-152); no unprefixed coaches/players/teams/rounds/events queries were added.
No Destructive Writes ✅ Passed PASS: supabase/migrations/20260708140000_bridge_baseball_coach_lifting_revoke.sql:43-57,88-92 uses UPDATE + INSERT...ON CONFLICT; no changed file shows DELETE→INSERT rebuild.
No Edits To Historical Migrations ✅ Passed Only edited migration is supabase/migrations/20260708140000_bridge_baseball_coach_lifting_revoke.sql:1-18, which is newer than the 20260527120000 baseline.
Conventional Commits ✅ Passed PASS — PR title and HEAD subject are conventional (chore:); policy at .coderabbit.yaml:405-408.
✨ 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 chore/agent-legibility-sweep
  • 🛠️ helm safety pass
  • 🛠️ dashboard ux pass
  • 🛠️ rls test pass

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ast-grep (0.44.1)

ast-grep could not parse rule config: /ast-grep-rules/../git/.coderabbit/ast-grep/no-explicit-any.yml

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

src/components/golf/layout/AnimatedPage.tsx

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


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

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Agent legibility sweep: repo map, stale-doc headers, dead-code purge, test/config hygiene

📝 Documentation ✨ Enhancement 🧪 Tests ⚙️ Configuration changes 🐞 Bug fix 🕐 40+ Minutes

Grey Divider

AI Description

• Add a cross-product repo map for routes/idioms/traps and link it from agent docs.
• Mark outdated docs as STALE/SUPERSEDED/PARKED and repoint the AI doc registry to current sources.
• Delete verified dead code/tests, clean config excludes, and fix a .range() test mock drift bug.
Diagram

graph TD
A["Agents/Reviewers"] --> B["docs/REPO_MAP.md"] --> C["AGENTS.md + CLAUDE.md"]
A --> D["memory/registry.yml"]
E["Hygiene sweep"] --> H["Dead files removed"] --> F["tsconfig + eslint"]
E --> G["Test updates"]
B -.-> D
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Docs lifecycle via frontmatter + lint rule
  • ➕ Machine-checkable STATUS/DATE fields (enforce presence/format)
  • ➕ Enables CI to prevent new ‘silent drift’ docs
  • ➕ Easier to query/report stale docs
  • ➖ Requires adding a docs-lint step and conventions
  • ➖ May create churn for one-off exploratory docs
2. CI guardrails: knip + link-check + registry validation
  • ➕ Prevents dead-code re-accumulation and broken doc pointers
  • ➕ Makes ‘doc truth’ passes incremental instead of periodic sweeps
  • ➖ Initial config/false-positive tuning cost
  • ➖ Can slow CI or require per-folder exemptions
3. Archive stale docs instead of adding status headers
  • ➕ Keeps the active docs surface small and trustworthy
  • ➕ Reduces reader time spent on obsolete content
  • ➖ Higher risk of broken inbound links/bookmarks
  • ➖ Harder to discover historical context without explicit cross-links

Recommendation: The PR’s approach (explicit status headers + curated REPO_MAP + targeted deletions) is a good, low-tooling baseline that immediately improves navigability. Consider a follow-up CI guardrail (registry validation + link checking; optionally knip) to keep docs/registry/code from drifting back out of sync.

Files changed (92) +1085 / -118

Tests (3) +30 / -15
golf-qualifier.spec.tsFix Playwright skip to be env-gated (not permanently skipped) +15/-6

Fix Playwright skip to be env-gated (not permanently skipped)

• Converts an unconditional 'test.skip(name, fn)' usage into a conditional skip based on presence of seeded auth env vars. Also tightens form fills by asserting the env vars are present when the test runs.

e2e/golf-qualifier.spec.ts

drawers-mobile.test.mjsPrune IntentDrawer assertions after dead-code deletion +3/-9

Prune IntentDrawer assertions after dead-code deletion

• Removes the IntentDrawer file path and its associated test, while keeping the GoalCreationModal and other mobile-guard assertions intact. Updates commentary to reflect the deletion context.

scripts/tests/drawers-mobile.test.mjs

team-detail.test.tsFix Supabase mock chain to support '.range(from,to)' pagination +12/-0

Fix Supabase mock chain to support '.range(from,to)' pagination

• Adds a '.range()' implementation to the mock query chain to mirror production pagination behavior and avoid 'range is not a function'. Slices returned arrays by the requested bounds to correctly terminate loops when the last page is short.

src/lib/admin/data/tests/team-detail.test.ts

Documentation (84) +1030 / -86
AGENTS.mdLink to the new repo map and explain how to use it +14/-0

Link to the new repo map and explain how to use it

• Adds a ‘Repo map’ section pointing agents to docs/REPO_MAP.md and describing when it should be consulted (routes, action wrappers, data access, tokens, nav registries).

AGENTS.md

CLAUDE.mdAdd docs/REPO_MAP.md to the context routing table +1/-0

Add docs/REPO_MAP.md to the context routing table

• Extends the context matrix to include the cross-product structural repo map for routes/idioms/traps and pre-flight checklist.

CLAUDE.md

ADMIN_DASHBOARD_UPGRADE_PLAN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/ADMIN_DASHBOARD_UPGRADE_PLAN.md

APPSTORE_MASTER_REMEDIATION_PLAN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/APPSTORE_MASTER_REMEDIATION_PLAN.md

APPSTORE_REQUIREMENTS_CHECKLIST.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/APPSTORE_REQUIREMENTS_CHECKLIST.md

BASEBALL_DASHBOARD_AUDIT_REPORT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/BASEBALL_DASHBOARD_AUDIT_REPORT.md

BASEBALL_RLS_SECURITY_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/BASEBALL_RLS_SECURITY_AUDIT.md

CLEANSLATE_JOB_LIST.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/CLEANSLATE_JOB_LIST.md

COACHHELM_STATE_2026-05-26.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/COACHHELM_STATE_2026-05-26.md

CODEBASE_MAP.mdMark CODEBASE_MAP as stale with current-size discrepancy notes +7/-0

Mark CODEBASE_MAP as stale with current-size discrepancy notes

• Adds a STALE header documenting that the map’s file counts and content drifted significantly since 2026-01-13 and were not regenerated.

docs/CODEBASE_MAP.md

CoachHelm UI Audit Future.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/CoachHelm UI Audit Future.md

DATABASE_FIXES.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/DATABASE_FIXES.md

END-OF-RUN-2026-05-26.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/END-OF-RUN-2026-05-26.md

ERROR_HANDLING_FIXES.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/ERROR_HANDLING_FIXES.md

FEATURE_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/FEATURE_AUDIT.md

HELM_DATABASE_VERCEL_COACHHELM_DEEP_DIVE_2026-05-27.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/HELM_DATABASE_VERCEL_COACHHELM_DEEP_DIVE_2026-05-27.md

IOS_NATIVE_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/IOS_NATIVE_AUDIT.md

LANDING_ENTRY_WORLD_DESIGN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/LANDING_ENTRY_WORLD_DESIGN.md

OVERNIGHT_BUILD_REPORT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/OVERNIGHT_BUILD_REPORT.md

PERFORMANCE_FIX_PLAN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/PERFORMANCE_FIX_PLAN.md

PRIVACY_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/PRIVACY_AUDIT.md

PUSH_NOTIFICATION_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/PUSH_NOTIFICATION_AUDIT.md

RECON_REPORT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/RECON_REPORT.md

REPO_MAP.mdAdd cross-product repo map for routes, idioms, traps, and agent checklist +397/-0

Add cross-product repo map for routes, idioms, traps, and agent checklist

• Introduces a comprehensive structural map of the repository: resolved route atlases per product, canonical idioms with file:line anchors, known traps, and a pre-flight checklist for agents. Intended as a navigation/conventions guide (not feature behavior).

docs/REPO_MAP.md

ROUND_REVIEW_ACCURACY_REPORT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/ROUND_REVIEW_ACCURACY_REPORT.md

SECURITY_AUDIT.mdMark SECURITY_AUDIT as stale pending re-verification +7/-0

Mark SECURITY_AUDIT as stale pending re-verification

• Adds a STALE header indicating the audit was for an iOS App Store submission scope and has not been re-validated against current App Store status as of the sweep date.

docs/SECURITY_AUDIT.md

SESSION_REPORT_2026-05-27_PART2.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/SESSION_REPORT_2026-05-27_PART2.md

SHOT_TRACKING_DEEP_SCRUB.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/SHOT_TRACKING_DEEP_SCRUB.md

UIUX_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/UIUX_AUDIT.md

UI_POLISH_REPORT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/UI_POLISH_REPORT.md

architectural-review-golfhelm-2026-02-22.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/architectural-review-golfhelm-2026-02-22.md

COMPREHENSIVE_AUTH_SYSTEM_PLAN.mdMark January auth plan as stale and superseded by shipped work/runbooks +7/-0

Mark January auth plan as stale and superseded by shipped work/runbooks

• Adds a STALE header noting this was a pre-build plan and that auth has since shipped along with P0/key-rotation runbooks; also aligns with registry repointing away from this doc.

docs/architecture/COMPREHENSIVE_AUTH_SYSTEM_PLAN.md

USER_ROLE_DATA_OWNERSHIP.mdMark January role/data snapshot as stale and repointed in registry +7/-0

Mark January role/data snapshot as stale and repointed in registry

• Adds a STALE header explaining the doc reflects toy-scale early data and is no longer representative; matches memory/registry.yml repointing to newer RLS guidance.

docs/architecture/USER_ROLE_DATA_OWNERSHIP.md

audit-college-coach-2026-02-22.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audit-college-coach-2026-02-22.md

audit-db-security-2026-02-22.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audit-db-security-2026-02-22.md

audit-errors-flows-2026-02-22.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audit-errors-flows-2026-02-22.md

audit-ui-premium-2026-02-22.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audit-ui-premium-2026-02-22.md

COACHHELM_TO_95_AUDIT_2026-06-08.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audits/COACHHELM_TO_95_AUDIT_2026-06-08.md

COACH_DASHBOARD_AUDIT_REPORT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audits/COACH_DASHBOARD_AUDIT_REPORT.md

COURSE_LIBRARY_AUDIT_2026-06-13.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audits/COURSE_LIBRARY_AUDIT_2026-06-13.md

DATA_INTEGRITY_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audits/DATA_INTEGRITY_AUDIT.md

GOLFHELM_CALENDAR_AUDIT_2026-06-10.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audits/GOLFHELM_CALENDAR_AUDIT_2026-06-10.md

GOLFHELM_E2E_TAB_AUDIT_2026-06-20.mdMark E2E tab audit as stale and fix moved per-unit detail links +81/-74

Mark E2E tab audit as stale and fix moved per-unit detail links

• Adds a STALE status header explaining the report reflects 2026-06-20 state and should be re-verified. Updates per-unit detail links to the new docs/archive/2026-06 location.

docs/audits/GOLFHELM_E2E_TAB_AUDIT_2026-06-20.md

HELMV3_ISSUE_LEDGER_2026-06-30.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audits/HELMV3_ISSUE_LEDGER_2026-06-30.md

RLS_SECURITY_AUDIT.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/audits/RLS_SECURITY_AUDIT.md

ENTRY_SCENES_DESIGN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/baseball/ENTRY_SCENES_DESIGN.md

PRODUCTION_READINESS_MASTER_PLAN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/baseball/PRODUCTION_READINESS_MASTER_PLAN.md

coachhelm-phase2-deferred-EF-plan.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/coachhelm-phase2-deferred-EF-plan.md

code-quality-review-2026-02-22.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/code-quality-review-2026-02-22.md

fairway-baseballhelm-migration-plan.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/fairway-baseballhelm-migration-plan.md

fairway-coachhelm-insight-rebuild.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/fairway-coachhelm-insight-rebuild.md

fairway-recruiting-plan.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/fairway-recruiting-plan.md

fairway-shot-tracking-plan.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/fairway-shot-tracking-plan.md

fairway-stats-redesign-plan.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/fairway-stats-redesign-plan.md

CALENDAR_COMPREHENSIVE_IMPLEMENTATION_PLAN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/CALENDAR_COMPREHENSIVE_IMPLEMENTATION_PLAN.md

COACHHELM_DISABLE_FEATURE.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/COACHHELM_DISABLE_FEATURE.md

COACHHELM_IMPLEMENTATION_SPEC.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/COACHHELM_IMPLEMENTATION_SPEC.md

COACHHELM_INTELLIGENCE_ENGINE.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/COACHHELM_INTELLIGENCE_ENGINE.md

COACHHELM_V2_INTELLIGENCE_ENGINE.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/COACHHELM_V2_INTELLIGENCE_ENGINE.md

COACHHELM_V2_INTELLIGENCE_ENGINE_FULL.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/COACHHELM_V2_INTELLIGENCE_ENGINE_FULL.md

CURSOR_IMPLEMENTATION_GUIDE.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/CURSOR_IMPLEMENTATION_GUIDE.md

FEATURE_1_COACH_PHILOSOPHY_SETTINGS.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/FEATURE_1_COACH_PHILOSOPHY_SETTINGS.md

FEATURE_ROUND_REVIEW.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/FEATURE_ROUND_REVIEW.md

README.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/README.md

coachhelm-master-blueprint.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/features/coachhelm/coachhelm-master-blueprint.md

golfhelm-engine-upgrade-plan.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/golfhelm-engine-upgrade-plan.md

perf-analysis-dashboard-timeouts-2026-03-09.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/perf-analysis-dashboard-timeouts-2026-03-09.md

ITEM2_TWO_SESSION_PLAN.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/plans/ITEM2_TWO_SESSION_PLAN.md

README.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/qa/baseball-fairway-visual-audit-2026-07-04/README.md

redesign-playbook.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/redesign-playbook.md

00-orchestration.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/superpowers/plans/2026-04-21-coachhelm-fix/00-orchestration.md

00-design-contract.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/superpowers/plans/2026-04-22-insight-delivery/00-design-contract.md

00-design-contract.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/superpowers/plans/2026-04-22-insight-quality/00-design-contract.md

2026-05-27-helm-database-vercel-alignment.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/superpowers/plans/2026-05-27-helm-database-vercel-alignment.md

2026-05-28-ai-codebase-intelligence.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/superpowers/plans/2026-05-28-ai-codebase-intelligence.md

v3-compatibility-shims.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/v3-compatibility-shims.md

v3-master-plan.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/v3-master-plan.md

v3-player-transfer-playbook.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/v3-player-transfer-playbook.md

v3-wave-sequence.mdAdd doc status header (lifecycle metadata) +7/-0

Add doc status header (lifecycle metadata)

• Prepends a STATUS/DATE/SUPERSEDED-BY style comment header to clarify the document’s current reliability and intended use.

docs/v3-wave-sequence.md

DemoEnterTracker.tsxUpdate docstring references to FairwayDashboardShell +5/-4

Update docstring references to FairwayDashboardShell

• Adjusts internal comments to reflect that FairwayDashboardShell is the successor to the deleted GolfDashboardShell, without changing runtime behavior.

src/components/demo/DemoEnterTracker.tsx

PremiumCalendarClient.tsxUpdate comment to reference FairwayDashboardShell notification bell +2/-1

Update comment to reference FairwayDashboardShell notification bell

• Updates commentary to reflect the new shell component name and preserve the rationale about avoiding doubled polling.

src/components/golf/calendar/PremiumCalendarClient.tsx

AnimatedPage.tsxUpdate reduced-motion comment to reference FairwayDashboardShell +2/-1

Update reduced-motion comment to reference FairwayDashboardShell

• Renames a comment reference from GolfDashboardShell to its successor FairwayDashboardShell; no functional changes.

src/components/golf/layout/AnimatedPage.tsx

secondary-nav.tsxAlign comment with FairwaySidebar active-match semantics +1/-1

Align comment with FairwaySidebar active-match semantics

• Updates the function comment to refer to FairwaySidebar’s matchActive semantics rather than the removed GolfSidebar wording.

src/components/ui/secondary-nav.tsx

SKIPPED.mdUpdate skipped-test ledger to reflect resolved/deleted entries +2/-5

Update skipped-test ledger to reflect resolved/deleted entries

• Refreshes the list to note which previously-skipped tests were deleted/superseded and narrows the remaining pending items. Adds a dated note explaining the delta.

src/test/SKIPPED.md

Other (5) +25 / -17
.env.exampleMark unused integrations/vars as RESERVED and clarify behavior +21/-9

Mark unused integrations/vars as RESERVED and clarify behavior

• Adds explicit RESERVED commentary for env vars/sections not currently read by the codebase (e.g., dev mode, Tambo, Mapbox, team-invite from address). Improves ‘truthiness’ of the template by distinguishing aspirational setup from wired configuration.

.env.example

eslint.config.mjsRemove ignore entry for deleted directory +0/-1

Remove ignore entry for deleted directory

• Drops the eslint ignore for next-shadcn-dashboard-starter, aligning config with deleted/absent paths.

eslint.config.mjs

registry.ymlRepoint auth/team-access entries away from stale architecture docs +3/-4

Repoint auth/team-access entries away from stale architecture docs

• Removes references to January-era auth/role docs and replaces them with current RLS/auth guidance. Also adds an additional operations runbook link for relevant incidents.

memory/registry.yml

20260708140000_bridge_baseball_coach_lifting_revoke.sqlUpdate migration header comment to reflect applied status +1/-1

Update migration header comment to reflect applied status

• Adjusts the migration comment from “Written NOT applied” to “Applied,” clarifying operational status without changing SQL behavior.

supabase/migrations/20260708140000_bridge_baseball_coach_lifting_revoke.sql

tsconfig.jsonRemove excludes for deleted directories +0/-2

Remove excludes for deleted directories

• Drops tsconfig excludes referencing next-shadcn-dashboard-starter and helm-vid to reduce configuration residue after cleanup.

tsconfig.json

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 97 rules

Grey Divider


Remediation recommended

1. Range mock mis-paginates 🐞 Bug ☼ Reliability
Description
makeChain().range(from,to) slices the dequeued (FIFO) mock result using absolute offsets; when
fetchAllRowsResult requests page 2 (from=1000), this can return [] even if the queued result
contains a valid second page, causing pagination to stop early and masking bugs.
Code

src/lib/admin/data/tests/team-detail.test.ts[R26-37]

+    // fetchAllRowsResult-driven queries (team-detail.ts's CoachHelm cost30d
+    // paginate-past-1000-cap fix) terminate on `.range(from, to)` instead of
+    // `.then()` — mirror dashboard-data.test.ts's idiom (slice by the actual
+    // from/to bounds) so a page shorter than the requested size correctly
+    // ends the loop instead of throwing `range is not a function`.
+    range: (from: number, to: number) => {
+      const r = nextResult(table);
+      return Promise.resolve({
+        data: Array.isArray(r.data) ? r.data.slice(from, to + 1) : r.data,
+        error: r.error,
+      });
+    },
Relevance

⭐⭐⭐ High

Team frequently accepts fixes to stale Supabase fluent mocks (add missing chain methods / correct
behavior) in tests.

PR-#224
PR-#776
PR-#768

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The mock dequeues one result per query call, but slices with absolute offsets; fetchAllRowsResult
passes absolute from offsets (0, then 1000, etc.), so a queued second-page array will be sliced to
empty and break the pagination loop prematurely.

src/lib/admin/data/tests/team-detail.test.ts[11-41]
src/lib/supabase/fetch-all-rows.ts[103-125]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The `range(from,to)` mock currently calls `nextResult(table)` (which `shift()`s the queue) and then slices that returned array using the absolute `from/to` indices. If the test queues **page-sized** results (e.g., 1000 rows then 200 rows), the second `range(1000,1999)` call slices starting at 1000 on a 200-row array and returns `[]`, terminating `fetchAllRowsResult` early.

### Issue Context
`fetchAllRowsResult` calls `makeQuery(from, from + pageSize - 1)` and increments `from += pageSize` each loop page, so `from` is an absolute offset (0, 1000, 2000…).

### Fix Focus Areas
- src/lib/admin/data/__tests__/team-detail.test.ts[23-41]

Suggested implementation options:
1) **Queue-is-per-page semantics**: have `range()` simply `return Promise.resolve(nextResult(table))` (no slicing).
2) **Queue-is-full-dataset semantics (closest to dashboard-data.test.ts)**: have `range()` peek at the head element (do not shift), slice `[from..to]`, and only `shift()` the queue once the returned slice is shorter than the requested page size (end-of-pagination), so the next distinct query can consume the next queued result.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +26 to +37
// fetchAllRowsResult-driven queries (team-detail.ts's CoachHelm cost30d
// paginate-past-1000-cap fix) terminate on `.range(from, to)` instead of
// `.then()` — mirror dashboard-data.test.ts's idiom (slice by the actual
// from/to bounds) so a page shorter than the requested size correctly
// ends the loop instead of throwing `range is not a function`.
range: (from: number, to: number) => {
const r = nextResult(table);
return Promise.resolve({
data: Array.isArray(r.data) ? r.data.slice(from, to + 1) : r.data,
error: r.error,
});
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

1. Range mock mis-paginates 🐞 Bug ☼ Reliability

makeChain().range(from,to) slices the dequeued (FIFO) mock result using absolute offsets; when
fetchAllRowsResult requests page 2 (from=1000), this can return [] even if the queued result
contains a valid second page, causing pagination to stop early and masking bugs.
Agent Prompt
### Issue description
The `range(from,to)` mock currently calls `nextResult(table)` (which `shift()`s the queue) and then slices that returned array using the absolute `from/to` indices. If the test queues **page-sized** results (e.g., 1000 rows then 200 rows), the second `range(1000,1999)` call slices starting at 1000 on a 200-row array and returns `[]`, terminating `fetchAllRowsResult` early.

### Issue Context
`fetchAllRowsResult` calls `makeQuery(from, from + pageSize - 1)` and increments `from += pageSize` each loop page, so `from` is an absolute offset (0, 1000, 2000…).

### Fix Focus Areas
- src/lib/admin/data/__tests__/team-detail.test.ts[23-41]

Suggested implementation options:
1) **Queue-is-per-page semantics**: have `range()` simply `return Promise.resolve(nextResult(table))` (no slicing).
2) **Queue-is-full-dataset semantics (closest to dashboard-data.test.ts)**: have `range()` peek at the head element (do not shift), slice `[from..to]`, and only `shift()` the queue once the returned slice is shorter than the requested page size (end-of-pagination), so the next distinct query can consume the next queued result.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/RECON_REPORT.md`:
- Around line 1-6: Correct the top status comment in RECON_REPORT.md so its
SUPERSEDED BY / WHY rationale accurately references the BaseballHelm route
completion report and its later replacement, removing the unrelated golf audit
references while retaining the historical-file notice.

In `@docs/v3-master-plan.md`:
- Around line 1-6: Update the SUPERSEDED banner in docs/v3-master-plan.md to
identify the current authoritative source for the 14-day TTL behavior referenced
by goal-suggestions-evaluate, or add a follow-up note to repoint that route’s
spec comment. Ensure reviewers are directed away from this historical document
to the governing registry or replacement specification.

In `@memory/registry.yml`:
- Line 809: Replace every remaining roster_team reference to
docs/architecture/USER_ROLE_DATA_OWNERSHIP.md with docs/v3-rls-template.md,
including the docs.flows entry and review.required_docs entry; ensure the
corresponding references for auth_onboarding_join and team_access_control remain
consistently updated.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5bc52356-774f-48a2-ae38-03b0f82f8d75

📥 Commits

Reviewing files that changed from the base of the PR and between a73310d and a4cf220.

📒 Files selected for processing (126)
  • .env.example
  • AGENTS.md
  • CLAUDE.md
  • docs/ADMIN_DASHBOARD_UPGRADE_PLAN.md
  • docs/APPSTORE_MASTER_REMEDIATION_PLAN.md
  • docs/APPSTORE_REQUIREMENTS_CHECKLIST.md
  • docs/BASEBALL_DASHBOARD_AUDIT_REPORT.md
  • docs/BASEBALL_RLS_SECURITY_AUDIT.md
  • docs/CLEANSLATE_JOB_LIST.md
  • docs/COACHHELM_STATE_2026-05-26.md
  • docs/CODEBASE_MAP.md
  • docs/CoachHelm UI Audit Future.md
  • docs/DATABASE_FIXES.md
  • docs/END-OF-RUN-2026-05-26.md
  • docs/ERROR_HANDLING_FIXES.md
  • docs/FEATURE_AUDIT.md
  • docs/HELM_DATABASE_VERCEL_COACHHELM_DEEP_DIVE_2026-05-27.md
  • docs/IOS_NATIVE_AUDIT.md
  • docs/LANDING_ENTRY_WORLD_DESIGN.md
  • docs/OVERNIGHT_BUILD_REPORT.md
  • docs/PERFORMANCE_FIX_PLAN.md
  • docs/PRIVACY_AUDIT.md
  • docs/PUSH_NOTIFICATION_AUDIT.md
  • docs/RECON_REPORT.md
  • docs/REPO_MAP.md
  • docs/ROUND_REVIEW_ACCURACY_REPORT.md
  • docs/SECURITY_AUDIT.md
  • docs/SESSION_REPORT_2026-05-27_PART2.md
  • docs/SHOT_TRACKING_DEEP_SCRUB.md
  • docs/UIUX_AUDIT.md
  • docs/UI_POLISH_REPORT.md
  • docs/architectural-review-golfhelm-2026-02-22.md
  • docs/architecture/COMPREHENSIVE_AUTH_SYSTEM_PLAN.md
  • docs/architecture/USER_ROLE_DATA_OWNERSHIP.md
  • docs/audit-college-coach-2026-02-22.md
  • docs/audit-db-security-2026-02-22.md
  • docs/audit-errors-flows-2026-02-22.md
  • docs/audit-ui-premium-2026-02-22.md
  • docs/audits/COACHHELM_TO_95_AUDIT_2026-06-08.md
  • docs/audits/COACH_DASHBOARD_AUDIT_REPORT.md
  • docs/audits/COURSE_LIBRARY_AUDIT_2026-06-13.md
  • docs/audits/DATA_INTEGRITY_AUDIT.md
  • docs/audits/GOLFHELM_CALENDAR_AUDIT_2026-06-10.md
  • docs/audits/GOLFHELM_E2E_TAB_AUDIT_2026-06-20.md
  • docs/audits/HELMV3_ISSUE_LEDGER_2026-06-30.md
  • docs/audits/RLS_SECURITY_AUDIT.md
  • docs/baseball/ENTRY_SCENES_DESIGN.md
  • docs/baseball/PRODUCTION_READINESS_MASTER_PLAN.md
  • docs/coachhelm-phase2-deferred-EF-plan.md
  • docs/code-quality-review-2026-02-22.md
  • docs/fairway-baseballhelm-migration-plan.md
  • docs/fairway-coachhelm-insight-rebuild.md
  • docs/fairway-recruiting-plan.md
  • docs/fairway-shot-tracking-plan.md
  • docs/fairway-stats-redesign-plan.md
  • docs/features/CALENDAR_COMPREHENSIVE_IMPLEMENTATION_PLAN.md
  • docs/features/coachhelm/COACHHELM_DISABLE_FEATURE.md
  • docs/features/coachhelm/COACHHELM_IMPLEMENTATION_SPEC.md
  • docs/features/coachhelm/COACHHELM_INTELLIGENCE_ENGINE.md
  • docs/features/coachhelm/COACHHELM_V2_INTELLIGENCE_ENGINE.md
  • docs/features/coachhelm/COACHHELM_V2_INTELLIGENCE_ENGINE_FULL.md
  • docs/features/coachhelm/CURSOR_IMPLEMENTATION_GUIDE.md
  • docs/features/coachhelm/FEATURE_1_COACH_PHILOSOPHY_SETTINGS.md
  • docs/features/coachhelm/FEATURE_ROUND_REVIEW.md
  • docs/features/coachhelm/README.md
  • docs/features/coachhelm/coachhelm-master-blueprint.md
  • docs/golfhelm-engine-upgrade-plan.md
  • docs/perf-analysis-dashboard-timeouts-2026-03-09.md
  • docs/plans/ITEM2_TWO_SESSION_PLAN.md
  • docs/qa/baseball-fairway-visual-audit-2026-07-04/README.md
  • docs/redesign-playbook.md
  • docs/superpowers/plans/2026-04-21-coachhelm-fix/00-orchestration.md
  • docs/superpowers/plans/2026-04-22-insight-delivery/00-design-contract.md
  • docs/superpowers/plans/2026-04-22-insight-quality/00-design-contract.md
  • docs/superpowers/plans/2026-05-27-helm-database-vercel-alignment.md
  • docs/superpowers/plans/2026-05-28-ai-codebase-intelligence.md
  • docs/v3-compatibility-shims.md
  • docs/v3-master-plan.md
  • docs/v3-player-transfer-playbook.md
  • docs/v3-wave-sequence.md
  • e2e/golf-qualifier.spec.ts
  • eslint.config.mjs
  • memory/registry.yml
  • scripts/__tests__/chart-palette.test.mjs
  • scripts/__tests__/drawers-mobile.test.mjs
  • src/app/soreness-preview/page.tsx
  • src/components/baseball/command-center/analytics/GameVsPracticePanel.tsx
  • src/components/baseball/command-center/analytics/PlayerPerformanceGrid.tsx
  • src/components/baseball/command-center/analytics/PressureGapIndicator.tsx
  • src/components/baseball/command-center/analytics/StatTypeFilter.tsx
  • src/components/baseball/command-center/analytics/TeamBattingOverview.tsx
  • src/components/baseball/command-center/analytics/TrendAnalysisPanel.tsx
  • src/components/baseball/command-center/analytics/index.ts
  • src/components/demo/DemoEnterTracker.tsx
  • src/components/golf/GolfTabBar.tsx
  • src/components/golf/calendar/PremiumCalendarClient.tsx
  • src/components/golf/coachhelm/analytics/MissPatternChart.tsx
  • src/components/golf/coachhelm/analytics/ShotAnalyticsPanel.tsx
  • src/components/golf/coachhelm/analytics/ShotTypeBreakdown.tsx
  • src/components/golf/coachhelm/analytics/TrendIndicator.tsx
  • src/components/golf/coachhelm/analytics/index.ts
  • src/components/golf/coachhelm/v3/IntentDrawer/index.tsx
  • src/components/golf/coachhelm/v3/PuttHeatmap/index.tsx
  • src/components/golf/dashboard/index.ts
  • src/components/golf/layout/AnimatedPage.tsx
  • src/components/golf/layout/LargeTitleHeader.tsx
  • src/components/golf/layout/MobileNavHeader.tsx
  • src/components/golf/messages/GolfNewMessageModal.tsx
  • src/components/golf/messages/GolfTeamBroadcastModal.tsx
  • src/components/golf/qualifiers/QualifierBracket.tsx
  • src/components/golf/roster/JoinRequestAlert.tsx
  • src/components/golf/rounds/RoundLibraryClient.tsx
  • src/components/golf/rounds/Sparkline.tsx
  • src/components/golf/stats/sections/shared-primitives.tsx
  • src/components/layout/mobile-bottom-nav.tsx
  • src/components/player/profile/PlayerCard.tsx
  • src/components/player/profile/PlayerProfileCoachActions.tsx
  • src/components/products/golf-mockups/index.tsx
  • src/components/ui/secondary-nav.tsx
  • src/components/video/VideoClipper.tsx
  • src/hooks/golf/use-team-context.ts
  • src/hooks/useAnimatedNumber.ts
  • src/lib/admin/data/__tests__/team-detail.test.ts
  • src/test/SKIPPED.md
  • supabase/migrations/20260708140000_bridge_baseball_coach_lifting_revoke.sql
  • tsconfig.json
💤 Files with no reviewable changes (36)
  • src/components/golf/coachhelm/analytics/MissPatternChart.tsx
  • src/components/golf/coachhelm/analytics/ShotAnalyticsPanel.tsx
  • src/components/golf/stats/sections/shared-primitives.tsx
  • src/components/golf/dashboard/index.ts
  • src/components/golf/layout/MobileNavHeader.tsx
  • src/components/golf/qualifiers/QualifierBracket.tsx
  • src/components/golf/messages/GolfTeamBroadcastModal.tsx
  • src/components/baseball/command-center/analytics/PressureGapIndicator.tsx
  • src/components/golf/rounds/RoundLibraryClient.tsx
  • src/components/golf/messages/GolfNewMessageModal.tsx
  • src/hooks/useAnimatedNumber.ts
  • src/components/golf/coachhelm/analytics/index.ts
  • src/components/player/profile/PlayerCard.tsx
  • src/components/baseball/command-center/analytics/TrendAnalysisPanel.tsx
  • src/app/soreness-preview/page.tsx
  • src/components/golf/roster/JoinRequestAlert.tsx
  • src/components/golf/layout/LargeTitleHeader.tsx
  • src/components/golf/coachhelm/analytics/ShotTypeBreakdown.tsx
  • tsconfig.json
  • src/hooks/golf/use-team-context.ts
  • src/components/golf/coachhelm/analytics/TrendIndicator.tsx
  • scripts/tests/chart-palette.test.mjs
  • src/components/golf/coachhelm/v3/IntentDrawer/index.tsx
  • eslint.config.mjs
  • src/components/products/golf-mockups/index.tsx
  • src/components/golf/rounds/Sparkline.tsx
  • src/components/layout/mobile-bottom-nav.tsx
  • src/components/baseball/command-center/analytics/PlayerPerformanceGrid.tsx
  • src/components/golf/GolfTabBar.tsx
  • src/components/player/profile/PlayerProfileCoachActions.tsx
  • src/components/golf/coachhelm/v3/PuttHeatmap/index.tsx
  • src/components/baseball/command-center/analytics/TeamBattingOverview.tsx
  • src/components/baseball/command-center/analytics/StatTypeFilter.tsx
  • src/components/baseball/command-center/analytics/index.ts
  • src/components/video/VideoClipper.tsx
  • src/components/baseball/command-center/analytics/GameVsPracticePanel.tsx

Comment thread docs/RECON_REPORT.md
Comment on lines +1 to +6
<!--
STATUS: SUPERSEDED
DATE: 2026-07-10
SUPERSEDED BY / WHY: Feb/March 2026 point-in-time report; the ground it covers has since had a dedicated, later remediation pass (project memory: "Golf stats correctness audit", "Shot-tracking unit audit — feet/yards blend corrupts proximity").
KEPT FOR HISTORY -- do not delete this file.
-->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Supersession rationale doesn't match this file's content.

This file is entirely about BaseballHelm route completion status (2026-02-16). The SUPERSEDED BY / WHY text cites "Golf stats correctness audit" and "Shot-tracking unit audit — feet/yards blend corrupts proximity" — neither topic appears anywhere in this document. This looks like the header block was copy-pasted from a different (golf-related) file in the same PR.

Suggested fix
-SUPERSEDED BY / WHY: Feb/March 2026 point-in-time report; the ground it covers has since had a dedicated, later remediation pass (project memory: "Golf stats correctness audit", "Shot-tracking unit audit — feet/yards blend corrupts proximity").
+SUPERSEDED BY / WHY: Feb 2026 point-in-time BaseballHelm route/build report; superseded by later BaseballHelm audits (docs/BASEBALL_DASHBOARD_AUDIT_REPORT.md, docs/audits/HELMV3_ISSUE_LEDGER_2026-06-30.md).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<!--
STATUS: SUPERSEDED
DATE: 2026-07-10
SUPERSEDED BY / WHY: Feb/March 2026 point-in-time report; the ground it covers has since had a dedicated, later remediation pass (project memory: "Golf stats correctness audit", "Shot-tracking unit audit — feet/yards blend corrupts proximity").
KEPT FOR HISTORY -- do not delete this file.
-->
<!--
STATUS: SUPERSEDED
DATE: 2026-07-10
SUPERSEDED BY / WHY: Feb 2026 point-in-time BaseballHelm route/build report; superseded by later BaseballHelm audits (docs/BASEBALL_DASHBOARD_AUDIT_REPORT.md, docs/audits/HELMV3_ISSUE_LEDGER_2026-06-30.md).
KEPT FOR HISTORY -- do not delete this file.
-->
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/RECON_REPORT.md` around lines 1 - 6, Correct the top status comment in
RECON_REPORT.md so its SUPERSEDED BY / WHY rationale accurately references the
BaseballHelm route completion report and its later replacement, removing the
unrelated golf audit references while retaining the historical-file notice.

Comment thread docs/v3-master-plan.md
Comment on lines +1 to +6
<!--
STATUS: SUPERSEDED
DATE: 2026-07-10
SUPERSEDED BY / WHY: Zero memory/registry.yml references (unlike sibling v3-*.md docs). "Locked 2026-05-24 ... every wave PR must reference its section here" — a wave-execution tracker for a sequence that project memory confirms has run past W35 into the later clean-slate/production-readiness passes.
KEPT FOR HISTORY -- do not delete this file.
-->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Flag the dangling live reference before merging this status change.

src/app/api/cron/v3/goal-suggestions-evaluate/route.ts:9-14 cites this doc as the "authoritative description" for TTL behavior ("Spec: docs/v3-master-plan.md Part VI.5"). Marking this file SUPERSEDED without updating that comment (or pointing it at whatever superseded doc/registry entry now governs the 14-day TTL) leaves a live code comment pointing reviewers at a doc now labeled historical-only.

Since this PR's scope is metadata-only, consider filing a follow-up to repoint that cron route's spec comment, or note in the SUPERSEDED banner where the TTL behavior is now documented.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/v3-master-plan.md` around lines 1 - 6, Update the SUPERSEDED banner in
docs/v3-master-plan.md to identify the current authoritative source for the
14-day TTL behavior referenced by goal-suggestions-evaluate, or add a follow-up
note to repoint that route’s spec comment. Ensure reviewers are directed away
from this historical document to the governing registry or replacement
specification.

Comment thread memory/registry.yml
- docs/v3-design-language.md
business_logic:
- docs/architecture/USER_ROLE_DATA_OWNERSHIP.md
- docs/v3-rls-template.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Stale-doc reference swept in 2 features, left dangling in a 3rd.

Lines 809 and 1020 replace docs/architecture/USER_ROLE_DATA_OWNERSHIP.md with docs/v3-rls-template.md for auth_onboarding_join and team_access_control — consistent with that doc getting marked stale/superseded elsewhere in this PR. But roster_team (lines 707-708 docs.flows, line 748 review.required_docs) still points at the same now-stale doc, untouched. review.required_docs feeds the CI review checklist for that feature — leaving it wired to a superseded doc means roster_team reviews keep citing dead guidance while the other two features move on.

       flows:
         - memory/context/golfhelm-features.md
-        - docs/architecture/USER_ROLE_DATA_OWNERSHIP.md
+        - docs/v3-rls-template.md

(apply same swap at line 748's required_docs entry)

Also applies to: 1020-1020, 707-708, 748-748

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@memory/registry.yml` at line 809, Replace every remaining roster_team
reference to docs/architecture/USER_ROLE_DATA_OWNERSHIP.md with
docs/v3-rls-template.md, including the docs.flows entry and review.required_docs
entry; ensure the corresponding references for auth_onboarding_join and
team_access_control remain consistently updated.

Three modify/delete conflicts resolved by keeping the deletions: all three
files have zero real imports in the merged tree (mentions are comments only;
the M1 marker stamp on LargeTitleHeader was inert — wave-2 verifier confirmed
it dead).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J2E46URHkhCnEQSYDtZLJX
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@njrini99-code njrini99-code merged commit 1035e6b into main Jul 10, 2026
36 of 37 checks passed
@njrini99-code njrini99-code deleted the chore/agent-legibility-sweep branch July 10, 2026 11:31
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