Repository navigation
Night strips, stay check-in/out and PDF itinerary export - #3
Merged
Merged
Conversation
Each day column ends with a night strip: the stay you sleep in, with "Night n of N", check-in and check-out-tomorrow hints, or an overnight flight/boat, or a "No accommodation" warning with "+ Add stay". Every stay keeps one colour on all its nights (stays with the same name share it), using hues kept apart from the day colours. Clicking a stay strip highlights the stay card and its map pin. The night logic lives in lib/stays.ts (nightsOf, stayColorIndex) with tests. The item editor can now be opened with a preset type. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stays no longer use a fixed start time and duration. The editor shows a Stay section with nights, "check-in from" and "check-out by" times and the date range. Check-in is not a fixed start, so arriving later than it is not flagged as late; older stays with a fixed start time move it into check-in when edited. The times appear on the stay card, in the night strip and in the MCP trip summary, and add_item / update_item accept stay_check_in and stay_check_out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The trip's Export button now opens a menu: JSON (the existing backup download) or PDF. PDF opens a print-ready itinerary page (trip/print?id=…) with an overview of days and nights, a table of all bookings with references and prices, and a day-by-day plan with times, travel legs, booking details, addresses, notes, warnings and where each night is spent. "Save as PDF" uses the browser's print dialog, so the text stays selectable; the page has its own print styles and is always light. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The printable itinerary starts with a map zoomed on where the trip happens. Flights more than 1000 km from every place you stay or visit (e.g. the flights from home) are left off the map, pins and lines, so the map frames the destination instead of the whole route there. The map's height follows the shape of that area (tall trips get a tall map) and it is a still picture: no controls, no gestures, light colours, and MapLibre keeps its drawing buffer so the canvas prints. The overview table shows each day's colour to match the route lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four commits, each typechecked and tested on its own:
lib/stays.tswith tests.add_item/update_itemacceptstay_check_in/stay_check_out./trip/print?id=…, a print-ready itinerary (overview of days and nights, bookings table, day-by-day plan with times, legs, booking refs, addresses, notes, warnings). "Save as PDF" uses the browser print dialog, so text stays selectable; always light, with its own print styles.Test plan
bun run typecheckvitest run– 28 tests pass (new:lib/stays.test.ts,focusItems/mercatorAspectinlib/geo.test.ts)🤖 Generated with Claude Code