No description
  • JavaScript 96.9%
  • CSS 2.9%
  • HTML 0.2%
Find a file
malice d82c15a969
Fix wiki/wikidata URL builders (Bugs 1-3 from 2026-05-24 handoff) (#28)
The backend (navi-places wiki_rewrite) already turns each OSM wiki tag into a
complete URL in extratags.{wikipedia,wikidata,wikivoyage} -- a local Kiwix URL
(https://wiki.echo6.co/content/...) when the article is mirrored, otherwise the
public URL -- and records which in sources.wiki_rewrites[tag] = local|public.
PlaceCard and PlaceDetail ignored those rewritten values and rebuilt/linked from
the wrong fields, causing all three bugs. Verified against the live
/api/place/R/121355 (Twin Falls) response before and after.

- Bug 1 (Wikipedia "(local)" href was public): the link used the public
  wiki-index field wiki_url with a hardcoded "(local)" badge, while the actual
  local URL sat unused in extratags.wikipedia. Now links to extratags.wikipedia
  and shows "(local)" only when sources.wiki_rewrites.wikipedia === "local".
- Bug 2 (Wikivoyage "(local)" href was public): same hardcoded badge on the
  public wikivoyage_url. Now prefers the rewritten extratags.wikivoyage (local
  when mirrored) and badges from sources.wiki_rewrites.wikivoyage; falls back to
  the public wikivoyage_url with no "(local)" badge (Twin Falls has no mirror).
- Bug 3 (Wikidata URL doubled): the link prepended https://www.wikidata.org/wiki/
  onto extratags.wikidata, which is already that full URL -> .../wiki/https://...
  Now uses the value directly (only builds the URL for a bare Q-id).

New frontend/src/utils/wiki.js centralizes the builders (wikipediaLink,
wikivoyageLink, wikidataHref); both components import them, and the duplicated
public-URL builder (wikiUrl) is removed from each. No backend changes. Frontend
build clean; navi-places tests still 13 passed.

Co-authored-by: Matt <mj@k7zvx.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 00:04:57 -06:00
backend MVUM Layer 3c: surface-change transition candidates (#27) 2026-05-25 23:52:08 -06:00
frontend Fix wiki/wikidata URL builders (Bugs 1-3 from 2026-05-24 handoff) (#28) 2026-05-26 00:04:57 -06:00