[codex] Move competition index to root#497
Conversation
|
Caution Review failedPull request was closed or merged during review WalkthroughThis PR moves competition discovery to "/", makes /compete an index redirect preserving search, replaces internal links/guards to point to "/", updates breadcrumb and sitemap entries, and wires a new hasOrganizerApplication entitlement into compete navigation. ChangesRoot Route and Compete Index Migration
Navigation and Link Updates
Protected and Feature-Gated Route Redirects
Compete Sub-Route Redirects and Updates
Supporting Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
1 issue found
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
There was a problem hiding this comment.
Actionable comments posted: 11
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
apps/wodsmith-start/src/components/compete-mobile-nav.tsx (1)
100-203:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd a LAT reference comment for these mobile-nav route updates.
Please annotate this changed block with
//@lat: [[...]]to tie the"/"navigation migration to itslat.mdsection.
As per coding guidelines, TS/TSX changes should include LAT reference comments.🤖 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 `@apps/wodsmith-start/src/components/compete-mobile-nav.tsx` around lines 100 - 203, The mobile navigation block that updates the "/" route (the Link elements and anchor tags inside the CompeteMobileNav component, e.g., the top Link to="/" and the Link to="/" under session?.user, and handlers like handleLinkClick) needs a LAT reference comment; add a single-line comment of the form // `@lat`: [[...]] directly above the changed route block (above the first Link to="/") tying this navigation migration to its lat.md section so TSX changes follow the LAT guideline.Source: Coding guidelines
apps/wodsmith-start/src/components/compete-nav.tsx (1)
29-73:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd LAT linkage for the updated nav + auth redirect paths.
The route and redirect updates are correct, but this changed segment needs a
//@lat: [[...]]reference to the relevant documentation section.
As per coding guidelines,**/*.{ts,tsx,js,jsx,rs,go,c,h,py}must include LAT reference comments in TS/JS files.🤖 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 `@apps/wodsmith-start/src/components/compete-nav.tsx` around lines 29 - 73, Add a LAT linkage comment for the updated nav and auth redirect paths by inserting a // `@lat`: [[...]] reference near the nav/auth JSX block in compete-nav.tsx (for example just above the fragment that renders Links, the canOrganize conditional, or above the Login/Sign-up Links), so the Events/Organize and sign-in/sign-up redirect changes (symbols: canOrganize, Link to="/compete/organizer", Link to="/sign-in" with search redirect, Link to="/sign-up") are documented; ensure the comment follows the required format and points to the correct documentation section.Source: Coding guidelines
🧹 Nitpick comments (10)
apps/wodsmith-start/src/routes/compete/invite/$token.tsx (1)
62-63: ⚡ Quick winAdd a LAT code-reference comment for this route file.
This file is missing the required
//@lat: [[section-id]]linkage comment for TSX source. Please add one near the route declaration (around Line 62) to keep concept-to-code traceability consistent.As per coding guidelines, "
**/*.{ts,tsx,js,jsx,rs,go,c,h,py}: Use//@lat: [[section-id]]code reference comments...".🤖 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 `@apps/wodsmith-start/src/routes/compete/invite/`$token.tsx around lines 62 - 63, Add the required LAT code-reference comment above the route declaration so the TSX file contains the linkage comment; specifically insert a line like "// `@lat`: [[section-id]]" immediately before the export const Route = createFileRoute("/compete/invite/$token")({...}) declaration (reference symbols: Route and createFileRoute) to satisfy the code-reference guideline for TSX sources.Source: Coding guidelines
apps/wodsmith-start/src/routes/compete/organizer/series/$groupId.tsx (1)
1-3: ⚡ Quick winAdd a LAT code-reference comment at the top of this route file.
Please add
//@lat: [[section-id]]in this TSX file (near Line 1) so the route stays traceable to LAT documentation standards.As per coding guidelines, "
**/*.{ts,tsx,js,jsx,rs,go,c,h,py}: Use//@lat: [[section-id]]code reference comments...".🤖 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 `@apps/wodsmith-start/src/routes/compete/organizer/series/`$groupId.tsx around lines 1 - 3, Add the LAT code-reference comment near the top of this TSX route file so it remains traceable; insert a single-line comment `// `@lat`: [[section-id]]` immediately above the first import (or at the very top of the file) in apps/wodsmith-start/src/routes/compete/organizer/series/$groupId.tsx so it precedes symbols like createFileRoute and Link and follows the repository coding guideline for LAT comments.Source: Coding guidelines
apps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsx (1)
1-4: ⚡ Quick winAdd the required LAT reference comment in this component file.
Please add a
//@lat: [[section-id]]comment near the top (around Line 1) to comply with the code-to-concept linking rule for TSX files.As per coding guidelines, "
**/*.{ts,tsx,js,jsx,rs,go,c,h,py}: Use//@lat: [[section-id]]code reference comments...".🤖 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 `@apps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsx` around lines 1 - 4, Add the required LAT reference comment near the top of this TSX component file by inserting a single-line comment of the form "// `@lat`: [[section-id]]" just above or immediately after the "use client" directive in apps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsx so the file (which contains the imports useNavigate and useServerFn and the AcceptInviteButton component code) complies with the code-to-concept linking rule; ensure the comment is exactly formatted as "// `@lat`: [[section-id]]" and placed before any other top-level code or imports.Source: Coding guidelines
apps/wodsmith-start/src/routes/compete/index.tsx (1)
1-7: 💤 Low valueConsider preserving search params in redirect.
External links or bookmarks to
/compete?q=crossfitwill lose the search context when redirected to/. For better UX during the migration period, consider forwarding search params:Proposed change to preserve search params
import { createFileRoute, redirect } from "`@tanstack/react-router`" export const Route = createFileRoute("/compete/")({ - beforeLoad: () => { - throw redirect({ to: "/" }) + beforeLoad: ({ search }) => { + throw redirect({ to: "/", search }) }, })🤖 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 `@apps/wodsmith-start/src/routes/compete/index.tsx` around lines 1 - 7, The redirect in Route (created via createFileRoute) always drops the current query string; update the beforeLoad handler to read the current request's search params (e.g., from window.location.search or the router-provided location/context) and include them when calling redirect so the destination becomes "/" plus the original query string; modify beforeLoad in the Route definition to build the redirected URL with the preserved search params before throwing redirect().apps/wodsmith-start/src/routes/_protected/calculator/index.tsx (1)
285-288: ⚡ Quick winAdd a
@latcode reference on this modified guard.Please annotate this
beforeLoadredirect block with//@lat: [[section-id]]to keep docs/code traceability intact.
As per coding guidelines,**/*.{ts,tsx,js,jsx,rs,go,c,h,py}must use//@lat: [[section-id]]code reference comments.🤖 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 `@apps/wodsmith-start/src/routes/_protected/calculator/index.tsx` around lines 285 - 288, Add the required code-traceability annotation to the guard in the beforeLoad function: insert a comment line "// `@lat`: [[section-id]]" immediately above the redirect block that checks context.hasWorkoutTracking and calls redirect(...). Ensure the comment is placed within the beforeLoad implementation and adjacent to the conditional so the annotation clearly ties to the redirect guard.Source: Coding guidelines
apps/wodsmith-start/src/routes/_protected/admin/teams/programming/index.tsx (1)
25-29: ⚡ Quick winAdd a
@latreference comment for this updated guard block.Please add a
//@lat: [[section-id]]comment adjacent to thebeforeLoadredirect logic so this change remains traceable to the related concept/docs section.
As per coding guidelines,**/*.{ts,tsx,js,jsx,rs,go,c,h,py}must use//@lat: [[section-id]]code reference comments.🤖 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 `@apps/wodsmith-start/src/routes/_protected/admin/teams/programming/index.tsx` around lines 25 - 29, Add a `// `@lat`: [[section-id]]` reference comment next to the updated guard in the beforeLoad handler so the change is traceable; locate the beforeLoad function (the async ({ context }) => { if (!context.hasWorkoutTracking) { throw redirect({ to: "/" }) } }) and insert the required `// `@lat`: [[section-id]]` comment adjacent to the redirect/guard logic line (near the if or throw redirect) following the project's `// `@lat`: [[section-id]]` format.Source: Coding guidelines
apps/wodsmith-start/src/routes/_protected/settings/overview/index.tsx (1)
401-403: ⚡ Quick winAdd a
@latreference for this updated competition CTA.Add
//@lat: [[section-id]]next to the modified “Browse Competitions” link to preserve code-to-doc linkage for this routing change.
As per coding guidelines,**/*.{ts,tsx,js,jsx,rs,go,c,h,py}must use//@lat: [[section-id]]code reference comments.🤖 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 `@apps/wodsmith-start/src/routes/_protected/settings/overview/index.tsx` around lines 401 - 403, Add the required code-to-doc linkage comment next to the updated "Browse Competitions" CTA: insert the comment "// `@lat`: [[section-id]]" adjacent to the <Link to="/"> element in the Button/asChild block (the JSX containing Button and Link) so the Link component (used for routing) carries the `@lat` reference as per the repo guideline.Source: Coding guidelines
apps/wodsmith-start/src/routes/_protected/log/index.tsx (1)
9-12: ⚡ Quick winAdd a
@latreference comment on this guard change.Please place
//@lat: [[section-id]]adjacent to thisbeforeLoadredirect update for traceability.
As per coding guidelines,**/*.{ts,tsx,js,jsx,rs,go,c,h,py}must use//@lat: [[section-id]]code reference comments.🤖 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 `@apps/wodsmith-start/src/routes/_protected/log/index.tsx` around lines 9 - 12, Add the required traceability comment next to the guard change in the beforeLoad function: insert a single-line comment `// `@lat`: [[section-id]]` adjacent to the redirect call inside beforeLoad (the block starting with "beforeLoad: async ({ context }) => { ... throw redirect({ to: '/' }) }") so the guard update has the mandated code reference comment per guidelines.Source: Coding guidelines
apps/wodsmith-start/src/routes/_protected/admin/teams/scaling/index.tsx (1)
44-47: ⚡ Quick winAdd a
@latreference comment beside this redirect update.Include
//@lat: [[section-id]]next to thebeforeLoadguard so this route-gate change is linked to the corresponding concept section.
As per coding guidelines,**/*.{ts,tsx,js,jsx,rs,go,c,h,py}must use//@lat: [[section-id]]code reference comments.🤖 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 `@apps/wodsmith-start/src/routes/_protected/admin/teams/scaling/index.tsx` around lines 44 - 47, Add the required LAT reference comment next to the route guard: in the beforeLoad handler that checks context.hasWorkoutTracking and calls redirect({ to: "/" }), append a single-line comment of the form // `@lat`: [[section-id]] immediately beside or directly above that redirect/check so the guard is linked to the concept section; ensure the comment uses the exact format // `@lat`: [[section-id]] and does not alter the logic in beforeLoad or the redirect call.Source: Coding guidelines
apps/wodsmith-start/src/routes/_protected/dashboard.tsx (1)
27-30: ⚡ Quick winAdd a
@latmarker for this guard redirect block.Please add
//@lat: [[section-id]]near this updated redirect so the route-access behavior remains linked to its spec/architecture reference.
As per coding guidelines,**/*.{ts,tsx,js,jsx,rs,go,c,h,py}must use//@lat: [[section-id]]code reference comments.🤖 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 `@apps/wodsmith-start/src/routes/_protected/dashboard.tsx` around lines 27 - 30, Add the required LAT reference comment directly above the redirect guard in the beforeLoad function: locate the beforeLoad block (function name beforeLoad) that checks context.hasWorkoutTracking and calls redirect, and insert a single-line comment `// `@lat`: [[section-id]]` immediately before the guard (or on the same line as the redirect check) so the route-access behavior remains linked to its spec. Ensure the comment format matches other files exactly and does not alter logic in beforeLoad or the redirect invocation.Source: Coding guidelines
🤖 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 `@apps/wodsmith-start/src/components/compete-nav-brand.tsx`:
- Line 7: Add the required LAT reference comment next to the updated route in
the CompeteNavBrand component: place a single-line comment like // `@lat`:
[[section-id]] immediately above or beside the Link JSX element (the <Link
to="/" className="flex items-center gap-2">) so the route change is traceable to
the corresponding lat.md section; replace section-id with the correct LAT
identifier.
In `@apps/wodsmith-start/src/components/competition-sidebar.tsx`:
- Line 211: The migrated header/mobile Link elements in the CompetitionSidebar
component currently lack LAT traceability comments; locate the JSX Link elements
with prop to="/" (and the other updated link targets referenced near the same
places) inside the CompetitionSidebar function/component and add nearby
single-line comments in the form // `@lat`: [[section-id]] for each updated link
target (one comment adjacent to each Link instance that had to="/" at the three
locations mentioned). Ensure the comments are plain JS/TS single-line comments
immediately above or beside the Link element so they remain visible in source
and match the required format.
In `@apps/wodsmith-start/src/components/landing/two-audiences.tsx`:
- Line 140: Add a LAT reference comment for the route update in the TwoAudiences
component: locate the Link element with to="/" in two-audiences.tsx (the "Browse
Competitions" route change) and add a single-line LAT annotation like // `@lat`:
[[...]] immediately above the Link (or directly on the same line) so the TSX
file includes the required source-to-doc traceability comment.
In `@apps/wodsmith-start/src/components/nav/main-nav.tsx`:
- Line 37: Add the required LAT code-reference comments next to the updated
route targets in the main navigation component: insert lines like // `@lat`:
[[section-id]] adjacent to the route string "/" at the location where the
default route is returned (around the expression ":" "/" in the JSX/ternary),
and do the same next to the other updated route targets referenced later in the
file (the targets around line ranges you were called out for). Ensure each
comment sits on the same line or immediately above the corresponding route
string so the code-to-doc linkage is preserved for the navigation rendering
logic (update the three spots noted: the "/" target and the two other
route-target expressions).
In `@apps/wodsmith-start/src/components/nav/mobile-nav.tsx`:
- Line 98: Update the migrated mobile Compete link elements in MobileNav
(apps/wodsmith-start/src/components/nav/mobile-nav.tsx) to include LAT reference
comments immediately above the relevant JSX anchor/link nodes; add lines like //
`@lat`: [[section-id]] for the link with href="/" (symbol: the anchor/Link
rendered at the location previously shown) and similarly for the link at the
other spot (symbol: the anchor/Link rendered around line 111) so each link has a
nearby LAT comment for traceability following the "// `@lat`: [[section-id]]"
format used in TypeScript/JavaScript files.
In `@apps/wodsmith-start/src/components/series-sidebar.tsx`:
- Line 120: Add the required LAT reference comments next to the updated Link
elements in the series sidebar: find the JSX Link elements that set to="/" (and
the other two updated link targets referenced in this file) inside the
SeriesSidebar component and append a line comment // `@lat`: [[section-id]]
immediately after each link target expression (preserve existing
spacing/indentation and use the exact comment format). Ensure the comment is
placed in the same file (apps/wodsmith-start/src/components/series-sidebar.tsx)
next to the Link prop values so the traceability rule picks them up for the
three changed links.
In `@apps/wodsmith-start/src/routes/_protected/movements/index.tsx`:
- Around line 17-20: Add the required LAT reference comment above the updated
route guard: insert a line containing "// `@lat`: [[section-id]]" immediately
before the beforeLoad function (the block that checks context.hasWorkoutTracking
and throws redirect). Ensure the comment appears in the TSX file near the
beforeLoad declaration so repository traceability tools can pick up the marker.
In `@apps/wodsmith-start/src/routes/_protected/programming/index.tsx`:
- Around line 40-43: Add the required LAT reference comment inside the updated
beforeLoad guard: annotate the start of the beforeLoad block (the async ({
context }) => { ... } that checks context.hasWorkoutTracking and calls redirect)
with a single-line comment // `@lat`: [[section-id]] so the source-to-doc linkage
is preserved; place the comment immediately above or on the same line as the
beforeLoad declaration to satisfy the file-wide LAT comment requirement.
In `@apps/wodsmith-start/src/routes/_protected/settings/programming/index.tsx`:
- Around line 13-16: The updated beforeLoad guard lacks the required LAT
code-reference marker; add a single-line comment containing the LAT marker
(e.g., // `@lat`: [[section-id]]) immediately above or on the same line as the
beforeLoad redirect logic so the beforeLoad function (the beforeLoad: async ({
context }) => { ... } block that calls redirect when
!context.hasWorkoutTracking) carries the // `@lat`: [[section-id]] marker per
guidelines.
In `@apps/wodsmith-start/src/routes/_protected/team/index.tsx`:
- Around line 6-9: The modified beforeLoad block in the route (the beforeLoad:
async ({ context }) => { ... } handler) needs the required source reference
annotation; add a single-line comment directly above the changed beforeLoad
block with the exact text // `@lat`: [[section-id]] (replace [[section-id]] with
the correct identifier for this change) so the TSX change is tied to the concept
per guidelines.
In `@apps/wodsmith-start/src/routes/_protected/workouts/index.tsx`:
- Around line 74-77: The beforeLoad route guard (function beforeLoad in
apps/wodsmith-start/src/routes/_protected/workouts/index.tsx) is missing the
required LAT reference comment; add the comment line // `@lat`: [[section-id]]
immediately above the edited guard (beforeLoad) block so the file includes the
LAT code reference as required by the repository's coding guidelines.
---
Outside diff comments:
In `@apps/wodsmith-start/src/components/compete-mobile-nav.tsx`:
- Around line 100-203: The mobile navigation block that updates the "/" route
(the Link elements and anchor tags inside the CompeteMobileNav component, e.g.,
the top Link to="/" and the Link to="/" under session?.user, and handlers like
handleLinkClick) needs a LAT reference comment; add a single-line comment of the
form // `@lat`: [[...]] directly above the changed route block (above the first
Link to="/") tying this navigation migration to its lat.md section so TSX
changes follow the LAT guideline.
In `@apps/wodsmith-start/src/components/compete-nav.tsx`:
- Around line 29-73: Add a LAT linkage comment for the updated nav and auth
redirect paths by inserting a // `@lat`: [[...]] reference near the nav/auth JSX
block in compete-nav.tsx (for example just above the fragment that renders
Links, the canOrganize conditional, or above the Login/Sign-up Links), so the
Events/Organize and sign-in/sign-up redirect changes (symbols: canOrganize, Link
to="/compete/organizer", Link to="/sign-in" with search redirect, Link
to="/sign-up") are documented; ensure the comment follows the required format
and points to the correct documentation section.
---
Nitpick comments:
In `@apps/wodsmith-start/src/routes/_protected/admin/teams/programming/index.tsx`:
- Around line 25-29: Add a `// `@lat`: [[section-id]]` reference comment next to
the updated guard in the beforeLoad handler so the change is traceable; locate
the beforeLoad function (the async ({ context }) => { if
(!context.hasWorkoutTracking) { throw redirect({ to: "/" }) } }) and insert the
required `// `@lat`: [[section-id]]` comment adjacent to the redirect/guard logic
line (near the if or throw redirect) following the project's `// `@lat`:
[[section-id]]` format.
In `@apps/wodsmith-start/src/routes/_protected/admin/teams/scaling/index.tsx`:
- Around line 44-47: Add the required LAT reference comment next to the route
guard: in the beforeLoad handler that checks context.hasWorkoutTracking and
calls redirect({ to: "/" }), append a single-line comment of the form // `@lat`:
[[section-id]] immediately beside or directly above that redirect/check so the
guard is linked to the concept section; ensure the comment uses the exact format
// `@lat`: [[section-id]] and does not alter the logic in beforeLoad or the
redirect call.
In `@apps/wodsmith-start/src/routes/_protected/calculator/index.tsx`:
- Around line 285-288: Add the required code-traceability annotation to the
guard in the beforeLoad function: insert a comment line "// `@lat`:
[[section-id]]" immediately above the redirect block that checks
context.hasWorkoutTracking and calls redirect(...). Ensure the comment is placed
within the beforeLoad implementation and adjacent to the conditional so the
annotation clearly ties to the redirect guard.
In `@apps/wodsmith-start/src/routes/_protected/dashboard.tsx`:
- Around line 27-30: Add the required LAT reference comment directly above the
redirect guard in the beforeLoad function: locate the beforeLoad block (function
name beforeLoad) that checks context.hasWorkoutTracking and calls redirect, and
insert a single-line comment `// `@lat`: [[section-id]]` immediately before the
guard (or on the same line as the redirect check) so the route-access behavior
remains linked to its spec. Ensure the comment format matches other files
exactly and does not alter logic in beforeLoad or the redirect invocation.
In `@apps/wodsmith-start/src/routes/_protected/log/index.tsx`:
- Around line 9-12: Add the required traceability comment next to the guard
change in the beforeLoad function: insert a single-line comment `// `@lat`:
[[section-id]]` adjacent to the redirect call inside beforeLoad (the block
starting with "beforeLoad: async ({ context }) => { ... throw redirect({ to: '/'
}) }") so the guard update has the mandated code reference comment per
guidelines.
In `@apps/wodsmith-start/src/routes/_protected/settings/overview/index.tsx`:
- Around line 401-403: Add the required code-to-doc linkage comment next to the
updated "Browse Competitions" CTA: insert the comment "// `@lat`: [[section-id]]"
adjacent to the <Link to="/"> element in the Button/asChild block (the JSX
containing Button and Link) so the Link component (used for routing) carries the
`@lat` reference as per the repo guideline.
In `@apps/wodsmith-start/src/routes/compete/index.tsx`:
- Around line 1-7: The redirect in Route (created via createFileRoute) always
drops the current query string; update the beforeLoad handler to read the
current request's search params (e.g., from window.location.search or the
router-provided location/context) and include them when calling redirect so the
destination becomes "/" plus the original query string; modify beforeLoad in the
Route definition to build the redirected URL with the preserved search params
before throwing redirect().
In
`@apps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsx`:
- Around line 1-4: Add the required LAT reference comment near the top of this
TSX component file by inserting a single-line comment of the form "// `@lat`:
[[section-id]]" just above or immediately after the "use client" directive in
apps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsx
so the file (which contains the imports useNavigate and useServerFn and the
AcceptInviteButton component code) complies with the code-to-concept linking
rule; ensure the comment is exactly formatted as "// `@lat`: [[section-id]]" and
placed before any other top-level code or imports.
In `@apps/wodsmith-start/src/routes/compete/invite/`$token.tsx:
- Around line 62-63: Add the required LAT code-reference comment above the route
declaration so the TSX file contains the linkage comment; specifically insert a
line like "// `@lat`: [[section-id]]" immediately before the export const Route =
createFileRoute("/compete/invite/$token")({...}) declaration (reference symbols:
Route and createFileRoute) to satisfy the code-reference guideline for TSX
sources.
In `@apps/wodsmith-start/src/routes/compete/organizer/series/`$groupId.tsx:
- Around line 1-3: Add the LAT code-reference comment near the top of this TSX
route file so it remains traceable; insert a single-line comment `// `@lat`:
[[section-id]]` immediately above the first import (or at the very top of the
file) in apps/wodsmith-start/src/routes/compete/organizer/series/$groupId.tsx so
it precedes symbols like createFileRoute and Link and follows the repository
coding guideline for LAT comments.
🪄 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: CHILL
Plan: Pro
Run ID: 593e2978-e565-4b3a-958c-11c2568b7938
📒 Files selected for processing (37)
apps/wodsmith-start/src/components/cohost-sidebar.tsxapps/wodsmith-start/src/components/compete-mobile-nav.tsxapps/wodsmith-start/src/components/compete-nav-brand.tsxapps/wodsmith-start/src/components/compete-nav.tsxapps/wodsmith-start/src/components/competition-sidebar.tsxapps/wodsmith-start/src/components/landing/final-cta.tsxapps/wodsmith-start/src/components/landing/two-audiences.tsxapps/wodsmith-start/src/components/nav/main-nav.tsxapps/wodsmith-start/src/components/nav/mobile-nav.tsxapps/wodsmith-start/src/components/series-sidebar.tsxapps/wodsmith-start/src/routes/__root.tsxapps/wodsmith-start/src/routes/_protected/admin/teams/programming/index.tsxapps/wodsmith-start/src/routes/_protected/admin/teams/scaling/index.tsxapps/wodsmith-start/src/routes/_protected/calculator/index.tsxapps/wodsmith-start/src/routes/_protected/dashboard.tsxapps/wodsmith-start/src/routes/_protected/log/index.tsxapps/wodsmith-start/src/routes/_protected/movements/index.tsxapps/wodsmith-start/src/routes/_protected/programming/index.tsxapps/wodsmith-start/src/routes/_protected/settings/overview/index.tsxapps/wodsmith-start/src/routes/_protected/settings/programming/index.tsxapps/wodsmith-start/src/routes/_protected/team/index.tsxapps/wodsmith-start/src/routes/_protected/workouts/index.tsxapps/wodsmith-start/src/routes/api/sitemap.tsapps/wodsmith-start/src/routes/compete/$slug/register/success.tsxapps/wodsmith-start/src/routes/compete/$slug/registered.tsxapps/wodsmith-start/src/routes/compete/cohost-invite/$token.tsxapps/wodsmith-start/src/routes/compete/cohost/$competitionId.tsxapps/wodsmith-start/src/routes/compete/index.tsxapps/wodsmith-start/src/routes/compete/invite/$token.tsxapps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsxapps/wodsmith-start/src/routes/compete/invite/-components/accept-volunteer-invite-form.tsxapps/wodsmith-start/src/routes/compete/organizer/$competitionId.tsxapps/wodsmith-start/src/routes/compete/organizer/onboard/index.tsxapps/wodsmith-start/src/routes/compete/organizer/series/$groupId.tsxapps/wodsmith-start/src/routes/index.tsxapps/wodsmith-start/src/routes/transfer/$transferId.tsxlat.md/architecture.md
💤 Files with no reviewable changes (1)
- apps/wodsmith-start/src/routes/api/sitemap.ts
There was a problem hiding this comment.
2 issues found across 28 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/wodsmith-start/src/routes/compete/index.tsx">
<violation number="1" location="apps/wodsmith-start/src/routes/compete/index.tsx:3">
P3: Duplicate search-schema/validation logic added in redirect route. Centralize this parser to avoid divergence between `/compete` redirect and `/` search handling.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| // --------------------------------------------------------------------------- | ||
| import { createFileRoute, redirect } from "@tanstack/react-router" | ||
|
|
||
| type StatusFilter = "all" | "registration-open" | "active" | "upcoming" | "past" |
There was a problem hiding this comment.
P3: Duplicate search-schema/validation logic added in redirect route. Centralize this parser to avoid divergence between /compete redirect and / search handling.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/routes/compete/index.tsx, line 3:
<comment>Duplicate search-schema/validation logic added in redirect route. Centralize this parser to avoid divergence between `/compete` redirect and `/` search handling.</comment>
<file context>
@@ -1,7 +1,39 @@
import { createFileRoute, redirect } from "@tanstack/react-router"
+type StatusFilter = "all" | "registration-open" | "active" | "upcoming" | "past"
+
+type CompeteSearch = {
</file context>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
apps/wodsmith-start/src/routes/index.tsx (1)
198-199:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winSync
localSearchwhen URL search changes.Line 198 only seeds state once, but Line 636 clears URL params. The input can keep stale text while results are no longer filtered.
Proposed fix
const [localSearch, setLocalSearch] = useState(search.q ?? "") + useEffect(() => { + setLocalSearch(search.q ?? "") + }, [search.q])Also applies to: 631-637
🤖 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 `@apps/wodsmith-start/src/routes/index.tsx` around lines 198 - 199, localSearch is only initialized from search.q once, so when the URL search params change (e.g., cleared around the code that manipulates params near the clear logic) the input can stay stale; update the component to sync localSearch with changes to the URL search value by adding an effect that listens to the URL-derived value (either search.q or deferredSearchQuery from useDeferredValue) and calls setLocalSearch(...) when it changes so the input reflects current params; reference the localSearch/setLocalSearch state and the deferredSearchQuery variable when implementing the effect.apps/wodsmith-start/src/routes/compete.tsx (1)
1-16:⚠️ Potential issue | 🟡 MinorAdd missing
//@lat:references inapps/wodsmith-start/src/routes/compete.tsx.
apps/wodsmith-start/src/routes/compete.tsxcontains no//@lat: [[...]]comments.- The request to add
import "server-only"is inconsistent with nearby route modules that usecreateServerFn(e.g.,apps/wodsmith-start/src/routes/admin.tsx,apps/wodsmith-start/src/routes/compete/organizer.tsx), which also omit the marker.🤖 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 `@apps/wodsmith-start/src/routes/compete.tsx` around lines 1 - 16, Add the missing // `@lat`: markers at the top of apps/wodsmith-start/src/routes/compete.tsx for the server-only imports: mark imports that must stay server-side (createServerFn, getSessionFromCookie, computeOrganizerEntitlements, TEAM_PERMISSIONS) with an appropriate // `@lat`: [[server-only]] comment above the top-level import block so the file matches the module isolation annotations used elsewhere (locate the import block that includes createServerFn and the auth/entitlements imports to place the comment).Source: Coding guidelines
apps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsx (1)
11-19:⚠️ Potential issue | 🟠 MajorAdd
import "server-only"toapps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsx
- This route imports server-only auth (
getSessionFromCookie) inside acreateServerFnhandler; enforce the server-only boundary withimport "server-only".- Add a
//@lat: [[...]]code-reference comment for the/compete/organizer/_dashboardroute segment (none exists in this file).Proposed fix
+import "server-only" import { createFileRoute, Outlet } from "`@tanstack/react-router`"🤖 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 `@apps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsx` around lines 11 - 19, This file uses server-only APIs inside the createServerFn handler (see createServerFn and getSessionFromCookie) so add import "server-only" at the top to enforce the server boundary, and add a route code-reference comment for this segment (e.g., a single-line comment containing // `@lat`: [[/compete/organizer/_dashboard]]) near the top of the file to mark the route; ensure both the import and the // `@lat` comment are placed above other imports so they are obvious and applied to the module before createServerFn and computeOrganizerEntitlements are used.Source: Coding guidelines
🧹 Nitpick comments (3)
apps/wodsmith-start/src/routes/index.tsx (1)
31-33: ⚡ Quick winAdd a
@latreference on this route module.This changed TSX file is missing a source-concept trace comment.
Proposed fix
+// `@lat`: [[architecture#Route Groups#compete]] export const Route = createFileRoute("/")({As per coding guidelines,
Use //@lat: [[section-id]] code reference comments in TypeScript/JavaScript/Rust/Go/C files ... to tie source code to concepts.Also applies to: 45-46
🤖 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 `@apps/wodsmith-start/src/routes/index.tsx` around lines 31 - 33, Add a source-concept trace comment for this route module by inserting a // `@lat`: [[section-id]] reference near the top of apps/wodsmith-start/src/routes/index.tsx (e.g., directly above or below the existing "// ---------------------------------------------------------------------------\n// Route\n// ---------------------------------------------------------------------------" block). Ensure you use the canonical format exactly "// `@lat`: [[section-id]]" and place the same comment also where analogous route blocks appear (the comment noted also applies around the code at lines referenced 45-46) so the module is tied to the correct concept ID.Source: Coding guidelines
apps/wodsmith-start/src/routes/compete.tsx (1)
37-45: ⚡ Quick winAdd a
@latreference comment on this route declaration.This changed TSX route segment lacks source-to-concept linkage.
Proposed fix
+// `@lat`: [[architecture#Route Groups#compete]] export const Route = createFileRoute("/compete")({As per coding guidelines,
Use //@lat: [[section-id]] code reference comments in TypeScript/JavaScript/Rust/Go/C files ... to tie source code to concepts.🤖 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 `@apps/wodsmith-start/src/routes/compete.tsx` around lines 37 - 45, The route declaration exported as Route (created via createFileRoute with component CompeteLayout and loader calling getCompeteNavDataFn) is missing the required source-to-concept linkage comment; add a single-line reference comment immediately above the export like "// `@lat`: [[section-id]]" (replace [[section-id]] with the appropriate section identifier) so the Route/createFileRoute declaration has the required // `@lat` reference for tooling.Source: Coding guidelines
apps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsx (1)
38-46: ⚡ Quick winAdd a
@latreference near this route definition.The changed TSX route section currently has no source-concept reference comment.
Proposed fix
+// `@lat`: [[architecture#Route Groups#compete]] export const Route = createFileRoute("/compete/organizer/_dashboard")({As per coding guidelines,
Use //@lat: [[section-id]] code reference comments in TypeScript/JavaScript/Rust/Go/C files ... to tie source code to concepts.🤖 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 `@apps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsx` around lines 38 - 46, Add a // `@lat`: [[section-id]] reference comment adjacent to this route definition so the source is tied to the concept; place the comment immediately above the createFileRoute call for the Route export (the block that references createFileRoute("/compete/organizer/_dashboard"), DashboardLayout, and loader calling getCompeteNavDataFn) so tools and readers can map this route to the specified concept id.Source: Coding guidelines
🤖 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 `@lat.md/architecture.md`:
- Around line 94-96: Add wiki-link source references to the new routing notes by
linking the architecture text to the actual implementing symbols: insert wiki
links like [[DiscoveryRoute]] (or [[DiscoveryRoute|root discovery route]]),
[[CompeteLayout]] (or [[CompeteLayout|/compete layout]]), and
[[CompeteBreadcrumbs]] (or [[CompeteBreadcrumbs|breadcrumbs component]]) where
you describe the root discovery route rendering the Compete shell and the
breadcrumb behavior; use the [[target]] or [[target|alias]] form consistent with
lat.md cross-reference rules so readers can jump to the corresponding
route/component sources.
---
Outside diff comments:
In `@apps/wodsmith-start/src/routes/compete.tsx`:
- Around line 1-16: Add the missing // `@lat`: markers at the top of
apps/wodsmith-start/src/routes/compete.tsx for the server-only imports: mark
imports that must stay server-side (createServerFn, getSessionFromCookie,
computeOrganizerEntitlements, TEAM_PERMISSIONS) with an appropriate // `@lat`:
[[server-only]] comment above the top-level import block so the file matches the
module isolation annotations used elsewhere (locate the import block that
includes createServerFn and the auth/entitlements imports to place the comment).
In `@apps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsx`:
- Around line 11-19: This file uses server-only APIs inside the createServerFn
handler (see createServerFn and getSessionFromCookie) so add import
"server-only" at the top to enforce the server boundary, and add a route
code-reference comment for this segment (e.g., a single-line comment containing
// `@lat`: [[/compete/organizer/_dashboard]]) near the top of the file to mark the
route; ensure both the import and the // `@lat` comment are placed above other
imports so they are obvious and applied to the module before createServerFn and
computeOrganizerEntitlements are used.
In `@apps/wodsmith-start/src/routes/index.tsx`:
- Around line 198-199: localSearch is only initialized from search.q once, so
when the URL search params change (e.g., cleared around the code that
manipulates params near the clear logic) the input can stay stale; update the
component to sync localSearch with changes to the URL search value by adding an
effect that listens to the URL-derived value (either search.q or
deferredSearchQuery from useDeferredValue) and calls setLocalSearch(...) when it
changes so the input reflects current params; reference the
localSearch/setLocalSearch state and the deferredSearchQuery variable when
implementing the effect.
---
Nitpick comments:
In `@apps/wodsmith-start/src/routes/compete.tsx`:
- Around line 37-45: The route declaration exported as Route (created via
createFileRoute with component CompeteLayout and loader calling
getCompeteNavDataFn) is missing the required source-to-concept linkage comment;
add a single-line reference comment immediately above the export like "// `@lat`:
[[section-id]]" (replace [[section-id]] with the appropriate section identifier)
so the Route/createFileRoute declaration has the required // `@lat` reference for
tooling.
In `@apps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsx`:
- Around line 38-46: Add a // `@lat`: [[section-id]] reference comment adjacent to
this route definition so the source is tied to the concept; place the comment
immediately above the createFileRoute call for the Route export (the block that
references createFileRoute("/compete/organizer/_dashboard"), DashboardLayout,
and loader calling getCompeteNavDataFn) so tools and readers can map this route
to the specified concept id.
In `@apps/wodsmith-start/src/routes/index.tsx`:
- Around line 31-33: Add a source-concept trace comment for this route module by
inserting a // `@lat`: [[section-id]] reference near the top of
apps/wodsmith-start/src/routes/index.tsx (e.g., directly above or below the
existing "//
---------------------------------------------------------------------------\n//
Route\n//
---------------------------------------------------------------------------"
block). Ensure you use the canonical format exactly "// `@lat`: [[section-id]]"
and place the same comment also where analogous route blocks appear (the comment
noted also applies around the code at lines referenced 45-46) so the module is
tied to the correct concept ID.
🪄 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: CHILL
Plan: Pro
Run ID: 4ac4d620-4e78-471a-8448-1dabfe5a4567
📒 Files selected for processing (31)
apps/wodsmith-start/src/components/cohost-sidebar.tsxapps/wodsmith-start/src/components/compete-breadcrumb.tsxapps/wodsmith-start/src/components/compete-mobile-nav.tsxapps/wodsmith-start/src/components/compete-nav-brand.tsxapps/wodsmith-start/src/components/compete-nav.tsxapps/wodsmith-start/src/components/competition-sidebar.tsxapps/wodsmith-start/src/components/landing/final-cta.tsxapps/wodsmith-start/src/components/landing/two-audiences.tsxapps/wodsmith-start/src/components/nav/main-nav.tsxapps/wodsmith-start/src/components/nav/mobile-nav.tsxapps/wodsmith-start/src/components/series-sidebar.tsxapps/wodsmith-start/src/routes/_protected/admin/teams/programming/index.tsxapps/wodsmith-start/src/routes/_protected/admin/teams/scaling/index.tsxapps/wodsmith-start/src/routes/_protected/calculator/index.tsxapps/wodsmith-start/src/routes/_protected/dashboard.tsxapps/wodsmith-start/src/routes/_protected/log/index.tsxapps/wodsmith-start/src/routes/_protected/movements/index.tsxapps/wodsmith-start/src/routes/_protected/programming/index.tsxapps/wodsmith-start/src/routes/_protected/settings/overview/index.tsxapps/wodsmith-start/src/routes/_protected/settings/programming/index.tsxapps/wodsmith-start/src/routes/_protected/team/index.tsxapps/wodsmith-start/src/routes/_protected/workouts/index.tsxapps/wodsmith-start/src/routes/compete.tsxapps/wodsmith-start/src/routes/compete/index.tsxapps/wodsmith-start/src/routes/compete/invite/$token.tsxapps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsxapps/wodsmith-start/src/routes/compete/organizer/_dashboard.tsxapps/wodsmith-start/src/routes/compete/organizer/series/$groupId.tsxapps/wodsmith-start/src/routes/index.tsxlat.md/architecture.mdlat.md/organizer-dashboard.md
✅ Files skipped from review due to trivial changes (1)
- lat.md/organizer-dashboard.md
🚧 Files skipped from review as they are similar to previous changes (22)
- apps/wodsmith-start/src/routes/_protected/movements/index.tsx
- apps/wodsmith-start/src/routes/_protected/settings/programming/index.tsx
- apps/wodsmith-start/src/components/landing/two-audiences.tsx
- apps/wodsmith-start/src/routes/_protected/programming/index.tsx
- apps/wodsmith-start/src/components/landing/final-cta.tsx
- apps/wodsmith-start/src/components/compete-nav-brand.tsx
- apps/wodsmith-start/src/routes/_protected/dashboard.tsx
- apps/wodsmith-start/src/routes/compete/invite/-components/accept-invite-button.tsx
- apps/wodsmith-start/src/components/nav/mobile-nav.tsx
- apps/wodsmith-start/src/routes/_protected/admin/teams/programming/index.tsx
- apps/wodsmith-start/src/routes/_protected/workouts/index.tsx
- apps/wodsmith-start/src/routes/compete/organizer/series/$groupId.tsx
- apps/wodsmith-start/src/components/cohost-sidebar.tsx
- apps/wodsmith-start/src/routes/_protected/settings/overview/index.tsx
- apps/wodsmith-start/src/routes/_protected/calculator/index.tsx
- apps/wodsmith-start/src/routes/_protected/admin/teams/scaling/index.tsx
- apps/wodsmith-start/src/components/nav/main-nav.tsx
- apps/wodsmith-start/src/routes/compete/index.tsx
- apps/wodsmith-start/src/routes/compete/invite/$token.tsx
- apps/wodsmith-start/src/components/competition-sidebar.tsx
- apps/wodsmith-start/src/routes/_protected/log/index.tsx
- apps/wodsmith-start/src/components/series-sidebar.tsx
| The root discovery route renders the Compete navigation and footer shell because it is outside the `/compete` layout tree. Its header keeps `Competitions` visible on `/` and marks it as the current page. | ||
|
|
||
| Compete breadcrumbs label the `/compete` route segment as `Competitions`, but link that root crumb back to `/` because discovery moved out of the `/compete` layout tree. |
There was a problem hiding this comment.
Add wiki-link source references for the new routing behavior notes.
These new architecture assertions should include at least one [[...]] reference to the implementing route/component files, consistent with lat.md cross-reference rules.
As per coding guidelines, “Use wiki links ([[target]] or [[target|alias]]) to cross-reference sections and source code in lat.md/ files.”
🧰 Tools
🪛 LanguageTool
[grammar] ~94-~94: Ensure spelling is correct
Context: .... The root discovery route renders the Compete navigation and footer shell because it ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 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 `@lat.md/architecture.md` around lines 94 - 96, Add wiki-link source references
to the new routing notes by linking the architecture text to the actual
implementing symbols: insert wiki links like [[DiscoveryRoute]] (or
[[DiscoveryRoute|root discovery route]]), [[CompeteLayout]] (or
[[CompeteLayout|/compete layout]]), and [[CompeteBreadcrumbs]] (or
[[CompeteBreadcrumbs|breadcrumbs component]]) where you describe the root
discovery route rendering the Compete shell and the breadcrumb behavior; use the
[[target]] or [[target|alias]] form consistent with lat.md cross-reference rules
so readers can jump to the corresponding route/component sources.
Source: Coding guidelines
There was a problem hiding this comment.
4 issues found across 10 files (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/wodsmith-start/src/components/compete-mobile-nav.tsx">
<violation number="1" location="apps/wodsmith-start/src/components/compete-mobile-nav.tsx:161">
P3: Internal nav to organizer onboarding uses `<a href>` instead of TanStack `Link`, causing hard reload and inconsistent SPA behavior.</violation>
</file>
<file name="apps/wodsmith-start/src/routes/__root.tsx">
<violation number="1" location="apps/wodsmith-start/src/routes/__root.tsx:88">
P2: Auth-route detection misses `/team-invite`, so `MainNav` still renders on that auth page. Include `/team-invite` in both current and target path checks.</violation>
</file>
<file name="apps/wodsmith-start/src/server-fns/organizer-onboarding-fns.ts">
<violation number="1" location="apps/wodsmith-start/src/server-fns/organizer-onboarding-fns.ts:217">
P2: Helper treats rejected organizer requests as active applications. Filter to pending/approved statuses so rejected users can re-apply and see correct nav state.</violation>
</file>
<file name="apps/wodsmith-start/src/routes/_auth.tsx">
<violation number="1" location="apps/wodsmith-start/src/routes/_auth.tsx:11">
P1: CompeteNav receives hardcoded `session={null}` and `hasOrganizerApplication={false}` instead of real values from the server, causing auth pages to always show the logged-out navigation bar ("Login" / "Sign Up") even when the user is authenticated.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| return ( | ||
| <div className="min-h-screen bg-background"> | ||
| {/* TODO: Add navigation header if needed */} | ||
| <CompeteNav session={null} hasOrganizerApplication={false} /> |
There was a problem hiding this comment.
P1: CompeteNav receives hardcoded session={null} and hasOrganizerApplication={false} instead of real values from the server, causing auth pages to always show the logged-out navigation bar ("Login" / "Sign Up") even when the user is authenticated.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/routes/_auth.tsx, line 11:
<comment>CompeteNav receives hardcoded `session={null}` and `hasOrganizerApplication={false}` instead of real values from the server, causing auth pages to always show the logged-out navigation bar ("Login" / "Sign Up") even when the user is authenticated.</comment>
<file context>
@@ -7,11 +8,10 @@ export const Route = createFileRoute("/_auth")({
return (
<div className="min-h-screen bg-background">
- {/* TODO: Add navigation header if needed */}
+ <CompeteNav session={null} hasOrganizerApplication={false} />
<main>
<Outlet />
</file context>
| currentPath.startsWith("/verify-email") || | ||
| (isNavigating && | ||
| (targetPath === "/sign-in" || | ||
| targetPath === "/sign-up" || | ||
| targetPath.startsWith("/reset-password") || | ||
| targetPath.startsWith("/forgot-password") || | ||
| targetPath.startsWith("/verify-email"))) | ||
|
|
There was a problem hiding this comment.
P2: Auth-route detection misses /team-invite, so MainNav still renders on that auth page. Include /team-invite in both current and target path checks.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/routes/__root.tsx, line 88:
<comment>Auth-route detection misses `/team-invite`, so `MainNav` still renders on that auth page. Include `/team-invite` in both current and target path checks.</comment>
<file context>
@@ -80,10 +80,22 @@ function RootComponent() {
+ currentPath === "/sign-up" ||
+ currentPath.startsWith("/reset-password") ||
+ currentPath.startsWith("/forgot-password") ||
+ currentPath.startsWith("/verify-email") ||
+ (isNavigating &&
+ (targetPath === "/sign-in" ||
</file context>
| currentPath.startsWith("/verify-email") || | |
| (isNavigating && | |
| (targetPath === "/sign-in" || | |
| targetPath === "/sign-up" || | |
| targetPath.startsWith("/reset-password") || | |
| targetPath.startsWith("/forgot-password") || | |
| targetPath.startsWith("/verify-email"))) | |
| currentPath.startsWith("/verify-email") || | |
| currentPath.startsWith("/team-invite") || | |
| (isNavigating && | |
| (targetPath === "/sign-in" || | |
| targetPath === "/sign-up" || | |
| targetPath.startsWith("/reset-password") || | |
| targetPath.startsWith("/forgot-password") || | |
| targetPath.startsWith("/verify-email") || | |
| targetPath.startsWith("/team-invite"))) |
|
|
||
| const db = getDb() | ||
| const request = await db.query.organizerRequestTable.findFirst({ | ||
| where: inArray(organizerRequestTable.teamId, teamIds), |
There was a problem hiding this comment.
P2: Helper treats rejected organizer requests as active applications. Filter to pending/approved statuses so rejected users can re-apply and see correct nav state.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/server-fns/organizer-onboarding-fns.ts, line 217:
<comment>Helper treats rejected organizer requests as active applications. Filter to pending/approved statuses so rejected users can re-apply and see correct nav state.</comment>
<file context>
@@ -205,6 +205,21 @@ async function isApprovedOrganizerInternal(teamId: string): Promise<boolean> {
+
+ const db = getDb()
+ const request = await db.query.organizerRequestTable.findFirst({
+ where: inArray(organizerRequestTable.teamId, teamIds),
+ })
+
</file context>
| where: inArray(organizerRequestTable.teamId, teamIds), | |
| where: and( | |
| inArray(organizerRequestTable.teamId, teamIds), | |
| inArray(organizerRequestTable.status, [ | |
| ORGANIZER_REQUEST_STATUS.PENDING, | |
| ORGANIZER_REQUEST_STATUS.APPROVED, | |
| ]), | |
| ), |
| )} | ||
| {!hasOrganizerApplication && ( | ||
| <a | ||
| href="/compete/organizer/onboard" |
There was a problem hiding this comment.
P3: Internal nav to organizer onboarding uses <a href> instead of TanStack Link, causing hard reload and inconsistent SPA behavior.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/wodsmith-start/src/components/compete-mobile-nav.tsx, line 161:
<comment>Internal nav to organizer onboarding uses `<a href>` instead of TanStack `Link`, causing hard reload and inconsistent SPA behavior.</comment>
<file context>
@@ -127,23 +137,32 @@ export default function CompeteMobileNav({
<a
- href="/compete/organizer"
- className="flex items-center gap-2 hover:text-primary"
+ href="/compete/organizer/onboard"
+ className="hover:text-primary"
onClick={handleLinkClick}
</file context>
Summary
/competeto the site root/./competeindex redirect back to/while preserving event routes like/compete/:slug./competebrowse/return links and redirects to point at/./competefrom the static sitemap entry and updatelat.mdarchitecture notes.Validation
PATH=/Users/ianjones/.nvm/versions/node/v24.14.1/bin:$PATH lat checkpassed.gitnexus detect_changeswas attempted twice but failed withCannot destructure property 'package' of 'node.target' as it is null.before producing an affected-scope report.Notes
gh auth statusreports the local GitHub CLI token is invalid, so this PR was opened through the GitHub connector after pushing the branch with git.Summary by cubic
Moved the competition discovery page to
/with a/competeredirect that preserves filters. Fixed the navigation shell to prevent flashes and ensure organizer/cohost routes use their own layouts during pending navigation.Refactors
/compete/:slug./competeindex redirects to/with existing search params; login/sign-up redirects updated to/./; the breadcrumb root crumb now links to/.Competitions(active on/), showsHOST A COMPuntil a user's team has an organizer request, thenMANAGE COMPETITIONS; adds a divider before the host CTA; active links use underline andaria-currentacross desktop and mobile.MainNavon/and auth routes; prevent the public Compete shell from wrapping organizer/cohost layouts during pending navigation./; removed/competefrom the sitemap; updated architecture and organizer dashboard docs.Migration
/competelinks will redirect to/./.Written for commit 1dabb10. Summary will update on new commits.
Summary by CodeRabbit
Navigation Updates
UI/Behavior