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>
When a trip ended in the UK but had foreign accommodations during
the trip, location tracking would incorrectly show the foreign
location even after returning home.
Added logic to detect when the most recent travel occurred within
a completed trip that ended in the UK, and override foreign
accommodations to show "Bristol" (home) for dates after the trip.
Example: Trip Sep 8-17 with accommodation in Kochi, India on Sep 10,
but trip ended at Gatwick Airport, UK. Oct 7 now correctly shows
"Bristol" instead of "Kochi".
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
When multiple flights arrived on the same date, location tracking
only compared dates and missed later flights. Now compares both
date and time to handle same-day connecting flights correctly.
Example: Nov 21, 2023
- 06:15: Arrive Madrid (MVD → MAD)
- 09:15: Arrive London (MAD → LHR) ← Now properly detected as most recent
This ensures users show as "home" when they've returned to UK on
the same day as an international connection.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Weekend page now shows specific location (city and country) for each
Saturday and Sunday based on travel history:
- Analyzes flight arrivals and accommodation check-ins to determine exact location
- Shows "home" when at Bristol, UK
- Shows "City, 🏴 Country" format when traveling
- Handles multi-location trips by finding most recent travel within trip period
- Optimized to parse YAML files once instead of per-date lookup
Closes#191🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Replace technical YAML diff output with human-readable bullet points that clearly explain what changed. Added structured email format with mission details, rocket emoji, and formatted dates.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Implements bug #194 by adding CO2 emission display by transport type:
- Add co2_by_transport_type() method to Trip class
- Display CO2 breakdown on trip list page and individual trip items
- Display CO2 breakdown on individual trip detail pages
- Show both total CO2 and breakdown by transport type (flight/train/ferry)
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Show the number of new countries visited each year in parentheses next to the total country count.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move trip-related pages (Future trips, Past trips, Trip statistics) to a "Trips" dropdown
- Move conference-related pages (Conferences, Past conferences) to a "Conferences" dropdown
- Position both dropdowns between Calendar and Travel in the navbar
- Maintain active state highlighting for dropdown items and parent dropdowns
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Change label from "Flight CO₂" to "Total CO₂" for accuracy
- Add CO₂ breakdown by transport type (flight/train/ferry)
- Show values in kg for <1000kg, tonnes for ≥1000kg
- Track CO₂ emissions by transport type in stats calculation
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add CO2 calculation for train legs using 0.037 kg CO2e per passenger per km
- Add CO2 calculation for ferry journeys using 0.02254 kg CO2e per passenger per km
- Both calculations use standard emission factors from UK government sources (DEFRA/DECC)
- CO2 values are automatically included in trip totals via existing total_co2_kg() method
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Use arrival date instead of departure date when entering Schengen countries
to correctly handle overnight flights that cross date boundaries.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add trip_date and trip_name fields to SchengenStay dataclass
- Implement extract_schengen_stays_with_trip_info() to associate stays with trips
- Update schengen_report.html to show trip names with clickable links
- Add Trip column to stays table and trip name column to compliance history
- Links navigate to individual trip pages using existing URL structure
Closes#197🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Show count of conferences in each section (Current/Future/Past)
- Include proper pluralization (1 conference vs N conferences)
- Use Jinja2 template logic for count calculation and display
Fixes#195