- Add render_trip_element macro to macros.html; use it in trip_item for
the trip list page, giving a consistent one-line-per-element format
with emoji, route, times, duration, operator, distance, and CO₂
- Redesign trip_page.html itinerary: day headers use date-only (no year),
condense check-out to a single accent line, show time-only on transport
cards, humanise duration (Xh Ym), km-only distance, add CO₂ for all
transport modes, fix seat display for integer seat values
- Fix UndefinedError on /trip/past caused by absent 'arrive' key (Jinja2
Undefined is truthy) and date-only depart/arrive fields (no .date())
- Improve mobile map layout: text column before map in HTML order, reduce
mobile map heights, hide toggle button on mobile
- Add trips.css with design system (Playfair Display / Source Sans 3 /
JetBrains Mono, navy/gold/amber palette, card variants by type)
- Add tests/test_trip_list_render.py covering the rendering edge cases
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Move all parsing logic from parse_airbnb.py to agenda/airbnb.py
- Update parse_airbnb.py to use the new library module
- Add comprehensive tests in tests/test_airbnb.py covering all functions
- Maintain backward compatibility for the command-line interface
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Simplify the location tracking function by extracting travel data directly
from trip objects instead of requiring separate YAML file parameters.
Changes:
- Remove airport, train, and ferry location helper functions that required
separate YAML data lookups
- Update get_location_for_date signature to only take target_date and trips
- Extract flight/train/ferry details directly from trip.travel items
- Use embedded airport/station/terminal objects from trip data
- Remove YAML file parsing from weekends function
- Update test calls to use new simplified signature
This eliminates duplicate data loading and simplifies the API while
maintaining all existing functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add helper functions for train and ferry location extraction
- Update get_location_for_date to consider trains and ferries alongside flights
- Parse stations.yaml and ferry_terminals.yaml for location data
- Handle UK vs international locations consistently for all transport modes
- Add comprehensive tests for new train and ferry location helpers
- Format code with black for consistent style
Now tracks complete travel history including flights, trains, ferries, and accommodation for accurate location determination.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add pytest fixtures for shared data to avoid reparsing YAML files
- Split large test into specific test functions for better modularity
- Add comprehensive test coverage for busy_event, location tracking, and helper functions
- Improve test performance with session-scoped fixtures
- Enable individual test execution with pytest -k
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Expand return-home heuristic to cover more countries and reorganize logic
to prioritize trip-based location detection over individual travel data.
Key changes:
1. Add Balkan countries (GR, AL, XK, HR, etc.) to European heuristic
2. Add major international countries (US, CA, IN, JP, etc.) to heuristic
3. Change condition from >1 day to >=1 day for faster return detection
4. Move trip heuristic check before individual flight/accommodation lookup
This fixes cases where stopovers or connections (like Kosovo→Albania on
July 1) were overriding the trip-based "return home" logic. Now correctly
detects return home from all types of trips including Balkan and
international destinations.
All weekend location tests now pass - ensures locations show "Bristol"
when free (no events) or show trip locations when traveling.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Adjust European short trip heuristic from >3 days to >1 day to correctly
detect when user has returned home from European trips. This fixes the
April 29-30, 2023 case where the location incorrectly showed "Sankt Georg, Hamburg"
instead of "Bristol" when the user was free (no events scheduled) after
the foss-north trip ended on April 27.
The previous logic required more than 3 days to pass before assuming
return home from European countries, but for short European trips by
rail/ferry, users typically return within 1-2 days.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
When traveling to nearby European countries by rail or ferry,
return journeys often aren't recorded in flight/accommodation
data. Added logic to assume you've returned home after short
European trips that ended >3 days ago.
Covers common rail/ferry destinations: Belgium, Netherlands,
France, Germany, Switzerland, Austria, Italy, Spain.
Example: Feb 2-5 trip to Brussels (by rail), Feb 18 now
correctly shows "Bristol" instead of "Brussels".
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>