Gospel x Internet shares a tree family by its id alone

A family click wrote ?tree=<id> AND its whole language list (hundreds of
codes for a big family), a link that breaks in chat apps and SMS. The
board's writer now runs after the kit's and removes 'language' while a tree
node is active; ?tree= alone restores the node and its languages.
This commit is contained in:
Doxa Maps 2026-09-27 19:37:09 +00:00
parent cc5563d9f9
commit c65e1a5f9c
12 changed files with 39 additions and 25 deletions

View file

@ -157,6 +157,14 @@ ok(w.includes('access=bridge') && w.includes('view=zero') && w.includes('utm_sou
const mine = M.buildQuery({ view: 'zero', filterSet: { band: 'yes' }, keep: '?band=yes,partial', filters: false })
ok(mine.includes('band=yes%2Cpartial') && mine.includes('view=zero'), 'the board\'s own writer leaves the filter params to the kit (filters:false)')
// 13. a tree node is shared by its id alone: the board's writer drops the kit's long language list
{
const kitUrl = SV.serializeQuery({ language: ['abf', 'ayh', 'bwi'], band: 'yes' }, '', '', { facetKeys: M.SHARE_FACETS })
const q = new URLSearchParams(kitUrl); q.delete('language')
const final = M.buildQuery({ view: 'board', filterSet: {}, keep: '?' + q.toString(), tree: 'araw1281', filters: false })
ok(final.includes('tree=araw1281') && final.includes('band=yes') && !final.includes('language=') && !POISON, `a tree-family link is ?tree=<id> without its language list (${final})`)
}
// 11. translation readiness: current against its snapshot, every roster language present, the no-NT set is
// the tree's, the 31 codes Glottolog lacks read as UNKNOWN (null) not "none", and the signal count is a
// recount of the five named facts (no hidden weighting)

View file

@ -188,14 +188,20 @@ export function useBoard() {
})
function syncUrl() {
if (!writeUrl.value || typeof history === 'undefined') return
const qs = M.buildQuery({ view: view.value, filterSet: bus.filterSet, group: openSlug.value, keep: location.search,
let keep = location.search
// A tree node is shared as ?tree=<glottocode> ALONE: its language list (hundreds of codes for a big
// family) made links that break in chat apps and SMS, the field's channel (dx-shepherd GOFAM). The
// kit writes `language` from the bus; this writer runs after it (flush:'post') and removes it while a
// node is active. On load, ?tree= restores the node, which re-applies its languages itself.
if (treeNode.value) { const q = new URLSearchParams(keep); q.delete('language'); keep = q.toString() ? '?' + q.toString() : '' }
const qs = M.buildQuery({ view: view.value, filterSet: bus.filterSet, group: openSlug.value, keep,
panel: centre.value, tree: treeNode.value, filters: false })
const next = location.pathname + (qs ? '?' + qs : '') + location.hash
if (next !== location.pathname + location.search + location.hash) {
try { history.replaceState(history.state, '', next) } catch (_) { /* sandboxed */ }
}
}
watch([view, openSlug, centre, treeNode, () => JSON.stringify(bus.filterSet)], syncUrl)
watch([view, openSlug, centre, treeNode, () => JSON.stringify(bus.filterSet)], syncUrl, { flush: 'post' })
/** A link to one group, for "Copy link to this group" — the board's own page, ?group=<slug>. */
function groupLink(slug) {

View file

@ -604,7 +604,7 @@
"bundle": "gospel-internet",
"scriptUrl": "./gospel-internet/gospel-internet.js",
"output": "dx-maps/gospel-internet/gospel-internet.js",
"integrity": "sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k",
"integrity": "sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq",
"elements": [
"gospel-internet-board"
],
@ -623,7 +623,7 @@
"scriptUrl": "./gospel-internet/gospel-internet.js",
"embed": {
"iframe": "<iframe src=\"./gospel-internet/board/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-internet/gospel-internet.js\" integrity=\"sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k\" crossorigin=\"anonymous\"></script>\n<gospel-internet-board profile-config='{\"profile\":\"board\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-internet-board>"
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-internet/gospel-internet.js\" integrity=\"sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq\" crossorigin=\"anonymous\"></script>\n<gospel-internet-board profile-config='{\"profile\":\"board\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-internet-board>"
},
"instances": [
{

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <gospel-internet-board> custom element. -->
<script src="../../gospel-internet.js" integrity="sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k" crossorigin="anonymous"></script>
<script src="../../gospel-internet.js" integrity="sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <gospel-internet-board> custom element. -->
<script src="../gospel-internet.js" integrity="sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k" crossorigin="anonymous"></script>
<script src="../gospel-internet.js" integrity="sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <gospel-internet-board> custom element. -->
<script src="../../gospel-internet.js" integrity="sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k" crossorigin="anonymous"></script>
<script src="../../gospel-internet.js" integrity="sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <gospel-internet-board> custom element. -->
<script src="../../gospel-internet.js" integrity="sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k" crossorigin="anonymous"></script>
<script src="../../gospel-internet.js" integrity="sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <gospel-internet-board> custom element. -->
<script src="../../gospel-internet.js" integrity="sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k" crossorigin="anonymous"></script>
<script src="../../gospel-internet.js" integrity="sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <gospel-internet-board> custom element. -->
<script src="../../gospel-internet.js" integrity="sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k" crossorigin="anonymous"></script>
<script src="../../gospel-internet.js" integrity="sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

View file

@ -36,7 +36,7 @@
<script>window.MAP_APP_API_URL = "https://pray.doxa.life";</script>
<!-- Bundle IIFE — registers the <gospel-internet-board> custom element. -->
<script src="../../gospel-internet.js" integrity="sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k" crossorigin="anonymous"></script>
<script src="../../gospel-internet.js" integrity="sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq" crossorigin="anonymous"></script>
<script>
// Mapbox token resolution — the A3 ladder, in precedence order:

File diff suppressed because one or more lines are too long

View file

@ -604,7 +604,7 @@
"bundle": "gospel-internet",
"scriptUrl": "./gospel-internet/gospel-internet.js",
"output": "dx-maps/gospel-internet/gospel-internet.js",
"integrity": "sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k",
"integrity": "sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq",
"elements": [
"gospel-internet-board"
],
@ -623,7 +623,7 @@
"scriptUrl": "./gospel-internet/gospel-internet.js",
"embed": {
"iframe": "<iframe src=\"./gospel-internet/board/index.html?utm_source=YOUR_SOURCE\" width=\"100%\" height=\"600\" style=\"border:none;border-radius:12px;\" allowfullscreen></iframe>",
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-internet/gospel-internet.js\" integrity=\"sha384-9AhqFrKhm8/E9hsPsxto/Mw5287rXAz0I/vgSbX/2RUCYbHqgqzD+neD+LFidB1k\" crossorigin=\"anonymous\"></script>\n<gospel-internet-board profile-config='{\"profile\":\"board\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-internet-board>"
"script": "<!-- Mapbox engine, fetched early. Keep it only with a real Mapbox token in \"tk\": without one (or with \"provider\":\"maplibre\") the map draws with MapLibre and this line must go -->\n<link rel=\"preload\" as=\"script\" href=\"https://api.mapbox.com/mapbox-gl-js/v3.24.0/mapbox-gl.js\" integrity=\"sha384-tO0clamXONKwbiz7O6xJpUeyJbTSPugC+xM9clvfFvKTH3i8SmCawHGdf5quMWmZ\" crossorigin=\"anonymous\">\n<script>window.MAP_APP_API_URL=\"https://pray.doxa.life\";</script>\n<script src=\"./gospel-internet/gospel-internet.js\" integrity=\"sha384-th2sZnrDx7v5H5H8crqkHCojRVQMUoYqVwfZTCdhScQcxGv5PTffI3MQ9H0kfpQq\" crossorigin=\"anonymous\"></script>\n<gospel-internet-board profile-config='{\"profile\":\"board\",\"tk\":\"YOUR_MAPBOX_TOKEN\",\"utmSource\":\"YOUR_SOURCE\",\"assetsBase\":\"YOUR_TREE_URL/assets\"}'></gospel-internet-board>"
},
"instances": [
{