Skip to content

refactor(routing): move control panel to /dashboard, add public landing at / - #43

Merged
nathanialhenniges merged 1 commit into
mainfrom
claude/romantic-tereshkova-a76d25
Jun 29, 2026
Merged

refactor(routing): move control panel to /dashboard, add public landing at /#43
nathanialhenniges merged 1 commit into
mainfrom
claude/romantic-tereshkova-a76d25

Conversation

@nathanialhenniges

@nathanialhenniges nathanialhenniges commented Jun 29, 2026

Copy link
Copy Markdown
Member

Why

Cloudflare Access gates by destination path and has no per-sub-path bypass. The operator panel lived at the root (/, /timer, /giveaways, /settings/*), which forced Access to gate / while we needed /overlay/* (OBS token-gated) and /api/twitch/callback to stay public. That can't be expressed cleanly within the 5-destination limit.

What

  • Move the panel route group (panel)dashboard, so all operator routes now live under /dashboard/*.
  • Add a public landing page at / with a link into the dashboard.
  • Update all internal nav (dashboard/layout.tsx, dashboard/settings/layout.tsx) and the overlay-settings links in rewards-tab.tsx / timer-tab.tsx.

Auth model after this change

Path Gate
/ public landing
/dashboard, /dashboard/* Cloudflare Access
/api/trpc/* Cloudflare Access
/overlay/* ?t= token (unchanged)
/api/twitch/callback public (unchanged)

Overlays and the Twitch callback are untouched — OBS URLs still point at /overlay/*?t=…, no re-copy needed.

Ops follow-up (deploy + Access must move together)

Update the Cloudflare Access app destinations to: dashboard, dashboard/*, api/trpc/*. ⚠️ If code deploys while Access still gates control, /dashboard is ungated. Update Access alongside the deploy.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added a landing page with branding, a short product description, and a button that takes users to the dashboard.
    • Introduced a more consistent dashboard route structure, with navigation centered under the dashboard area.
  • Bug Fixes

    • Updated navigation links across the dashboard, settings, rewards, and timer views to point to the new dashboard-based routes.
    • Adjusted active navigation highlighting so the current section is shown correctly.

@nathanialhenniges
nathanialhenniges force-pushed the claude/romantic-tereshkova-a76d25 branch from 054051e to df2db88 Compare June 29, 2026 12:40
@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@nathanialhenniges, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bbe63ccc-bc8a-4795-9879-f7261a37c4cf

📥 Commits

Reviewing files that changed from the base of the PR and between df2db88 and a6f4858.

📒 Files selected for processing (12)
  • apps/web/src/app/dashboard/giveaways/page.tsx
  • apps/web/src/app/dashboard/layout.tsx
  • apps/web/src/app/dashboard/page.tsx
  • apps/web/src/app/dashboard/settings/backup/page.tsx
  • apps/web/src/app/dashboard/settings/layout.tsx
  • apps/web/src/app/dashboard/settings/overlays/page.tsx
  • apps/web/src/app/dashboard/settings/page.tsx
  • apps/web/src/app/dashboard/settings/twitch/page.tsx
  • apps/web/src/app/dashboard/timer/page.tsx
  • apps/web/src/app/page.tsx
  • apps/web/src/components/control/rewards-tab.tsx
  • apps/web/src/components/control/timer-tab.tsx

Walkthrough

All internal navigation routes are migrated from root-level paths (/, /settings/...) to /dashboard-prefixed paths (/dashboard, /dashboard/settings/...). A new landing page is added at the root (/) with a hero UI linking to /dashboard.

Changes

Route migration to /dashboard prefix and new landing page

Layer / File(s) Summary
Dashboard layout nav and active-state logic
apps/web/src/app/dashboard/layout.tsx
SECTIONS hrefs updated to /dashboard/*; active-state logic changed to exact-match /dashboard and startsWith for subroutes; logo and Settings links point to /dashboard-scoped routes.
Settings layout and component link updates
apps/web/src/app/dashboard/settings/layout.tsx, apps/web/src/components/control/rewards-tab.tsx, apps/web/src/components/control/timer-tab.tsx
Settings SECTIONS hrefs updated to /dashboard/settings/...; "Get URL →" links in rewards and timer tabs updated to /dashboard/settings/overlays.
New root landing page
apps/web/src/app/page.tsx
New LandingPage component added with logo, title, description, and a link to /dashboard.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • MrDemonWolf/wolfathon#37: Updates the same rewards-tab.tsx and timer-tab.tsx overlay link hrefs, directly overlapping with this route change.
  • MrDemonWolf/wolfathon#38: Adds a Giveaways tab to the dashboard SECTIONS nav configuration, the same config block modified here.

Poem

🐇 Hop, hop, the routes have moved,
No more root paths, all re-grooved!
/dashboard leads the way,
A landing page to greet the day.
Every link now knows its home —
No more lost bunnies left to roam! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main routing refactor and the new public landing page.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/romantic-tereshkova-a76d25

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

❤️ Share

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

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

🧹 Nitpick comments (1)
apps/web/src/app/dashboard/layout.tsx (1)

11-16: 🔒 Security & Privacy | 🔵 Trivial

Ship the Cloudflare Access destination update with this route move.

This layout now assumes /dashboard and /api/trpc/* are gated while / stays public. If the Access app destinations are not updated in the same rollout, the control panel becomes publicly reachable.

🤖 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/web/src/app/dashboard/layout.tsx` around lines 11 - 16, The route move
in the dashboard layout assumes Cloudflare Access is already updated, so make
sure the Access app destination list is changed in the same rollout. Update the
gating configuration to cover the new /dashboard and /api/trpc/* paths while
keeping / public, and verify the rollout alongside the dashboard layout changes
so the control panel does not become publicly reachable.
🤖 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.

Nitpick comments:
In `@apps/web/src/app/dashboard/layout.tsx`:
- Around line 11-16: The route move in the dashboard layout assumes Cloudflare
Access is already updated, so make sure the Access app destination list is
changed in the same rollout. Update the gating configuration to cover the new
/dashboard and /api/trpc/* paths while keeping / public, and verify the rollout
alongside the dashboard layout changes so the control panel does not become
publicly reachable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ece6f512-5673-4261-903c-67f949694c88

📥 Commits

Reviewing files that changed from the base of the PR and between bde59f4 and df2db88.

📒 Files selected for processing (12)
  • apps/web/src/app/dashboard/giveaways/page.tsx
  • apps/web/src/app/dashboard/layout.tsx
  • apps/web/src/app/dashboard/page.tsx
  • apps/web/src/app/dashboard/settings/backup/page.tsx
  • apps/web/src/app/dashboard/settings/layout.tsx
  • apps/web/src/app/dashboard/settings/overlays/page.tsx
  • apps/web/src/app/dashboard/settings/page.tsx
  • apps/web/src/app/dashboard/settings/twitch/page.tsx
  • apps/web/src/app/dashboard/timer/page.tsx
  • apps/web/src/app/page.tsx
  • apps/web/src/components/control/rewards-tab.tsx
  • apps/web/src/components/control/timer-tab.tsx

…ng at /

Cloudflare Access can only gate by destination path, not bypass sub-paths.
Panel routes lived at the root, forcing Access to gate / with no clean way
to keep /overlay (OBS token-gated) and /api/twitch/callback public.

Move the operator panel under /dashboard so Access gates exactly /dashboard,
/dashboard/*, /api/trpc/*. Add a public landing page at /.

Overlays (/overlay/*) and the Twitch callback stay public and untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nathanialhenniges
nathanialhenniges force-pushed the claude/romantic-tereshkova-a76d25 branch from df2db88 to a6f4858 Compare June 29, 2026 12:55
@nathanialhenniges
nathanialhenniges merged commit 5dc3865 into main Jun 29, 2026
3 checks passed
@nathanialhenniges
nathanialhenniges deleted the claude/romantic-tereshkova-a76d25 branch June 29, 2026 12:57
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