Skip to content

Extract the trip view model - #18

Merged
nedcut merged 1 commit into
mainfrom
codex/extract-trip-view-model
Jul 11, 2026
Merged

Extract the trip view model#18
nedcut merged 1 commit into
mainfrom
codex/extract-trip-view-model

Conversation

@nedcut

@nedcut nedcut commented Jul 11, 2026

Copy link
Copy Markdown
Owner

What changed

  • extracts the authentication dialog and status notification into focused components
  • moves day filtering, sidebar statistics, edit-target resolution, and outlier projection into pure view-model helpers
  • adds comprehensive unit coverage for those derivations
  • reduces app/page.tsx by 96 lines without changing Journey, map, mutation, or URL behavior

Why

The main page had become responsible for nearly every application concern. This creates clean, testable seams while keeping the refactor small enough to verify behavior confidently.

Validation

  • npm run lint (0 errors; one pre-existing hook dependency warning)
  • npm run typecheck
  • npm test (223 tests)
  • npm run test:e2e (7 tests)
  • git diff --check

Review guidance

This is intentionally behavior-preserving. Compare the extracted helpers/components directly with their previous inline implementations; Journey and map controller state remain in app/page.tsx for later, separately reviewable work.

Copilot AI review requested due to automatic review settings July 11, 2026 20:30
@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lofoten-map Ready Ready Preview, Comment Jul 11, 2026 8:30pm

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 54 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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c4ddbed4-acb5-4c9e-af14-bd3b77eb75ea

📥 Commits

Reviewing files that changed from the base of the PR and between bd21259 and b96ee72.

📒 Files selected for processing (6)
  • app/page.tsx
  • components/AuthPanel.tsx
  • components/DaySidebar.tsx
  • components/StatusPill.tsx
  • lib/trip-view-model.test.ts
  • lib/trip-view-model.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/extract-trip-view-model

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.

@nedcut
nedcut merged commit e090810 into main Jul 11, 2026
4 checks passed
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.

2 participants