Commit graph

2,140 commits

Author SHA1 Message Date
Admin
6fad9915c1 Fix bridge dz steps grade and surface-way clearance feedback
Steps shed height within the staircase (0.6 grade) instead of ramping
30m into the street grid. Surface ways under a deck clear from ground
level instead of reading back their own inherited ramp lift, which
pumped decks up every constraint round. Adds Duivendrecht probe tests.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 00:10:52 +02:00
Admin
ff4e3183c1 Add apps/route AI trip planner M0 skeleton to workspace
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 00:10:52 +02:00
Admin
6390434897 Vendor i_overlay polygon boolean crates into libs/
Inhouse i_overlay 7.0.3 and its i_float/i_shape/i_key_sort/i_tree deps
(used by the map road union mesh under the widgets 'maps' feature) as
workspace-excluded path crates, stripped of tests/locks/registry crud.
i_float's no_std libm dependency is removed by switching it to std
float math, so the maps feature no longer pulls any external crates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 00:10:52 +02:00
Admin
831e276daa Optimize map road geometry and mode transitions 2026-07-31 00:10:52 +02:00
Kevin Boos
8fa33c86fc fix(linux): don't abort on machines with no usable audio device (#1154)
* fix(linux): survive machines with no usable audio device

Makepad aborted inside libpulse on any machine without a working sound
server: get_updated_descs passed the null pa_operation returned by a
context that is not READY straight to pa_operation_get_state, which is
an assert in libpulse ("Assertion 'o' failed at pulse/operation.c:136").
Headless boxes and containers died on startup. Nearby paths were no
better - a sound server that advertises a sink it cannot open hung the
UI thread for good, and a device that failed to open was re-opened on
every device change, forever.

PulseAudio:
 - never hand a null pa_operation to libpulse, and give up on a context
   that is not ready instead of calling into it
 - PulseAudioAccess::new returns None rather than panicking, so a
   machine without a server simply runs on ALSA
 - PA_CONTEXT_NOAUTOSPAWN: without it pa_context_connect forks and execs
   a sound daemon synchronously, before the mainloop exists, blocking
   the UI thread for as long as the spawn takes (measured 7s) and
   leaving a daemon running on a machine that deliberately had none
 - every wait is bounded by a mainloop timer, so a server that never
   answers cannot freeze the app
 - the context state callback no longer takes the access mutex, which
   the UI thread holds while waiting on the mainloop (a deadlock)
 - null info pointers, eol < 0 and absent default sink/source names are
   handled instead of dereferenced
 - streams still being created cannot be disconnected, so they are
   parked and disconnected once the server answers rather than left
   attached to the microphone for the life of the process
 - callbacks no longer panic across the FFI boundary, and a stream the
   server tears down is reaped and reported instead of going silent

ALSA:
 - track input and output failures apart: both directions of one pcm
   share a device id, so a card with no microphone disabled playback
 - publish a device before opening it, not after. Opening takes ~200ms
   and the check that decides to spawn reads that same list, so two
   device changes inside the window - the normal startup - spawned a
   second thread whose EBUSY marked a device that was playing fine as
   failed
 - a stream that dies mid-playback is reported, so the app can move to
   another device instead of silently losing audio

Both backends:
 - a device that failed to open is not retried on every device change.
   It is retried when the device list changes, or when the app asks for
   a different set than last time, so an explicit request - a user
   picking a device, a widget toggling its microphone - is still
   honoured
 - AudioDevicesEvent::default_output falls back to another working
   device instead of handing back one already known to have failed,
   which is what made apps ask for it again on every event.
   default_input deliberately does not: the next input in the list is
   typically a monitor source, and silently recording the machine's
   own output instead of a microphone would be a privacy breach

* fix(linux): enumerate and prefer the generic ALSA "default" pcm

Device enumeration called snd_device_name_hint once per card. Passing a
card number only returns that card's raw pcms, so the generic ones -
"default", "pipewire", "pulse" - were invisible to makepad, and it then
picked the first plughw: node as its default device. Raw nodes demand
exclusive access to the card, so makepad's chosen device failed with
EBUSY whenever anything else was playing, which on a desktop running
PipeWire is most of the time.

Ask for the whole system instead (card -1), which is what every other
alsa client does and what "aplay -L" prints. It returns the generic pcms
as well as every card's own, so nothing is lost. "default" is now
preferred when picking the default device, for both directions; the old
plughw:/dmix: chain remains for a system with no alsa configuration.

"null" is skipped: it accepts and discards audio and always opens, so
offering it would let the automatic fallback land on a device that looks
like working audio and is silent.

Also frees the hint array, which was leaked on every enumeration.

Measured with the raw card held by another process: before, makepad's
first pick failed; now it opens "default" and audio flows immediately.
2026-07-30 21:25:38 +02:00
Admin
304b68d6ad Unify road mesh rendering and elevation seams
Remove the legacy flat-road fallback and A/B harness, keep patterned non-road strokes on their dedicated path, and make solid roads use the geometry/boolean mesh pipeline unconditionally. Reconcile bridge, link, and padded-tile elevation continuations generically in the tile baker and renderer.
2026-07-30 10:42:24 +02:00
Admin
a37db4228c Fix unified road elevation and antialiasing 2026-07-30 10:42:24 +02:00
Admin
273fa1c89b Fix 3D road elevation and join continuity 2026-07-30 10:42:24 +02:00
Admin
cc8ee97b3d Reconcile road deck seams before grade fitting 2026-07-30 10:42:24 +02:00
Admin
ad58d9a8bb Fix 3D road joins and tile seam continuity 2026-07-30 10:42:24 +02:00
Admin
65e63c23ec bake: dual-carriageway lateral consensus + annotate hardening — stepped twins and floating slabs die
The persistent artifacts were four distinct data bugs, found via the
dump_base_dz_at forensic test:
- Dual carriageways: two parallel ways whose ribbons merge in 2D but
  solved to different heights -> a height step down the merged surface.
  New solver pass: each way vertex adopts the max height of PARALLEL
  ways within its own half-width (parallel_max sampler, own line
  excluded); duals equalize, frontage streets are out of reach.
- Stacked grabs: a way split sitting under a parallel deck sampled the
  deck overhead (no direction/distance gate can reject 2D-coincident
  stacked ways). Isolated lifted runs under 25 m arc are zeroed —
  measured in arc, not vertices, so short 2-vertex bridge ways survive
  (zeroing those broke the Gooiseweg viaduct: fixed).
- The final coincident-vertex consensus TELEPORTED heights through
  chance-coincident vertices of stacked ways; it now only reconciles
  values already within 1 m (its actual job: unifying overlap copies).
- Post-consensus values had no ramps behind them (consensus ran after
  blending): grade blend + hold re-runs after it, plus interior zero-run
  interpolation (<120 m) for sampling holes; endpoint fallback keeps a
  relaxed direction gate instead of none.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
a7b4a9795f bake: hold junction height ~12 m into joining ways — slip roads attach flush
Junction consensus raised a merging way's endpoint to deck height but the
8%/m grade decay started immediately, dropping ~2 m across the visible
gore: every slip road attached below its deck with a ledge along the
merge. The grade blend now holds the junction height for the first 12 m
of the path before decaying, so merges are level through the gore and
descend after.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
92eaef5233 bake: gore-twin second chance kills doubled slabs; remove debug memory watchdog
Split ways duplicate a carriageway with an OFFSET centerline through
gores — the twin failed the direction/median gates and baked a lower
fallback height: two overlapping deck slabs at slightly different
heights, swapping mid-deck (the persistent 'road break'). Rejected
all-zero line paths now resample the field ungated with a tight cap
(2.5u, median <= 2u, 60% hit rate) — a gore twin sits within a lane of
the accepted profile and inherits it; frontage streets stay rejected.
Also: seam_probe forensic test (casing-buffer vertex dump + cross-tile
band compare) that located this; memory watchdog removed at user
request (runaway fixed and verified earlier).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
42f8387f9d bake: global annotation pass + coincident-vertex consensus; renderer: no cap extension at clip cuts
Annotation now runs ONCE over every base tile in global coordinates —
junction consensus and a final exact consensus over coincident vertices
(largest |dz|) unify the overlap clip copies adjacent tiles both render.
DzField terminal cap extension skips endpoints on the tile clip bounds:
holding a cut height flat while the neighbor tile interpolates the ramp
mismatched the overlap band. Reduces (not yet eliminates) the doubled
slab at tile seams on ramping decks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
1cee8d2e43 bake: ONE global solve for the whole bbox — tile-seam steps and doubled slabs die
Per-tile solves (even with 1-ring context) reached slightly different
heights for the same way on each side of a z14 seam; both tiles then
rendered their clipped copy of the deck in the overlap band at different
heights — visible steps and doubled slabs mid-deck. solve_tile is now
solve_bbox: one graph over every decoded tile (integer-grid node dedup
chains fragments across seams), one AHN pass, one constraint solve, one
global field pair; bridge_dz features bin per source tile and the
annotator samples the global field with per-tile offsets. Bonus: the
Amsterdam bake drops from ~2 min to 21 s (graph built once, not 193x).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
50d0b20357 map: unified surface mesh, flush tier joints, boundary consensus, walls everywhere
- One continuous surface face per group ((surface − grounded cover) ∪
  lifted): no more overlapping level twins micro-diverging at grazing
  tilt (the lens endcaps). Tunnels stay a separate early-painted face.
- Tier-transition joints (bridge/approach style splits from the layer
  rank bias) become FLUSH butt joints — but only at collinear
  continuations; forks and T-junctions keep round caps. No cap discs, no
  wall quads across a joint (suppressed within half_width of the joint).
- Walls/fascia unconditional again (~1.4 m band, clamped at ground): the
  field-probe seam filters false-positived on every low deck through the
  field's edge fade and stripped the thickness the whole look lives on.
- Baker: cross-tile boundary consensus on base_dz — every tile solves
  with 1-ring context, so the same way baked slightly different heights
  across a tile seam (visible mid-deck steps at z14 edges); boundary
  vertices now unify to the largest-|dz| across tiles (153 paths).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
0e0743fba4 map: tunnels — sunk level with negative dz, solver mirror, open underpass fascia
- Baker: tunnel sink solve (downward mirror of the lift solve): 5.5 m
  clearance at every 2D crossing with a surface way, 30 m hold, grade
  ramps, portals pinned to the surface at shared nodes. Tunnel ways get
  their own SolvedField (never mixed with the surface field) and the
  annotator runs a negative sampling pass for paths with no deck lift;
  base_dz now carries signed dm values (195 tiles, +2 tunnel-only).
- Renderer: third level in the cascade — sunk parts with their own cover,
  painting before ALL surface content; sunk faces displace down through
  the existing signed-lift shader path. Tunnels with baked negative dz
  join the union as solid sunk roads in 3D bakes (tunnel tag stripped for
  styling); flat bakes keep carto dashes. Tunnel ways stay out of the
  stroke/arrow corridors so surface streets above a tunnel line cannot
  inherit the sink.
- Deck walls become fascia bands (~1.4 m below the deck edge, clamped at
  ground): underpasses are OPEN — you can see through them.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
d4a3f22a54 map: deck side walls — lifted faces get vertical skirts from deck to ground
Every lifted level part emits wall quads along its boundary rings: top
vertex rides the deck dz field (v=0), bottom stays grounded (v=1), same
x/y — flat mode degenerates them to nothing, tilt reveals the wall.
Darkened face color, drawn one zbias step under the face at a quarter
ladder step below. Decks read as volumes, ramp-displacement crescents are
closed, and underpasses look like underpasses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
241e5d2e2b map: geometric vertex-alpha AA fringes, strict grounded cover, boot-view + cam readout
- AA fringe coverage now rides per-vertex premultiplied color (inner =
  face color, outer = transparent) with full shader coverage: the ramp
  interpolates across the whole skirt at any magnification, where the
  fwidth-normalized shader ramp pinned to one device pixel and left
  magnified tilt-foreground stairs visible. Skirt sits half a ladder step
  above its face so the up-screen half wins its depth tie.
- Straddling (partially lifted) rings stay visible in both level parts
  but no longer join the grounded cover: a ramp segment spanning the
  threshold was cutting the road underneath along its whole length —
  the under-the-overpass hole at the benchmark interchange.
- /tmp/mp_start_cam boots the app at a saved viewport; the map draws its
  own '@cam lon lat zoom rot tilt' readout bottom-right so any screenshot
  is reproducible.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
7f3f568933 map: opacity-aware AA fringes, single-level translucent rings; macos: skip foreign windows in scroll path
- Opaque faces get boundary-straddling AA skirts (coverage 50% at the
  edge, legacy convention); translucent faces ramp outward only and their
  straddling rings pick one level part — premultiplied translucent color
  must never paint over itself (double-blend darkened plaza boundaries).
- macos event loop: a foreign window class in the scroll-wheel path (the
  screen-capture overlay's TUINSWindow) has no macos_window_ptr ivar —
  skip instead of panicking. This was the random studio death whenever a
  system screenshot overlay was active.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
2a30f55305 map: kill tiler runaway (chunked dissolve), i_overlay 7, AA fringe v1, forensics harness
Runaway root cause, captured via self-sampling memory watchdog + boolean
input dumps: simplify_shape on 17-20k-ring soups (dense tiers at high
overzoom) spins in contour extraction for minutes while allocating
unboundedly (both i_overlay 4 and 7). Chunked dissolve (3000-ring chunks,
union of clean outlines) turns the captured hangs into 91/140 ms; the
full pan/tilt torture that blasted to 100 GB now holds 5-6 GB flat.

- i_overlay 4.5 -> 7.0.3 (API-compatible, booleans ~1.7x faster).
- Boolean input hygiene: 1/64-unit snap + degenerate ring drop.
- DzField: guard degenerate terminal-segment cap extension, clamp grid
  walks (a NaN/huge coord can no longer explode cell insertion).
- AA fringe v1: miter skirts along boolean output rings, u 0.5->0 over
  1px, emitted after each face at its ladder slot.
- Level-straddling rings join both grounded+lifted parts (transition
  seams overlap instead of sharing an epsilon-fragile edge).
- Oneway arrows foreshorten with tilt (ground-plane glyphs).
- Debug: in-app memory watchdog (14 GB: sample own stacks -> abort),
  MP_TILE_PROFILE via /tmp/mp_tile_profile, boolean repro test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
82566e94b0 map: 3D bake LOD — adaptive tree canopies, no roof AA fringe, wall ring LOD
Dense tiles carried 30-70 MB of fill buffer: thousands of park trees at
16x8 ball tessellation for ~14 px canopies, an AA fringe doubling roof
verts across every building (a lifted roof edge meets its own wall, not
the background), and sub-pixel footprint edges as wall quads. Screen-
adaptive canopy segments + aa=0 roofs + 1.2px wall edge collapse:
67.8 -> 26.0 MB worst measured tile. Also: DzField cap extension so
lifted way ends hold deck height through their round caps.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
4043031b1a map: level-split disjoint cascade, dissolve-first booleans, memory caps, perf harness
- Two-cover cascade: grounded content subtracts grounded cover, lifted
  subtracts lifted — a deck cuts its own casing (no more cap outlines
  bleeding through on bridges) but never the road running underneath;
  ramp feet still cut streets. Group parts dissolve to clean outlines
  (simplify_shape) before any cross-group op.
- Depth ladder by slot (per face, per stroke rank) instead of per event:
  coarser, safer separation between coplanar overlaps.
- DzField sampling gated by active-area bbox per face; corridor bbox
  prefilter for interleaved strokes.
- Byte-budget tile cache eviction (1.2 GB) + pending-upload queue cap
  (384 MB): 3D building bakes run 30-70 MB of fill buffer per tile and a
  count-capped cache alone reached tens of GB.
- MP_TILE_PROFILE stage clock + headless union_perf_probe test with the
  live theme mirrored (probe_compiled_theme): rz17 tile build 1.4s -> 0.9-1.0s.
- Revert baker lateral clearance: the constraint cascaded through solver
  rounds and lifted the whole network; needs a bounded formulation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
103ec8f5d3 map: rank-interleaved paint ladder, per-tier dz fields, lifted decks keep under-roads
- Union faces and legacy strokes merge into one rank-ordered paint sequence
  (plazas, casings, centers) — cycle lanes and park paths draw above the
  surfaces they ride, higher tiers still cover both; flat = buffer order,
  tilt = same order via the param5 ladder.
- Joint coverage: bevel wedges at gentle bends, discs at corners/ends;
  union ways get the same chaikin smoothing as legacy strokes (dz-aware).
- Per-tier DzField (nearest-way-wins, grounded ways at 0) + crack-free
  midpoint face subdivision replace the narrow runtime corridors: decks
  lift edge-to-edge, casings stay attached, no tents or shards.
- Lifted rings no longer subtract from lower groups: roads continue
  underneath decks (paint order hides them flat, real depth when tilted).
- Lift-aware tilt depth: deck depth margin scales with lift so water and
  ground at the display position can't depth-win over a bridge.
- Baker: tapered lateral clearance for elevated ways running beside
  lower-layer roads (ribbon widths overlap without centerline crossings);
  connected ways exempt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
fff629bb3f map: bridge dz solver+AHN bake, base_dz transcode, road overlay unifier
Bridge elevation (bridge.md M1+M2): tools/map_tiles bridge-bake solves
per-vertex road/rail dz over the OSM graph (crossing clearance, grade
ramps, deck holds, junction consensus) with AHN DSM-DTM measured deck
profiles (BigTIFF reader in geodata, WGS84->RD), baked as bridge_dz +
per-base-tile base_dz (L/F/P join to exact renderer geometry). Renderer
joins dz through parse into TileWay.dz; strokes/arrows/fills lift off
their own profiles; tunnels never deck.

Road overlay unifier: painter's algorithm as geometry — per-way segment
rects + vertex discs, i_overlay top-down subtraction cascade into
DISJOINT faces (overlay_paint_groups), triangulated once; flat render is
pixel-equal to paint order (proven 0-diff on the abstract unit case) and
tilt cannot reorder it. Legacy strokes interleave by rank; plazas join
the cascade at true alpha. @roads 0/1 A/B toggle, @abtest headless
CPU-raster diff harness (1.50% vs 2D reference on the Raampoort tile),
@cam debug camera, bridge_eval.sh aerial-vs-render loop.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Admin
85515cea35 map: 3D terrain displacement, Europe-wide DEM, landcover drape, wind layer
Terrain gets real z in tilt mode: a displaced 288x216 surface mesh plus
per-vertex ground lift for all tile geometry (roads/fills/buildings/icons)
via vertex-stage sample_lod of a terrarium-packed elevation texture, with
labels riding the same ground through a lift-aware camera delta. Depth
domains rescale per frame to stay inside the -24 budget; road passes get
a relief-scaled clearance over the surface so cities keep correct
street-vs-building order. Regional zooms (<z14) drape landcover colors
into the hillshade (full-res MVT rasterization, treeline fade) instead of
lifting km-scale polygons that cannot follow relief.

Terrain build now covers EV-trip Europe (lat 43..58, lon -5..17, 8.8 GB
GLO-30 z6-12) with sign-safe Copernicus stems, transparent no-data, and
an Alpine rock/snow ramp. Terrain requests render 4096x3072 over ~3
viewports and only re-render on real movement.

Also: NOMADS GFS wind particle layer synced to the weather clock with 3D
altitude, rain cloud deck lift, stuck-tile fixes (expiring missing set,
decode-failure backoff, restyle placeholder purge), 78-degree tilt
ceiling, and park fill z-fight fix via widened micro-depth ranks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-30 10:42:24 +02:00
Kevin Boos
1b558cefd9 Linux: derive window app id from the binary name, or app override (#1151)
Every window hardcoded `create_app_id = "Makepad"`. GNOME Shell matches Wayland
toplevels to their `.desktop` file by app id, so packaged apps looked for
`Makepad.desktop`, missed, and lost their icon. X11 was unaffected, having always
used argv[0] for WM_CLASS.

* Default `create_app_id` to the argv[0] basename via `window::default_app_id()`.
* Add a `window.app_id` DSL field to override it, for rDNS packaging like Flatpak.
* Route X11's WM_CLASS through `create_app_id` too, replacing its own inline copy
  of the argv[0] chain, so both identities come from one field.
2026-07-30 08:51:06 +02:00
Kevin Boos
1de784dd0e PortalList: allow setting layout flow at runtime; AdaptiveView fixes (#1144)
* PortalList: add `set_flow(cx, flow)` to switch a list between vertical and
  horizontal layout flow at runtime. Much faster than using `script_apply_eval`,
  and always fully correct because it updates the `vec_index` axis.
  It also avoids a full ScriptReapply sequence, which is potentially expensive
  across all of an app's widgets.
* AdaptiveView: add `active_variant()` getter so that widgets using AdaptiveView   do not have to separately track which variant it should be in.   Removes all ambiguity and possibility of divergence... finally!
  * Also fixes long-standing TODO item in AdaptiveView about properly handling
    weird window geom events, e.g., on macOS sometimes it spits out a 0-width
    window update which is total b.s.
* DisplayContext: add `is_desktop_width()` helper.
* Window: ignore spurious zero-size window geom events.
2026-07-28 19:31:42 +02:00
Jason Yau
ccd1adbaf6 Fix Windows WASAPI open failures and infinite retry spam (#1148)
Co-authored-by: jasonqiu <jasonqiuchen@outlook.com>
2026-07-28 18:46:52 +02:00
Admin
c0aeb25b0a map: rain radar overlay, flying 3D markers, Europe routing, geodata crate
- rain radar layer: pure-Rust KNMI HDF5 reader (superblock v0 walk,
  single-chunk deflate datasets, byte-exact vs h5py), ellipsoidal polar
  stereographic reprojection (20 m vs product corners), bilinear value
  sampling -> smooth banded isolines, textured quad overlay through the
  overlay camera, 25-frame nowcast animation; RadarSync polls at most
  once per 4 min through a disk-persisted gate and caches frames on disk
- makepad-geodata + makepad-tesla crates join the workspace (overlay
  builders, radar sync, NL open-data layers; transit routes now z7-14)
- Europe major-roads routing graph: nav-build --major-roads does a
  ways-first scan (5.7M ways / 46M nodes / 194 s / 971 MB) and the app
  falls back to it when a route leaves the regional graph — Amsterdam to
  Paris routes offline (501.8 km)
- 3D flying markers: chargers/POIs/stops ride thin stalks with DYNAMIC
  height (each pin clears its own building +8 m); labels, kW text,
  brand and tap zones all consume the baked per-marker lift; stalks and
  buildings grow together on the 2D->3D transition (per-tile flat->3D
  fade heights, no replay on zoom regens)
- markers depth-honest (small bias, buildings occlude them); phong-lit
  canopy/light spheres matching the buildings' NW sun; buildings tint by
  BAG age in 3D; district area tints (rank 60, alpha .32); transit line
  labels + stop names; follow-mode is an explicit attach/detach toggle;
  rotation release schedules the label re-place (no stuck upside-down
  labels after a fast spin)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 18:00:27 +02:00
Admin
16a5f507bb map: transit lines/labels, districts, 3D signals+trees, label flip invariant
- transit routes draw as per-line colored strokes (stable ref-hash
  palette) on white casings, labeled "Tram 7"/"Metro 52"; stops get
  name labels (stations z13+, local z15+)
- districts layer: tiered admin boundaries (gemeente/wijk/buurt) and
  centroid name labels staged by zoom, muted admin purple
- upside-down labels fixed structurally: post-placement invariant
  re-places any glyph run that reads net-leftward (hairpin ramps fooled
  every pre-placement chord heuristic); vertical dead band ±4°
- overlay charger pins hold collision priority over base charging_station
  icons, which are suppressed while a charger overlay is active; pins
  reserve their bubble box so POI text places beside them
- per-icon zoom floors: overlay pins use kW tier floors (8/10/12) —
  micro floor 16.5 no longer hides them; 0.6 zoom grace; fail-open when
  the icon_zoom uniform is unset; oneway arrows from z15
- rail z-fighting: stroke merge drops duplicate quantized segments from
  forked ways (switches drew shared segments twice, shimmering in tilt)
- 3D mode: stoplights (pole + red/amber/green lights) and taller
  ellipsoid trees; live_reload names its override files

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 16:57:07 +02:00
Admin
1b0decc6c9 map: charger pin redesign, upright/billboard labels, 3D trees, exits
- Tesla-style droplet pins anchored at the tail tip (rotate around the
  exact site point in tilted views); red exclusively Tesla, amber DC,
  blue AC; Tesla pins show stall count, others peak kW
- in-pin text through the normal text renderer: billboard-anchored
  glyphs (anchor scales with the map, glyph size constant), exempt from
  label collision/repeat culling, no halo
- upright camera-delta labels: straightened labels (place names, POIs,
  brands, pin text) translate with the rotation gesture but stay
  horizontal — no more rotate-then-snap on regen
- per-icon zoom floors baked in vertex param4 + live icon_zoom uniform:
  stale deeper-bucket tiles never flash markers on zoom-out (param4 is
  lift-height only for non-icon shapes — icons stay on the ground)
- motorway exit labels (street_labels_points): carto-red name + ref
- 2D/3D mode: tilt gesture syncs app state (TiltChanged action), tilt
  release near-flat settles to exact 0, mode flip re-bakes tiles
  (extrusions appear/disappear without a zoom nudge)
- Simple 3D Buildings: building:part volumes with min_height bases;
  outlines containing parts flatten to footprints; famous buildings
  with tourism=attraction extrude instead of dying as attraction fills
- little 3D trees in tilt mode: crossed trunk quads + sphere-slice
  ball canopy (architecture-model proportions)
- searchdb/mbtiles support work: reach-based distance ranking, direct
  tile lookup + writer ordering

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 16:02:44 +02:00
Admin
dabbd0bbc6 llama: image-span prefill + M-RoPE — full VLM pipeline matches llama.cpp exactly
LlamaSession gains append_image_embeddings: precomputed vision embeddings
prefill through a second Embeddings-input graph spec sharing the same
cache tensors (SessionGraphParams grows an embeddings_input discriminant).
HybridDecodeBatchLayout gains an optional pre-expanded rope_positions
override, threaded to encode_rope_positions — cache indices and attention
masks stay linear while image tokens get qwen-vl 2D positions
[pos0, pos0+y, pos0+x, 0] and the span advances rope position by
max(w, h). Text after an image continues from the shifted position; pure
text paths are byte-identical to before (verified via llama-generate).

vlm-probe runs the whole thing: ppm -> vision tower -> chatml with
vision_start/end -> greedy. Output is token-for-token identical to
llama-mtmd-cli --temp 0 on both test images (radar scene description and
'A red circle.'). 229-token mixed prefill 0.98s, generation 27.9 tok/s
on the 9B UD-Q4_K_XL.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 14:31:44 +02:00
Admin
56153ce02a llama: qwen3.5 vision tower on makepad-ggml — oracle parity achieved
New vision module: mmproj GGUF load (reuses the arch-agnostic loader),
exact-port preprocessing (calc_size_preserved_ratio, f64 bilinear resize to
match the reference binary's double promotion, block-major patch unfold),
and the 27-block ViT graph: patchify as two matmuls vs the flattened conv
weights, interpolated learned pos-embd (gpu bilinear+antialias, gathered to
block order), 2D vision rope, full bidirectional flash attention (f16 k/v,
f32 prec), layernorm composed as norm-mul-add, and the qwen3vl_merger
2-layer MLP into the LLM's 4096-dim space.

vlm-vision-probe validates against clip.cpp dumps: preproc bit-exact on
aligned images (1e-7), embeddings rms 3e-4..9e-4 / cosine 0.99999+ on all
three test images — inside the oracle's own flash-vs-composed spread
(rms 8.9e-4). 64-token encode 38ms, 192-token 103ms after graph compile.

Also fixes a stale DeltaNetRecurrentBlockSpec test initializer that broke
cargo test compilation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 14:23:26 +02:00
Admin
1b1d908d2a map: exact camera-delta matrix — labels land where the regen lands
The snap: tilt does not commute with rotation. The placement maps world
points rotate-then-y-compress, so the true delta between the cached
camera (r0,t0) and now (r1,t1) is S(t1)*R(d)*S(1/t0) — a general 2x2
matrix, not the rotate+scale previously approximated. The shader takes
the full matrix; the pan shift pre-inverts through it so pans during
rotation land correctly. Between-frame tracking now converges on the
exact re-place result — no more rotate-snap in 2.5D.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 14:13:58 +02:00
Admin
f8273f52d1 map: GPU camera-delta for labels; brand text draws over the pins
- DrawRotatedText gains cam_cs/cam_sn/cam_tilt/cam_pivot uniforms: while
  the camera rotates or tilts between re-places, ALL placed glyphs spin
  and squash about the view pivot on the GPU — whole-quad transform, so
  orientation follows position for free; the CPU per-frame rotated copy
  is gone and the async re-place trues up with identity uniforms
- label plans carry a post-icon flag: in-pin digits' phase now also
  hosts the charger brand text, which was drawn before the symbol pass
  and hid BEHIND its own pin

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 14:10:03 +02:00
Admin
3bfc58c9f6 vlm: clip.cpp oracle tool — dump qwen3.5 mmproj preproc + embeddings for parity testing
Links the local llama.cpp April build (libmtmd exports clip_* internals);
generates deterministic PPM test images; dumps preprocessed f32 tensor and
projected [n_tokens x 4096] embeddings. Reference stats recorded: radar
512x384 -> 192 tokens, cpu-vs-metal spread ~2e-4 abs on embd values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 14:07:18 +02:00
Admin
43ce32da7d map: tappable charger pins with info card; stale POI carpet hidden
- every baked charger pin records its normalized position + known
  attributes (name, operator, city, max_kw, evses, connectors) as a
  PinHit in the tile; taps hit-test a billboard rect through the same
  overlay camera markers use (rotation/tilt correct), emitting
  MapViewAction::PinTapped ahead of the generic tap
- examples/map: bottom-left info card — operator title, "250 kW max",
  bays/connectors, site name, city; hides on plain map tap. (The
  search-engine enrichment of this card is deferred by request)
- zooming out from icon level no longer splatters the stale POI carpet:
  a tile baked at z16+ hides its symbol pass below icon zoom while
  low-bucket pins keep drawing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 14:05:10 +02:00
Admin
b497800d73 map: cached labels track the camera every frame — rotate first, regen after
Spinning in 2.5D detached labels from the map: the cached-plan reuse
was capped at 15 degrees and required equal tilt, so most rotation
frames drew stale untransformed placements until the next re-place.
Now ANY rotation/tilt delta (at equal zoom) redraws the cached glyphs
rigidly rotated about the pivot and y-compressed by the tilt ratio —
labels follow the camera best-effort and the async 120ms full re-place
trues them up, exactly the stale-tile philosophy of the dash shader.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:59:40 +02:00
Admin
c6c24cfbff map: charger pins are one icon composite — badge, bolt, kW digits
Rethink after the pin felt shaky: the kW text went through the label
placement machinery (map-space offsets, per-bucket relayout, rotation
rigid-redraw) while the badge was a zoom-constant billboard — parts
drifted, doubled and jumped. Now the whole pin is ONE composite in the
icon pass at a single anchor: tier-colored badge, white bolt with its
in-pin offset baked into the mesh, and the kW number as seven-segment
vector digit meshes composed at fixed screen-px offsets. Everything
billboards together; the label system is out of the loop (brand text
below the pin remains a normal label).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:54:21 +02:00
Admin
0fe26153b0 map: markers never clip the tilted ground, pin text stays upright rotating
- POI/pin symbols get tilt depth 90 (was 0.04): a marker is UI-like and
  must win against the ground plane and buildings under 3D — the pin
  was slicing into the map surface. Oneway arrows stay ground-hugging
- during rotation gestures the cached-label rigid-rotate now exempts
  pin-class glyph ranges: their billboard pins stay screen-aligned, so
  spinning the kW text with the map read as doubled, garbled digits

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:49:26 +02:00
Admin
87959594a5 converse: conversational pipeline crate (speech + filter + llm), gamemaker on it
New makepad-converse crate: SpeechOutput/Playback moved out of gamemaker
(mix_into for custom audio callbacks, install_audio_output convenience);
TranscriptFilter trait + PassthroughFilter + FilterWorker thread (filters
built on the worker via factory since LlamaSession is not Send);
ConversePipeline wiring filter -> makepad_ai agent backend -> speech with a
ConverseAction stream, llm leg pluggable (claude-code / acp /
openai-compatible base_url for local servers). QwenFilter behind the
local-llm feature: chatml prompt, non-thinking prefill, greedy, SEND:/SKIP:
line protocol, fail-open parse; filter-repl bin for interactive testing.
Gamemaker's speech leg now uses the crate; its agent plumbing stays local.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:47:13 +02:00
Admin
478b711ce5 voice: pure-rust silero v5 vad + learned speech gate in window voice input
Ports the silero v5 16k branch to pure rust (minimal onnx-protobuf weight
extraction, hardcoded graph: stft-conv, 4x conv+relu, lstm cell, sigmoid
head), 512-sample chunks with 64-sample carried context. Validated against
onnxruntime to 2.3e-6 max diff (fixtures committed), ~425us/chunk release.
Model loads from repo-root silero_vad.onnx or MAKEPAD_VAD_MODEL. vad-test
bin for wav files. window_voice_input now gates packets on vad probability
(0.5 enter / 0.35 exit) and falls back to the rms gate when the model file
is missing — the log line says which gate is active.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:47:05 +02:00
Admin
4c8247cd01 ggml/llama: fix non-flat unary metal dispatch truncating rows past 1024 floats
Grid width for the non-flat unary path was ne01 while the kernel decomposes
tgpig.x into (ne0-chunk, row) — rows past ntg were silently dropped, masked
below the 32768-element flat-path threshold; silu on [8192, n] crossed it at
prefill batch 4 and corrupted qwen35 batched prefill. Grid is now
ne01 * ceil(ne0/nth). Adds metal unary/gated-delta-net/ssm_conv regression
tests, the llama-batch-probe bisect harness, prefill batch default 32, and
keeps the graph cache until a reserve-retry actually needs eviction.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:46:57 +02:00
Admin
f4147b4a45 map: kW inside the pin bubble, brand labels, pins above street names
The Tesla-pin refinement round:
- fast sites render the wide badge with the white bolt LEFT and the kW
  number INSIDE the bubble (white pin-class text); street AC gets the
  small badge; operator brand ("Tesla", "Fastned"…) reads under the
  pin from z13, tier-colored
- overlay paths accept ?fast / ?slow charger-power filters and the
  Layers panel splits EV chargers into fast and slow toggles
- draw order restructured: fills/casings/strokes → labels → icon pass →
  pin-class text, so pins sit OVER street names while their own kW text
  sits over the pins
- point labels for chargers/places/micro POIs straighten under
  rotation/3D like addresses do — pins are billboards, their text now
  matches

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:45:33 +02:00
Admin
21bdc6fd92 map: icon draw pass no longer hidden below z16
The pass-3 gate hid ALL baked symbols below ICON_MIN_ZOOM — charger
pins were in the buffers from z9 but never drawn. Floor now tracks the
lowest icon class (z8.75). Stale high-bucket tiles may briefly splash
their POI carpet on deep zoom-out until the rebuild lands — acceptable
against pins missing entirely.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:39:26 +02:00
Admin
675d4f1901 map: Tesla-style charger pins — big badges, white bolt, never collided
- charger sites render as 24px tier-colored pin badges (red/amber/blue)
  with a white bolt centered in the body; sized-mesh support added so
  one icon can break the 14px grid
- chargers take top icon-collision priority and their kW labels rank 8
  (above street names) at font 1.0 — a site stays trackable from z9
  road-trip zoom all the way in without popping out
- label extraction for chargers: >=50 kW label their power, Tesla
  operators label "Supercharger {kW}"

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:36:59 +02:00
Admin
14405e17fa map: kW-tiered EV chargers — Superchargers visible from road-trip zoom
Tesla-GPS framing: charging power is first-class map data.
- icon zoom floors by max_kw: ultra-fast (>=150 kW) from z9, fast DC
  (>=50) from z11, street AC posts z13 — the collision pass keeps
  density sane
- icon color by tier: red ultra-fast, amber fast, blue AC
- labels from z13: "Supercharger 250 kW" for Tesla operators (red),
  "{kw} kW" for other fast DC (amber); street AC stays unlabeled
- app layer toggles read app-tracked state (reading .active in the
  changed() pass raced widget state — same class as the panel bug),
  plus an overlays log line for future diagnosis

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:32:36 +02:00
Admin
bf14d772f9 map: capitals are cities, place text scales with population
- Amsterdam vanished zoomed out: shortbread tags it kind=capital
  (Haarlem state_capital) which fell into the everything-else z13.5+
  bucket. Kinds normalize now (capital/state_capital -> city)
- population rides along in the label key: city text steps 1.2/1.4/1.65
  at 150k/500k inhabitants so Amsterdam reads bigger than Purmerend,
  and a log-population score tiebreak places big cities first
- global label pass no longer gated at z13 (committed logic; the gate
  removal is what turned zoomed-out labels on at all)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:20:29 +02:00
Admin
d423792996 map_tiles: parallel relation assembly — pass 4 joins the flat-store club
Relations reference ways randomly across the extract; the 128-group
WayStore LRU crawled Europe's pass 4 at ~260 relations/s (5+ hours).
Now: FlatWayStore decodes the whole relation-member way store into RAM
next to FlatNodeStore, assembler workers resolve and prepare features
(new prepare_point completes the set), a single writer owns the spool,
and the ordered consumer only parses members/tags. NH pass 4 3.9s ->
1.3s, per-layer feature counts identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 13:13:13 +02:00