Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const DATA_SOURCES = [ | ||
| "kaohsiung_parking_lots_2025-12-25_schema_placephoto_fallback.json", | ||
| "kaohsiung_parking_lots_2025-12-25_curated.json", |
There was a problem hiding this comment.
Point fallback loader to a file that exists
The fallback source kaohsiung_parking_lots_2025-12-25_curated.json is referenced here, but this repo only contains the CSV and the schema JSON (there is no curated JSON file at all). That means any time the primary JSON fails to load (e.g., renamed/moved file or a transient fetch error), the fallback will deterministically 404 and the page will show “資料載入失敗” instead of recovering. Consider either adding the curated JSON file or pointing the fallback at a file that actually exists.
Useful? React with 👍 / 👎.
Motivation
Description
index.html,assets/styles.css, andassets/app.jsimplementing the UI and logic per requirements.loadData(),normalizeItem(),getThumbnailUrl(),applyFilters(), andrenderList()and normalization to handle both schema and curated JSON formats.kaohsiung_parking_lots_2025-12-25_schema_placephoto_fallback.jsonfirst and falls back tokaohsiung_parking_lots_2025-12-25_curated.json, and the footer includes download links for CSV/JSON.google.maps_urlor a generated search URL; thumbnail selection follows the specified rules (usethumbnail.place_photo.url, else usephoto_referenceorphoto_resource_nametemplates leavingYOUR_API_KEY, elsethumbnail.street_view.url, else a gray “No Image” placeholder).Testing
python -m http.serverand loadedhttp://127.0.0.1:8000/index.htmlvia Playwright, which successfully rendered the page and produced a screenshot artifact.Codex Task