You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 872330a
Browse filesBrowse the repository at this point in the historyBrowse files
Places 018 (US3): search monuments & airports by country
Browse and the global search now match monuments and airports BY
COUNTRY, not only by their own name: typing a country name in the
Monuments/Airports browse surfaces that country's sites/airports, and
the top-bar search prepends the named country plus its monuments and
airports ahead of like-named places.
- browseList: monuments & airports paths union in the country's places
when the query resolves to a country (deduped).
- search: country-intent branch surfaces the country + its heritage &
airports when the query is a clear country-name prefix.
- Unit: search-by-country (airports in the sync gazetteer; heritage via
the browseList mock) + city queries left unaffected.
- E2E: Monuments/Airports + a country query narrows to that country.
Closes T007, T018, T019, T020.
Copy file name to clipboardExpand all lines: specs/018-places-explore/tasks.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ and the constitution requires automated coverage of core logic.
18
18
-[x] T004 [P] Add a status-axis helper in `src/lib/store/useFilters.ts` (or a small `placesStatus.ts`) mapping the single UI status value (`all|visited|wishlist|favorites|notVisited`) ↔ the existing `status`/`favoritesOnly` fields per research D3; unit-cover the mapping.
19
19
-[ ] T005 Extend `placeMatches` in `src/features/filter/applyFilters.ts` to honor `filter.category` when the place is a monument (heritage); no-op for other kinds; keep existing `mode`/status/minPop behavior.
20
20
-[x] T006 Implement `browseList(kind, filter, ref, visits, query)` in `src/features/visits/browseList.ts`: source reference rows for the kind (`ref.allCities()/allHeritage()/allAirports()/countries`), overlay status/favorite via `visitIndex(visits)`, apply status axis + `minPop`/`category`/`continent` + `query`, order per `sort`; for cities rank by population and return a bounded/paged working set (reuse `features/map/viewport.ts` ranking) — never all 135k.
21
-
-[] T007 [P] Extend search to match monuments & airports by country in `src/features/visits/search.ts` (and heritage/airport search paths): a query also matches `countryIso2` + country name for those kinds, alongside name/IATA/city.
21
+
-[x] T007 [P] Extend search to match monuments & airports by country in `src/features/visits/search.ts` (and heritage/airport search paths): a query also matches `countryIso2` + country name for those kinds, alongside name/IATA/city.
22
22
23
23
**Checkpoint**: shared filter, browse builder, predicates, and search-by-country exist and are unit-tested — every story below builds on these.
24
24
@@ -52,9 +52,9 @@ and the constitution requires automated coverage of core logic.
52
52
53
53
**Independent test**: search a country → its monuments & airports appear; search a monument name / airport code resolves; offline.
54
54
55
-
-[] T018 [US3] Wire the Places search box to filter `browseList` by `query` for the active kind, and confirm the global top-bar search (`search.ts`) surfaces monuments/airports by country, in `PlacesScreen.tsx`.
56
-
-[] T019 [P][US3] Unit `tests/unit/search.spec.ts` additions: monuments & airports match by country name + ISO2; cities unaffected.
57
-
-[] T020 [US3] E2E in `places-explore.spec.ts`: Monuments kind + country query → only that country's monuments; Airports kind + country query → that country's airports.
55
+
-[x] T018 [US3] Wire the Places search box to filter `browseList` by `query` for the active kind, and confirm the global top-bar search (`search.ts`) surfaces monuments/airports by country, in `PlacesScreen.tsx`.
56
+
-[x] T019 [P][US3] Unit `tests/unit/search.spec.ts` additions: monuments & airports match by country name + ISO2; cities unaffected.
57
+
-[x] T020 [US3] E2E in `places-explore.spec.ts`: Monuments kind + country query → only that country's monuments; Airports kind + country query → that country's airports.
58
58
59
59
## Phase 6: User Story 4 — Monument category tags + filter (P4)
0 commit comments