HydraIssues

hydratam: rebuild the atlas on three.js, touch first, with multiple datasets and the XR Valley ecosystem map
closed feature Project: experiencenet Parent: #619 Reporter: 17 Oct 2026 02:28

Description

Rebuild the hydratam atlas from the ground up on three.js. The current /atlas is a hand built SVG map. It works, but it is not beautiful, it is mouse first, and it can show only one dataset: the European target markets.

What changes

1. A three.js renderer. One scene engine draws both a region polygon dataset and a point dataset. three.js is vendored as a real file under web/vendor/, not loaded from a CDN. A public page must not depend on a third party at runtime.

2. Multiple datasets, as a first class control. The atlas gets a dataset concept. Dataset one is the existing European markets. Dataset two is XR Valley, the Belgian XR ecosystem. Dataset files are real JSON files under data/datasets/, read through internal/content like every other content file.

3. Touch first. One finger pans, two fingers pinch to zoom, a tap selects. No interaction depends on hover. Hit targets are sized for a thumb. The phone is the primary case and the desktop is the adapted one.

4. Every entry is clickable and opens a detail view. For an XR Valley organization that is its profile. For a market city it is the city and its market.

5. A 'Not on the map?' call to action. A visitor gives a company name, a city and an email address. hydratam records the submission so the team can send the full form. No street address is asked for and none is stored.

The XR Valley dataset

Source: the XR Valley 2025 ecosystem survey, 69 responses. The public extract holds 65 organizations across 10 Belgian provinces.

The extract is privacy filtered on purpose, because the atlas is public:

  • Two responses that did not accept the privacy policy are dropped whole.
  • Contact name, contact email, phone number, the uploaded logo (a private Drive object) and the free text remarks are removed. One remark held a contact request, which is exactly why free text does not travel.
  • Per organization revenue, growth expectation, share of sales from XR and share of sales abroad are published as ecosystem aggregates only, never against a named organization.
  • Location is the province of the offices, plotted on the provincial capital. The survey never asked for a street address and none is held.
  • Duplicate submissions from the same organization are merged.

An automated leak guard runs over the generated file and fails if any dropped value, any email address or any Drive link appears in it.

Why this is one issue

The dataset abstraction, the renderer and the call to action are the same change. A second dataset is the reason to rebuild the renderer, and the call to action only makes sense once a visitor can see they are missing from a map.

Not in scope

  • No change to the market, persona or opportunity API. Those keep working unchanged.
  • No change to the hydradistrict coverage layer or the dealroom signal layer beyond rendering them in the new engine. Both stay optional and both stay aggregate only.

Related

Parent #619 (the atlas itself), #751 (the public and gated split), #603 (the target market research).

Note found on the way: the v0.1.16 release run failed. The OCI image job succeeded, so the image is in the scale registry, but 'Publish to release server' failed with curl exit 22 on the first binary upload. Live still answers v0.1.15 because a scale never self updates. This needs its own issue.

Sub-issues (2)

closed #818 hydratam atlas: the page renders blank on a Samsung QMB, because inset:0 is newer than its engine
closed #815 hydratam atlas: one mark per province, and three defects the fan out was hiding

Comments (4)

api 17 Oct 2026 03:15

Built and committed on main, tagged v0.2.0.

Commits

  • 316c812 datasets, the XR Valley dataset, the public form, the Belgium geometry, docs
  • f75be3d the three.js atlas
  • ce7974d runbook presentation section

The dataset. 69 responses in, 65 organizations out, across 10 provinces. Dropped: 2 responses that did not accept the privacy policy, every contact name, email address, phone number, uploaded Drive logo and free text remark. Revenue, growth and sales ratios are ecosystem aggregates only. hydratam dataset build runs the filter and then reads its own output back against the survey, refusing to write the file if any dropped value, any email address or any Drive link reached it. The survey export is NOT in the repository.

Design decisions worth recording. The map is flat and equal area. Tilt and extruded height were both considered and refused: this map answers where and how many, perspective shrinks the far marks so Wallonia would read as weaker than it is, and the only per place number is a count on a provincial capital, so a tall prism would claim a precision the survey does not have. Marks are instanced quads rather than gl_PointSize, whose driver cap would force a second code path that rots. Labels are DOM rather than an SDF atlas, so the three real fonts survive at any pixel ratio with any glyph. Picking is point in polygon on the CPU, which is exact at this size and avoids a GPU readback stall.

Bugs found while building, each of which rendered something wrong with no error

  • /api/v1/markets omits cities unless full=true. Without it the map drew regions and no candidate city at all.
  • /api/v1/tiers answers an array, not a map keyed by tier. Every tier name rendered as [object Object].
  • The dataset was framed while the app was still hidden. A hidden element measures zero, so the camera got a one by one viewport and the map landed off centre.
  • A class that sets display beats the browser's own [hidden] rule, so a hidden button still drew as an empty box.

Verified in a real browser at 1600 wide and at a real 390x844 phone viewport, on both datasets: map draws, pan and pinch, tap a place to zoom, tap an organization to open its detail, shareable detail URLs, dataset switch, filters, dark mode, the form end to end including the server's street address refusal landing inline on the City field, and zero email addresses in any public response.

Carried over but untested: sign in and the dealroom signal overlay from 80c6e0a. Auth has never been configured in production, so those routes do not exist there and the control stays hidden. Every step of that path fails quietly.

Next: v0.2.0 release run, then hydraskin update hydratam --tag v0.2.0 --apply on pi-node-001, then read the version back from health. Production is still v0.1.15, see #814.

api 17 Oct 2026 03:49

LIVE in production: v0.2.6. https://hydratam.experiencenet.com/atlas

Deployed by rebuilding the scale on pi-node-001: hydraskin update hydratam --tag v0.2.6 --apply, v0.1.15 -> v0.2.6 in 12s. The state checksum over /srv/scales/hydratam is byte identical before and after (22 files, 1f31a3c466db60ba...), so the container rebuild lost nothing.

Verified against production, not against a local server:

  • /api/v1/health answers v0.2.6, status: ok, and lists the dataset.
  • Both datasets serve: markets-europe (35 regions, 50 candidate cities) and xrvalley-2025 (65 organizations, 11 places, 67 responses). No orphan entries, no place without a NUTS code.
  • The page renders in a real browser with WebGL, the map paints, labels place, the legend explains both hues.
  • Compression is live over the wire. An XR Valley first visit is 240 KB instead of 1,123 KB:
/atlas                            124226 ->  35000
/atlas/vendor/three.module.js     687458 -> 170751
/atlas/geometry/nuts2-belgium     71424  ->  18055
/api/v1/datasets/xrvalley-2025    241674 ->  16351
  • The form: all three refusals give a message a visitor can act on and store nothing; the honeypot answers the same 200 a person gets and stores nothing; the happy path stores (count 0 -> 1); an unauthenticated read is 401. The deployment test record was then removed, so the count is back to 0 and the lead list starts clean. submissions.yaml is mode 0600, as intended.
  • Zero email addresses on every public endpoint, including with a submission stored.

Tags: v0.2.0, v0.2.1 and v0.2.6 all have complete releases. v0.2.2 through v0.2.5 were cut and then withdrawn before any artifact existed, rather than left as tags that look released and are not, which is the trap in #814.

Still open, honestly: sign in and the dealroom signal overlay are carried over from 80c6e0a and remain untested, because auth has never been configured in production and those routes do not exist there. The control stays hidden and every step of that path fails quietly. Worth its own issue when somebody turns auth on.

Closing: the work is live and verified.

api 17 Oct 2026 04:05

v0.2.7 is live, superseding v0.2.6 the same day.

Production itself exposed a bug the local server had hidden. The map was framed against the sheet's measured height, and that height is animated. Locally the dataset arrived instantly, so the framing happened while the sheet was still near its old height and the map filled the screen. In production the data took longer, the transition had already finished, and the same map came out half the size. Nothing errored; it read as a styling problem. The sheet now reports where it is going rather than where it is, so the framing is identical every time.

Two things found while fixing it:

  • Mark sizes were chosen for a desktop map a thousand pixels wide. On a 390px phone the Brussels bubble was a tenth of the map and covered its neighbours. Marks now scale with the viewport, with a floor, because below about 0.66 a mark is too small for a thumb and a map you cannot tap is worse than a crowded one. The hit test and the label offsets use the same scale, so what you can tap matches what you can see.
  • Framing padding is tighter on a phone, where the visible band is about 380px tall.

Deployed by the same path. The state checksum over /srv/scales/hydratam is still byte identical after both rebuilds (22 files, 1f31a3c466db60ba...), and production answers v0.2.7, status: ok, gzip on, zero email addresses on every public endpoint.

The phone render now matches the local one exactly, which is the point: the framing no longer depends on how fast the data arrived.

api 17 Oct 2026 09:06

v0.2.8 live. Owner reported the Bruges cluster looked off on the live map. It was, and it was a data defect rather than a rendering one.

The survey asks for a province and nothing finer. The build was filling each entry's city with the provincial capital, so all eight West Flanders organizations carried city: "Bruges". The list read "Bruges · SME" and the detail said Bruges. Howest, Rhinox, The Reef, SALTVISION and the rest had said "West Flanders" and nothing more, so the map was asserting a fact it did not hold, and for most of them it was wrong.

The legend note excused the DOT's position. It did not excuse the RECORD claiming a city, and a caption cannot fix a record. So the record changed:

  • Entry has no City, and the type carries a comment saying why it must not grow one back.
  • The capital moved to Place.AnchorCity, named for what it is: where the map draws a province, because a province has to be drawn somewhere.
  • The bubble is labelled with the province. "West Flanders 8", not "Bruges 8".
  • List rows name the province. A detail opens "We know the province, not the town" and then explains the anchor.

Guarded from both sides, by key rather than by value, because "Hasselt University" is a real organization name and a keyword search calls that a leak: TestAnEntryKnowsItsProvinceAndNoTown over a synthetic fixture, TestNoEntryClaimsATownItNeverGave over the committed datasets.

Caught while testing: province names are longer than capitals, so "Flemish Brabant" immediately collided with Brussels and dropped off the map with no sign it had. The label placer now tries below the mark as well as above, and all ten populated provinces label again.

Verified on production: v0.2.8, all eight West Flanders entries read "West Flanders", zero entries carry a city/town/address key, zero places still call the anchor "city", and all 11 places carry anchorCity.