Skip to content

Finish MVU#1

Merged
colterpurcell merged 12 commits into
mainfrom
newlaptop
Dec 5, 2025
Merged

Finish MVU#1
colterpurcell merged 12 commits into
mainfrom
newlaptop

Conversation

@colterpurcell
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR completes the MVU (Model-View-Update) architecture implementation by adding comprehensive itinerary management functionality to a national parks adventure guide application. The changes enable users to create, view, update, and delete trip itineraries with detailed day-by-day planning.

Key changes:

  • Complete itinerary CRUD operations with server-side API and client-side MVU pattern
  • New itinerary views for listing, creating, and displaying trips
  • Seed data for sample Yosemite and Yellowstone itineraries
  • SPA routing updates and removal of legacy static HTML rewrites

Reviewed changes

Copilot reviewed 56 out of 62 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/server/src/services/itinerary-svc.ts New service implementing itinerary CRUD operations with MongoDB queries
packages/server/src/routes/itineraries.ts REST API endpoints for itinerary management with authentication
packages/server/src/models/itinerary-model.ts Mongoose schema defining itinerary structure with activities and metadata
packages/server/src/seed.ts Extended seed data with sample itineraries for two national park trips
packages/server/src/index.ts Updated to register itinerary routes and SPA fallback handling
packages/app/src/views/trips-view.ts Trip listing view with grouping and deletion functionality
packages/app/src/views/trip-view.ts Individual trip detail view displaying day-by-day itinerary
packages/app/src/views/itinerary-create-view.ts Multi-day itinerary creation form with activity planning
packages/app/src/update.ts MVU update function handling itinerary create/update/delete messages
packages/app/src/model.ts Application model defining itinerary state structure
packages/app/src/messages.ts Message types for itinerary operations
packages/app/src/main.ts Updated routing configuration for new trip-related views

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/server/src/seed.ts Outdated
itineraryid: "yose-fall-day1",
tripid: "yose-fall",
tripName: "Yosemite Fall Adventure",
userid: "alice",
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The field name userid is inconsistent with the owner field defined in the schema (line 34 of itinerary-model.ts). The seed data should use owner instead of userid to match the model definition.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

this.updateAutoDates();
}}
/>
<label>
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Missing closing </label> tag. The label opened on line 423 is not properly closed before the next label starts on line 424.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment on lines 94 to 95
<li><a href="../parks/yose/index.html#poi">All Points of Interest</a></li>
<h3>Points of Interest:</h3>
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

HTML structure error: a <li> element (line 94) is placed outside of its parent <ul> element (line 95). The list item on line 94 should be moved inside the <ul> tag that starts on line 95.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

@@ -0,0 +1,133 @@
import express, { Request, Response } from "express";
import ItinerariesSvc, {
Itineraries as Itineraries,
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The import statement contains a redundant alias Itineraries as Itineraries. This should be simplified to just Itineraries.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Comment on lines +2 to +4
import ItinerariesSvc, {
Itineraries as Itineraries,
} from "../services/itinerary-svc";
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Unused import ItinerariesSvc.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 5, 2025

@colterpurcell I've opened a new pull request, #2, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI mentioned this pull request Dec 5, 2025
5 tasks
Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 5, 2025

@colterpurcell I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 5, 2025

@colterpurcell I've opened a new pull request, #4, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 5, 2025

@colterpurcell I've opened a new pull request, #5, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 6 commits December 5, 2025 20:03
Co-authored-by: colterpurcell <76139300+colterpurcell@users.noreply.github.com>
Co-authored-by: colterpurcell <76139300+colterpurcell@users.noreply.github.com>
Co-authored-by: colterpurcell <76139300+colterpurcell@users.noreply.github.com>
[WIP] Address feedback on 'Finish MVU' PR
[WIP] Address feedback on 'Finish MVU' pull request
Fix HTML structure error: li element outside ul parent
@colterpurcell colterpurcell merged commit f2c8595 into main Dec 5, 2025
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.

3 participants