Commit graph

735 commits

Author SHA1 Message Date
76360c25f3 Refactor add-new-conference into agenda module 2026-03-20 10:36:08 +00:00
2cc25cd203 add-new-conference script 2026-03-19 10:52:41 +00:00
1fff1f136d Show day of week in conference date column
Add %a prefix: "Wed 25 Mar 2026", "Wed 25–28 Mar 2026", etc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 12:00:18 +00:00
1dfef38128 Merge conference sections into a single table so columns align
Replace three separate <table> elements with one shared table. The
conf_table macro becomes conf_rows which emits only <tr> elements;
Current/Future/Past section boundaries are dark header rows inside
the same <tbody>. With one colgroup the browser uses one shared
column-width calculation so all headings line up.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:22:43 +00:00
e36a326739 Fix Gantt tooltip for single-day events
Show "Geomob Edinburgh (6 May)" instead of "Geomob Edinburgh (6 May–6 May)".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:18:23 +00:00
57054bb1bd Remove auto-scroll on Gantt bar hover
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:07:02 +00:00
bca0cd2727 Minor cleanup in update.py
- Move datetime import to module level
- Replace assert on load_cached_launches with or {} fallback so the
  updater doesn't crash when the cache file is absent
- Condense upcoming-trips list comprehension to one line

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:05:32 +00:00
10716f9874 Add bidirectional hover highlight between Gantt chart and table
Each Gantt bar and table row gets a data-conf-key attribute
(ISO start date + conference name). A small JS lookup map connects
them so hovering either element highlights both simultaneously:
- Gantt bar: filter brightness + inset white box-shadow
- Table row: yellow tint via background-color

Hovering a Gantt bar also scrolls the matching table row into view
(scrollIntoView nearest) so future conferences are reachable without
manual scrolling. The key field is pre-computed in
build_conference_timeline() to keep the template simple.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 11:02:55 +00:00
ef517c98ff Replace CSS grid with Bootstrap table on conference list page
- Proper <table> with colgroup widths, table-sm table-hover align-middle
- Month-divider rows (MARCH 2026, APRIL 2026, …) break up long lists
- Date ranges collapsed to a single column (e.g. "25–28 Mar 2026")
- Row highlight (conf-going) for conferences marked going=true
- Topic and date columns styled text-muted small to reduce visual noise
- Trip links replaced with 🧳 emoji: shows just the emoji when the trip
  title matches the conference name (the common case), otherwise appends
  the trip title (e.g. "🧳 Budapest" for FOSDEM); full title always in
  tooltip

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 10:56:44 +00:00
20f1e31119 Add Gantt-style timeline to conference list page
Shows the next 90 days as a horizontal bar chart above the conference
list. A greedy interval-colouring algorithm assigns each conference to a
lane so overlapping conferences appear in separate rows. Lane colour
cycles through a fixed palette so simultaneous events are easy to tell
apart. Month boundary markers and a red today-line provide orientation.
All position maths happens in build_conference_timeline() in Python;
the Jinja template is pure rendering.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 10:47:46 +00:00
feaefba03c Limit weather API calls to cron only, increase cache TTL to 24h
Web view was calling the OpenWeatherMap API directly on every request
(home + all trip locations), causing >1000 calls/day. Now web_view.py
uses cache_only=True everywhere so it never triggers live API calls —
update.py (cron) is the sole API caller. Also warms home location cache
in update_weather(), and increases TTL from 6h to 24h.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-14 09:27:56 +00:00
04cb3e8179 Add 2-hour TTL cache check to SpaceDevs launch updater
Prevents hitting the SpaceDevs rate limit by skipping the API call
when the launches cache is still fresh (< 2 hours old), matching the
same TTL pattern already used for the active crewed flights cache.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 13:28:10 +00:00
d9b08f3e5b Handle date-only transport times in trip page template 2026-03-07 13:25:56 +00:00
2a69904ef1 Update busy datetime parsing test for UTC-normalized output 2026-03-07 13:11:57 +00:00
0c88ad4638 Validate weekends year range and fix trip page unbooked-flight helper call 2026-03-07 13:10:33 +00:00
f9b79d5a51 Fix trip map unbooked flight pins and timezone-safe busy date comparisons 2026-03-07 12:58:38 +00:00
f38c5327ea Fix YAML validation outside Flask app context 2026-03-06 22:46:40 +00:00
574b4feb1f trip: redesign itinerary display and add trip list macro
- 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>
2026-03-03 09:15:51 +00:00
b3975dad3a trip: include transit airport cities in destination timezone list
Transit countries (e.g. Madrid on the Peru trip) were already included
in trip.countries via flight data, but get_destination_timezones only
iterated trip.locations() which comes from accommodation/conferences/events.
Now also extract airport cities from flights and append any that aren't
already covered by a stay, using the airport coordinates for timezone lookup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-02 15:31:24 +00:00
5e2fb72fef trip: use flight_destinations rules for unbooked routes 2026-03-02 13:16:32 +00:00
11ab5f6d28 trip: improve unbooked flight routing and airport pins 2026-03-02 13:09:06 +00:00
f0698acd59 Base trip timezone differences on trip dates and remove live local-time column 2026-02-26 15:31:13 +00:00
f2752383f2 Render UK time difference server-side and simplify trip timezone JS 2026-02-26 15:26:25 +00:00
701023db59 Adjust wording 2026-02-26 15:21:11 +00:00
d7e469a0ed Avoid stale timezonefinder cache when dependency is installed later 2026-02-26 15:19:09 +00:00
38cf270307 Improve coordinate timezone resolution with timezonefinder fallbacks 2026-02-26 15:15:37 +00:00
1ee1f38a99 Use coordinate-based timezone lookup for trip destinations 2026-02-26 14:57:20 +00:00
ec413ac310 Add destination time difference and live local times on trip pages
Closes #208
2026-02-26 14:50:54 +00:00
016039e78f Show current-year school holidays and add Bristol source link
Closes #209

Closes #210
2026-02-26 14:42:40 +00:00
1397805450 Validate bus journey data.
Closes #207
2026-02-24 20:51:01 +00:00
9f881d7177 Fix SpaceDevs rate-limiting and cache corruption from throttled responses
Don't write rate-limit/error responses to disk in next_launch_api_data,
so they can't become the "most recent" cache file and cause KeyError crashes
in read_cached_launches. Add defensive results-list checks in
read_cached_launches and get_launches to handle any existing bad files.

Drop refresh=True from the updater's get_active_crewed_flights call so the
2-hour TTL applies; the paginated spacecraft/flight crawl was running on
every hourly cron job and likely causing the burst that triggered throttling.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 20:50:05 +00:00
b4f0a5bf5d Add OpenWeatherMap weather forecasts. Closes #48
Show 8-day Bristol home weather on the index and weekends pages.
Show destination weather per day on the trip list and trip page.
Cache forecasts in ~/lib/data/weather/ and refresh via update.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 20:27:25 +00:00
61e17d9c96 Track dates of English school holidays
Fixes #168
2026-02-21 18:05:19 +00:00
7a50ea6016 Improve launch status UI and alert on SpaceDevs payload errors 2026-02-21 16:39:47 +00:00
458dfc5136 Refresh active crewed mission cache in updater
Closes #175
2026-02-21 16:08:45 +00:00
a275683f90 Keep active crewed missions on launches page 2026-02-21 16:00:52 +00:00
7cced919a2 Show full conference dates alongside partial attendance dates.
When attend_start or attend_end is set, display the full conference
date range in parentheses after the attended dates, e.g.
"Wed 6 Mar to Sun 10 Mar (full conference: Sun 3 Mar to Sun 10 Mar)".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 18:23:33 +00:00
49e5a3000e Add attend_start/attend_end fields for partial conference attendance.
Allows recording when you arrive late or leave early at a multi-day
conference. Both fields accept a plain date or datetime with time.
Trip pages display the attendance dates instead of the official
conference dates when these fields are set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 18:14:27 +00:00
2edfb40e66 Avoid crash when flight.co2_kg is not set. 2026-02-18 17:09:18 +00:00
84dfafefa1 Avoid crash when flight.co2_kg is not set. 2026-02-18 17:07:40 +00:00
53f4252b92 Refactor bus/coach loading and rendering to share code.
Extract `load_road_transport()` as a shared helper for bus and coach,
combining the near-identical route rendering blocks in `get_trip_routes`
and `Trip.elements()` into single `in ("coach", "bus")` branches.
Document transport type patterns in AGENTS.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 12:52:28 +00:00
c87320415f Show bus stops and coach stations on trip map.
Add case "bus" to get_locations() and bus route handling to
get_trip_routes() in trip.py. Coach stations now populate a dedicated
"coach_station" dict instead of the train station list. Add
"coach_station" (🚌) and "bus_stop" (🚏) emoji types to map.js.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 12:13:42 +00:00
363967b739 Fix bus stop parsing. 2026-02-18 09:47:08 +00:00
24f4c49429 Fix bus parsing. 2026-02-18 09:46:01 +00:00
3a786c4b04 Add bus journeys. 2026-02-18 09:43:02 +00:00
960b4a1fc7 Add bus journeys. 2026-02-18 09:39:51 +00:00
bc2c884589 Show flash messages on event list. 2026-02-17 11:34:40 +00:00
b835956ea9 Show bootstrap alert after login. 2026-02-17 11:30:03 +00:00
e0b9e4e719 Switch from UniAuth to OpenID Connect 2026-02-17 11:25:55 +00:00
1f026c31ca UniAuth 2026-02-17 11:10:46 +00:00