Skip to content

Merge the maps screen into the places map, and fix station search - #8

Merged
ialakey merged 4 commits into
masterfrom
feat/places-merge-and-station-search
Sep 6, 2026
Merged

Merge the maps screen into the places map, and fix station search#8
ialakey merged 4 commits into
masterfrom
feat/places-merge-and-station-search

Conversation

@ialakey

@ialakey ialakey commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Two bugs found in the 2.0.0+13 build, and the release tooling that produced it.

One map instead of two screens

"Карты" and "Места" answered the same question. The first was a dropdown of
four Google My Maps links in a WebView; the second is the OpenStreetMap
catalogue. Everything the old screen pointed at is now on the new map:

Old entry Where it went
Russian venues (My Maps, 314 points) Already there — it is the same stats.srb.guide catalogue, and the bundled copy is fresher (362 points)
Non-smoking venues (150 points) Bundled as pins: 145 venues, 94 with smoking banned outright and 51 where only smokeless devices are allowed
Exchange offices Never a dataset, only a live Google Maps search for "Мењачница" — now a button in the map's toolbar
Black list of apartments Dropped: its My Map returns Google 403, so the link was already dead in the shipped app

tool/sync_smoking.dart reads the KML export of the Lokali bez dima map into
assets/data/smoking.json, and the weekly sync workflow keeps it current as a
fourth dataset. Filter chips cover the smoking policy next to the business
categories; a venue on both lists is matched by name and proximity so it gets
one pin rather than two. webview_flutter goes with the deleted screen —
nothing else used it.

Train stations are searchable in Russian

Typing "Белград" returned an alphabetical dump of the whole network, which read
as the search being broken. The lookup at w3.srbvoz.rs only understands Latin:
its own front end strips everything else out of the term, so a Cyrillic query
arrives empty — and an empty term is answered with all 396 stations.

The list is now fetched once (15 KB), cached for a week and matched on device:
Cyrillic is transliterated, diacritics are folded, each word gets one character
of slack for the spelling differences (Белград/Beograd, Крагуевац/Kragujevac),
and matching runs inside the name, so centar finds BEOGRAD CENTAR — which the
server itself could not do. A network failure is now reported as a failure
rather than as "nothing found", and there is no longer a request per keystroke.

Release tooling

tool/build_release.ps1 mirrors release.yml, so a local build and a tagged CI
build produce the same artifact under the same checks. It refuses to spend a
build on a missing key.properties, a key that is not SHA256withRSA, or a
versionCode Play has already seen, then verifies the APK signature scheme,
the bundle signature and the merged targetSdk before copying both artifacts
into dist/ with their sums. docs/RELEASE.md walks through a release, and
docs/CHANGELOG.md records what changed since versionCode 12.

Verification

  • flutter analyze clean; 81 tests pass, including 21 new ones for catalogue
    merging and station matching, and a live check that Белград resolves to
    BEOGRAD CENTAR against the real timetable
  • Signed release built at 2.0.0+14 and verified: APK Signature Scheme v2,
    SHA-256 certificate, not the debug key, targetSdk 36
  • Checked on an Android 16 emulator: 498 pins on the merged map, the
    non-smoking filter, and centar matching three stations

The last release was cut by hand in January 2024 and nothing recorded how.
This adds the missing half of the pipeline:

- tool/build_release.ps1 mirrors release.yml, so a local build and a tagged
  CI build produce the same artifact under the same checks. It refuses to
  spend a build on a missing key.properties, a key that is not SHA256withRSA,
  or a versionCode Play has already seen, then verifies the APK signature
  scheme, the bundle signature and the merged targetSdk before copying both
  artifacts into dist/ with their sums.
- tool/create_upload_key.ps1 and tool/show_upload_key.ps1 for the key itself.
- versionName and versionCode now come from `version:` in pubspec.yaml, which
  build.gradle.kts already reads, so there is one place to bump.
- docs/RELEASE.md walks through a release end to end.
"Карты" and "Места" were two answers to the same question. The former was a
dropdown of four Google My Maps links opened in a WebView; the latter is the
OpenStreetMap catalogue of relocant-run businesses. Everything the old screen
pointed at now lives on the new map:

- Russian venues needed no work: that map is the stats.srb.guide catalogue
  the places screen already shows, and the bundled copy is fresher (362 vs
  314 points).
- Non-smoking venues are bundled as pins. tool/sync_smoking.dart reads the
  KML export of the "Lokali bez dima" map into assets/data/smoking.json —
  145 venues, 94 where smoking is banned outright and 51 where only smokeless
  devices are allowed — and the weekly sync workflow keeps it current.
- Exchange offices were never a dataset, only a live Google Maps search for
  "Мењачница"; it is now a button in the map's toolbar.
- The "black list of apartments" link is dropped. Its My Map has been
  answering Google 403 for a while, so it was already dead in the shipped app.

Filter chips cover the smoking policy next to the business categories, and a
venue on both lists is matched by name and proximity so it gets one pin rather
than two. Deleting the screen also drops webview_flutter, which nothing else
used.
Typing a station in Russian answered with an alphabetical dump of the whole
network: "Белград" returned Kemendin st, Altina st, DOLJEVAC and so on, which
read as the search having stopped working.

The lookup at w3.srbvoz.rs only understands Latin. Its own front end strips
everything else out of the term before sending it, so a Cyrillic query arrives
empty — and an empty term is answered with all 396 stations. The old code
showed that response as the result.

So the app now asks for that list once, the way the site itself does, caches it
for a week and matches locally:

- Cyrillic is transliterated and diacritics are folded, so "Ниш", "niš" and
  "nis" are one station;
- each word is allowed one character of slack, because the two languages spell
  the same place differently (Белград/Beograd, Крагуевац/Kragujevac);
- matching runs inside the name rather than as a prefix, so "centar" finds
  BEOGRAD CENTAR — which the server itself could not do.

Also stops answering a network failure with "nothing found": the picker now
says the lookup failed. The list is 396 rows and 15 KB, so this removes a
request per keystroke as well.
docs/CHANGELOG.md records what a user of 1.0.0 (versionCode 12, January 2024)
will notice, and docs/play/ holds the "What's new" texts ready to paste into
the Play Console, both under the 500-character limit.

README follows the code: one map instead of two screens, the station lookup
matching on device, and the fourth dataset in the weekly sync.
@ialakey
ialakey merged commit 2a8b494 into master Sep 6, 2026
1 check passed
@ialakey
ialakey deleted the feat/places-merge-and-station-search branch September 6, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant