Commit graph

2,205 commits

Author SHA1 Message Date
Admin
82caed10d3 Map: band-top keyframes (15,18) + face-morph file flag
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
406c26c0b6 Map: face morph opt-in (MAKEPAD_FACE_MORPH=1) — inward morph inverts narrow features
Serving above the keyframe needs corr<1 (inward): narrow union features
self-cross into bowties, junction-pinned verts tear shards (user
screenshot, city center). Redesign queued: band-TOP keyframes (15,18)
so corr>=1 everywhere — outward-only morph is opaque-safe. App stable
pinned meanwhile.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
c8062a4ad4 Map: morph offsets survive dz subdivision — decked city faces morph too
subdivide_face_mesh_morph carries the offset channel (midpoints average
endpoints); decked bodies emit via the expanded layout with per-vertex
deck override. Fixes the magnified-wide roads across bridge-dz coverage
(all central Amsterdam) at deep zoom.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
9893c8acc2 Map: tree template instancing + stalk-clearance cell grid
Street trees memcpy one origin-built mesh (anchor+zbias patch); icon
stalk clearance queries a building-ring cell grid instead of scanning
icons x groups x rings. Worst AMS 368 -> ~310ms serial.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
b8a126c47b Map: bounded point-key whitelist at the icon horizon — detail-merge 137 -> 54ms
The icon matchers read a finite key set; parsing micro-POI layers with
the whitelist off was ~140ms/tile at kf16. Worst AMS 504 -> 368ms serial.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:43 +02:00
Admin
19d231405b Map: finalcut v5 — actually two keyframes (14,16); v4 edit had not applied
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
b99f328f01 Map: distance-first tile eviction + self-scaling byte budget (street-zoom thrash)
Icon-horizon tiles run 50-85MB; a fixed 1.2GB budget sat below
visible+pan-ring at street zoom and pure LRU evicted the very neighbors
a circling pan re-enters — every loop around a center rebuilt its ring.
Budget now grows to hold 2x the visible set and eviction orders by
distance from the view center (LRU only as tiebreak): the ring survives,
the trail is what dies.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
d0f92ed090 Map: finalcut v4 — two-keyframe morph cut (buckets 14,16)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
def3afd360 Map: morphable faces steps 3-5 — band-100 face emit, two-keyframe buckets, icon horizon
Morphable (flat, opaque, non-emissive) face bodies+fringes emit through
append_expanded_stroke_geometry (anchor = pos - miter*hw_key): the live
zoom re-widths them per frame via the existing width_correction path, and
the expanded branch already zeroes the fragment params faces with glow
would need — those stay pinned. render_bucket collapses to keyframes
{<=14 native, 15->14, >=16 -> 16}; icons include to a z18 horizon from
the high keyframe and reveal via the live icon_zoom uniform (mechanism
existed). Existing v3 streams serve both keyframes unchanged — the only
restyle event left on the zoom axis is the single 14<->16 crossover.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
91ddbd0061 Map: morphable faces step 2 — PaintFace carries per-vertex morph offsets
build_paint_faces maps every outline vertex's exact f32 coords to its
miter normal and emits offsets (normal x keyframe half-width) parallel to
body and fringe verts; junction blends, clip cuts, carrier outer edges
and translucent groups pin at zero.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
a23105c890 Map: morphable faces step 1 — ring_outward_normals (miter, winding-aware) + test
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
68fdf19a8e Map: pivot to morphable-faces prototype (AMS) before final Europe cut
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
781dd2c83e Map: bucket ceiling 17 + bake buckets 14-17 (rz18+ magnifies bucket 17)
5-bucket streams priced at ~2.6x (=130GB archive) — clamped instead:
rz18 shows bucket-17 geometry like any mid-gesture frame, GPU strokes
re-derive widths, nav icons survive. Consumption window 10..=18 stays
(harmless; ceiling makes >17 unreachable).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
af02364f40 Map: v3 shipped — shards carry cascade+shadow bakes, app verified on them + status.md
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
5a0839cb50 Map: finalcut outputs europe-base-br-v3 (shadow-baked cut)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
c2448ae0a9 Map: bake T3 building shadows into v3 faces buckets — docklands 2.7s -> 97ms
BakedFacesBucket v3 carries the dissolved shadow shapes + grounded
footprints under their own input signature (job rings/heights, sun,
scale, min-edge); the runtime shadow block on a HIT skips
sweep/dissolve/diff/open wholesale and tessellates the baked shapes
(b-sh-baked 0.5ms vs 0.2-2.6s). bake_tile_paint_faces now builds 3D so
the shadow pass runs at bake time; faces signatures are road-only and
stay valid. Night/dynamic-sun themes gate at bake_shadows and simply
never submit the shapes. Theme-independence test passes on v3; NL smoke:
8418/5388 2.7s -> 97ms, 8417/5387 1.6s -> 134ms, worst AMS rz16 258ms
honest (was 611ms with runtime shadows).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
d6f5084ad7 Map: honest shadow profiling — probe bakes shadows like the app, b-sh-* laps
The headless probe theme ran with bake_shadows OFF while every app theme
runs it ON, so all headless profiles silently skipped the shadow pass —
'155ms worst tile' excluded the 0.2-2.6s shadow dissolve the app pays
(user's 1.6-3.1s dockland tiles reproduce exactly now). Probe now bakes
shadows; b-jobs/b-sh-sweep/-dissolve/-diff/-open laps split the stage.
Buildings-buffer pre-reservation REVERTED (first-touch of ~240MB zero
pages per builder serialized 12 workers on the kernel fault path: 340ms
-> 3000ms in-app). Minkowski-sweep shadow silhouette tried and REVERTED
(epsilon-concave rings hand i_overlay self-crossing polygons, 10-15s;
also: f32-grid arithmetic in shadow geometry is load-bearing — f64-exact
translated points changed boolean coincidences and tripled dissolve
time). Real fix queued: bake dissolved shadow shapes per bucket.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
627f0bb04b Map: app reads .mkmap shards — MkmapReader + TileArchiveReader, varint-KV index v2
libs/mbtile_reader gains the .mkmap consumer: root.mkidx parse (Hilbert
tile ids, root ranges -> brotli leaf directories -> shard/offset/len),
positioned shard reads, same get_metadata/get_tile_decoded surface as
MbtilesReader; TileArchiveReader sniffs the path so mbtiles_path can
point at either. Index format v2 drops JSON: the metadata section is now
varint KV like the leaves (writer + reader; no serde in the container).
Loader, zoom-range probe and the headless harness go through the enum;
bridge-dz/overlay sidecars stay mbtiles. Harness parity via shards:
worst AMS rz16 164.7ms, z12 native 51.3ms — identical to mbtiles. App
repointed to local/maps/europe-base-br.mkmap (111 shards + root.mkidx,
the exact bytes a CDN would serve).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
e8c21892dd Map: bake bucket 15 (rz15 is a cruising zoom, not a transient band) + status.md
In-app at z15 every tile ran the 460ms runtime cascade (buckets were
14+16 only); NL smoke: worst rz15 key 600 -> 53ms. Europe final cut
rerunning with 14,15,16.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
9b4d871075 Map: repoint app to europe-base-br-v2 (theme-independent final cut) + pipeline script
Final cut: 9.38M tiles, 133,431 baked (9.6GB streams, zooms 10-14,
threshold 100ms), 107 shards under cap, 253,525 sampled byte-identical.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
b77bce2a61 Map: theme-independent paint structure — one faces bake for light/dark/circuit
Road-surface tier identity (RoadSurfaceKey) now carries a theme-stable
class id (fnv of the styling rule's kind) plus geometric fields instead of
resolved colors; identically-styled rules alias to one canonical id at
theme compile so kinds a theme paints the same still union as one tier.
Plaza grouping keys on alpha alone (road-polygon fills are one theme
constant). The bake input signature contains no colors, so recolor-only
themes (night, circuit city — user contract: themes only recolor, shadows
fade via alpha) share one baked stream: proven by
baked_faces_theme_independent (5 keys, identical signatures + regions
under a full recolor via probe_compiled_theme_recolored). Light output:
fills byte-equal, casing within 0.3% (same-rank painter tiebreak moved
from color values to class ids — visual check pending).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
e1b71501ec Map: v2 baked-faces input signature — skip tier ring construction on HIT
The bake guard now hashes the ring-construction INPUT (tier order/styles,
smoothed way points+dz, plaza rings, joint/portal end sets, clip) with a
deterministic FNV std-Hasher instead of hashing the constructed rings, so
a HIT skips road_ribbon_rings + per-ring field classification wholesale:
rings+fields 35.7 -> 0.8ms, worst AMS rz16 3D 224 -> 155ms (NL v2 bake,
byte-equal buffers vs the runtime cascade kill switch). BAKED_FACES_VERSION
2 rejects v1 streams (old semantic) into the safe fallback. Also: part-
centroid cell grid for the building cover test (buildings 25.5 -> 13.6ms,
Paris was 56ms), lookup-only cell maps switch SipHash for a multiply-rotate
hasher (DzField::sample), VisibleRegions: Clone for the OOB-region guard.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
fce6c68835 Map: repoint app to europe-base-br-faces-mz (mid-zoom baked) + midzoom pipeline script
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
3aa81131b7 Map: way-bbox grid for endpoint join passes + batched 19-float vertex appends
Replaces the remaining linear bbox scans in grade-through/flush-ends with
a 16-unit cell grid (candidates stay in ascending way order, so
first-match semantics survive); append helpers now extend_from_slice one
19-float record with reserved capacity. 7-tile rz16 sweep + z12 byte-equal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
68b950f3e3 Map: mid-zoom cascade bake + O(n^2) road-join prefilters — z12 city 661 -> 100ms
The zoom-out pyramid was never baked: z11-13 city tiles ran the full
painter cascade at runtime (z12 AMS 340ms cascade, 661ms build). map_bake
gains --zooms (native bucket below z14) and the renderer accepts baked
buckets 10-16; NL smoke bake: 861 tiles/55MB/31s, z13 166->19ms,
z11 252->28ms. Remaining z12 cost was two quadratic endpoint passes over
4017 join ways: bbox+reach prefilters and an endpoint hash grid cut
grade-through 103->33ms and flush-ends 98->3ms, bit-identical (every gate
is half-width-bounded; buffer sizes byte-equal across the sweep). Also
sp-* sub-laps in stroke-prep.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
9ea980a8da Map: corridor-segment grid + detail tag whitelist — worst tiles 383/300 -> ~235/226ms
Deck matching was O(verts x corridor segments) per stroke (84ms on the
worst AMS tile): per-tile CorridorGrid + mirrored-pair reuse cut it to
4ms, bit-identical (MAKEPAD_CORRIDOR_VERIFY oracle, MAKEPAD_CORRIDOR_BRUTE
fallback). Detail-merge parsed all six osm_* layers with full tags
(~110ms/tile constant): per-geometry-class layer skip + tag-key whitelist
below icon zooms cut it to 28-40ms; whitelist audited against style.rs
readers ('tunnel' omission flipped Paris plaza rings and MISSed the baked
cascade — CASCADE-GROUP dump + 7-tile size-parity sweep now guard it).
Full-build stage laps (payload/baked/dz/mvt-parse/detail-merge) close the
former ~110ms accounting gap; MAKEPAD_TILE_HASH prints a buffer fnv.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
80d5967198 Map: Europe single-origin archive shipped — 51.8GB base + faces bake + .mkmap shards
Overnight run 2026-08-01: 9,380,390 tiles z2-14 in 3.2h, faces bake 1h
(+8GB, worker-side brotli q10), transmux to 99 shards all <510MB.
App repointed to europe-base-br-faces.mbtiles. nl-bridge-dz verified
byte-identical against the new base (deterministic feature indices).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
9bddc458b9 Map: painter-cascade per-bucket bake (v2-faces-1) + z14 streets merge
- The boolean union cascade (59-77% of heavy tile builds) is now baked
  per (tile, bucket 14/15/16) as additive field 101: cascade output made
  deterministic (1/64 grid snap, canonical ring order, sorted tiers) and
  bit-reproducible; renderer consumes guarded by structure signature +
  coordinate checksum with runtime fallback; MAKEPAD_NO_BAKED_FACES=1.
  Roundtrip bit-identical on all keys x buckets x dz configs. New
  tools/map_bake producer (worker-pool incl. worker-side brotli).
- z14 streets merging never ran (early-out at DETAIL_ZOOM): fixed —
  1957->1285 ways (-34%), payload -20MB, cascade input shrunk at source.
- Slow-tile log now prints per-stage ms + a ready-to-paste headless repro
  command; harness honors archive/detail/dz/overlay/rz/3D envs.
- Worst AMS tile: 2-3s cold -> 175ms rz16 (61ms native); NL bake data
  882MB at 60ms threshold; Europe needs threshold 150ms + 2 buckets to
  fit shard budget (+2-4GB est).
- App -> nl-base-br3-faces archive; bridge-dz rebake required (joins
  fail closed against br3 feature indices).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
92c6139860 Map: fix build-24 livelock — never drop completed tile results
The stale-bucket result drop compared buffers.render_zoom (request-zoom
space, clamped to the archive max) against render_bucket() (unclamped):
never equal at overzoom, so EVERY completed tile at building zooms was
discarded, re-requested and discarded again — one-tile viewport, stuck
queues. Stale-bucket results are drawable; the bucket-restyle path
rebuilds them properly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
b1329124eb Map: layer-skip, keep-stale fixes, tilt priority, cancellation, budgets
- Regression attributed: the combined archive's six osm_* detail layers
  were wholesale-ingested and STYLED by the base parse (roads double-
  styled via streets + osm_lines: union input 946->3940 rings, stroke
  prep 26x) -> 2.1-5.5x slower than the old two-archive pair. Layer-level
  lazy skip (MvtSink::wants_layer): unconsumed layers skip as raw bytes
  in both passes; all 24 profile cells improve 1.3-2.3x.
- Gray-tile keep-stale: three kill paths fixed — mark_tile_failed no
  longer replaces drawable Ready entries with gray placeholders on batch
  errors (archive rewrites), transient absent reads no longer evict
  Ready meshes + 30s blacklist, retry backoff moved to TileEntry.
- Tilt-aware request priority (camera-projected screen distance with
  toward-camera bias) — the near field builds first under tilt.
- Restyle bursts lift the 4-slot gesture throttle to 12; queued jobs for
  dead zoom/bucket/mode are pruned (TagThreadPool::retain_queued), stale
  results dropped pre-upload; uploads byte-budgeted (24MB/frame).
- Stage matrix: painter-order union cascade = 59-77% of every cell
  (~320-350ms worst key) — per-bucket face bake is the path to <200ms.
- Baked-fill strips: A/B shows no measurable win post fill-tessellator
  optimization -> removal recommended (dissolve stays).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
c7f5a44019 Tessellator: 5.8x fill tessellation + baked-strip fast path
- Sign probe was 57-76% of z9/z13 fill cost (point_in_fill_rule scans all
  contours per probe): exact bbox prefilter (always on, bit-identical) +
  trusted-winding map-only mode (holes take the exterior's sign; bowties
  and orphan slivers keep the probe). Sweep rework: persistent zero-alloc
  tessellator, events sorted once + cursor (BinaryHeap::pop was 40% of
  fill CPU), ~V events instead of 2V, direct index output. 4.4-7x per
  tile, worst per-fill 42.9ms -> 4.5ms, 6798/6798 fixture fills
  bit-identical in both modes. MAKEPAD_TESS_DUMP fixture capture +
  fixture_bench with per-stage split.
- Baked-fill fast path (v2-fills-1, flat mode): field-100 strip decode,
  per-triangle Sutherland-Hodgman clip to the fill overlap rect, edge AA
  via new Tessellator::fill_fringe_into over the deduped rings; 5% area
  guard falls back to runtime tess — and caught a real emitter bug
  (inverted ring winding on z13 water would have erased a water body).
  MAKEPAD_NO_BAKED_FILLS=1 kill switch; baked_fill_audit headless test.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
386722c473 Map: headless tile-build profiler (reproduces in-app slow tiles exactly)
cargo test -p makepad-widgets --features maps --release profile_tile_build
-- --ignored --nocapture ; TILE_PROFILE_KEYS/REPS/ARCHIVE env overrides.
Uses the real probe theme (a default CompiledMapTheme styles nothing and
skips tessellation). Baseline: z9 water/landuse giants at 0.67ms/feature
vs 0.02 at z13 — vertex-heavy undissolved polygons dominate; decode 3-5ms.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:42 +02:00
Admin
d8e0811baa Map: fix combined-archive double parse below z14; gesture-aware dispatch
- The combined-archive detail reuse handed the base blob back as detail
  at EVERY zoom, but detail layers exist only at z14 — mid-zoom tiles
  (already 10-20x heavier than the versatiles ones) were parsed twice,
  up to 3.5s per z9 tile. Detail reuse now gates on z>=14.
- While a zoom gesture is live only the 4 most-central tiles dispatch
  (12 after settling): every dispatched job runs immediately on the
  14-thread pool, so speculative edge giants were pinning all slots and
  the zoom target's center waited multiple seconds.
- Slow-tile forensics stay: builds >150ms log key/bytes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
fd51e26d09 Map: center-out tile loading; single decode for combined archives
- Tile requests now dispatch nearest-the-viewport-center first: keys were
  row-major and the 12-slot in-flight cap filled corners before the
  center, which became visible once per-tile cost grew.
- Combined base+detail archives (pbf-base single-file mode) no longer
  brotli-decode every z14 blob twice through a second reader on the same
  file — the base bytes double as the detail input.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
184a768c84 examples/map: NL-wide bridge overlay; drop superseded Amsterdam bake
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
f0033ec8a5 Search: fuzzy transcription correction — settlements beat literal typos
Speech-to-text anglicizes Dutch names ("Harlem" for Haarlem). When the
literal token intersection surfaces no settlement, the query re-runs with
near-miss tokens (banded edit distance 1, 2 for long tokens; first letter
pinned, sorted-table range scan, capped) unioned per token — the tiered
scorer then ranks the town of Haarlem above an exactly-named minor POI
naturally (settlement tier + rank dwarf the exact-name bonus). NL
in-memory index only; the europe searchdb keeps literal matching.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
7ad23460ea Route: user override interrupts the dispatcher; break tool loops
- Voice override ("ok nevermind / stop / wait, do X") and ANY typed
  prompt now cancel the in-flight local turn (cancel_prompt -> per-token
  stop; worker closes the assistant turn and drops its pending tool
  calls). Bare "stop"/"nevermind" just halts + silences TTS; otherwise
  the new command is sent immediately. Queueing remains for non-override
  follow-ups.
- Greedy-decoding tool loops (identical geo_search spam): an identical
  repeated call or >10 tool rounds per prompt gets a corrective error
  result instead of execution ("answer with what you have").
- geo_search rejects degenerate queries (>64 chars / >8 words) that
  crawl the fuzzy index.
- Append-only context has no recovery once full: at >90% usage after a
  turn, the local session restarts fresh (cheap with mmap weights);
  transcript stays, conversational memory resets.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
053b1a9d15 Audio: constant gentle ducking beats half-duplex unit swapping
The mid-stream VPIO<->plain unit swap glitched the start of the
assistant's own speech; keep the voice-processing unit armed for the
whole capture (standard+Min ducking) instead. set_echo_cancellation and
the options-rebuild plumbing stay for apps that want the trade.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
419d77c652 Audio: half-duplex echo control — duck only while the assistant speaks
Idle listening now runs PLAIN capture (no VPIO, zero ducking — music
untouched); the app arms the voice-processing unit only while its own
TTS is audibly playing (+0.8s tail), which is the only window where echo
cancellation matters. Options changes rebuild running input units
(AudioUnitAccess.last_input_options); WindowVoiceInput/VoiceWave gain
set_echo_cancellation; route app polls speech playback at 4Hz.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
1288ed7471 Audio: gentler VPIO ducking — standard mode at Min level, env-tunable
Advanced ducking dips other audio hard on voice activity even at Min;
standard ducking at Min is a light constant reduction. Also fixes the
IO-unit instantiation double-retain (av retained twice, au never) that
made every unit immortal — mic-off now really ends the voice session
and un-ducks. MAKEPAD_VPIO_DUCKING=min|mid|max|default and
MAKEPAD_VPIO_ADVANCED=1 for experimentation.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
cff99f0a22 Audio: fix VPIO for real — native format, retain balance, error release
Standalone harness (scratchpad/vpio_test.m) proved macOS VoiceProcessingIO
rejects ANY custom bus format with -10875 FailedInitialization; with the
native format untouched it allocates and accepts the min-ducking config.
- VoiceInput skips the bus-format override and reads back the native
  sample rate/channel count after allocation (input handler now sizes its
  buffer from input_channels instead of hardcoded 2ch).
- Retain balance fixed: the AU handle is retained once on SUCCESS (the
  historic double av-retain made every IO unit immortal), and a FAILED
  instantiation is released in the error path — leaked half-born VPIO
  units were keeping system-wide ducking engaged until process exit.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
72c0330d95 Audio: fully tear down VPIO on mic-off; set ducking config post-allocate
release_audio_unit now stops hardware, deallocates render resources and
releases the retained render_block — the leaked VoiceProcessingIO unit
kept the system voice-chat session (and its ducking of all other app
audio) alive until process exit. The other-audio ducking configuration
(advanced + minimum) is applied after allocateRenderResources and logs
whether it took effect.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Admin
aad72dfe2b Audio: never auto-select loopback; fix VPIO init + minimize ducking
- The SCK loopback device claimed is_default and default_input() fell
  through to it when the real mic errored — the voice pipeline silently
  became SYSTEM-AUDIO capture behind screen-recording privileges. Loopback
  is no longer default and default_input() only auto-picks real Input
  devices; system-audio capture is explicit-opt-in by device id.
- VoiceProcessingIO input failed FailedInitialization on macOS when pinned
  via setDeviceID (it aggregates its own devices; follows system default
  input now). If VPIO still fails, degrade to plain capture instead of
  marking the DEVICE failed (voice_input_unusable flag + device-change
  re-arm); input error log no longer says "output".
- VPIO voice-chat mode ducks all other app audio to a whisper: request
  advanced ducking at minimum level (macOS 14+/iOS 17+) so music stays
  near full volume while AEC keeps running. Links AudioToolbox.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-02 17:48:41 +02:00
Kevin Boos
d6c3d5c322 cargo_makepad: don't include resources/android/ios on every platform (#1157)
* TextFlow: fix inline `<code>` spans sagging below the baseline

finish_row_center centered every walk by its own height, so a code run's
shorter walk got a larger downward shift than the surrounding prose under
`RowAlign.Center`. That undid TextFlow's baseline_shift: inline `<code>`
spans sat a few px below the line's baseline, and their descenders poked
out of the bottom of the code box.

* FinishedWalk now carries an optional `align_height` that text runs set
  to their line style's height, so every text run on a row receives the
  same centering shift and stays on the baseline. Also fixes sub- and
  superscripts drifting under `RowAlign.Center`.
* The per-style metrics probe now caches descenders too, since we need
  the full line height (ascender + descender) to compute `align_height`.

* Html/Markdown: make the fixed/code font size scale configurable

Replaces the hardcoded 0.85 `FIXED_FONT_SIZE_SCALE` consts with a
`fixed_font_size_scale` live property on TextFlow (default 0.85), so
apps can tune how much smaller `<code>` text renders than the prose.

* cargo_makepad: don't include `resources/android`/`ios` on every platform

Runtime asset bundling copied each crate's entire `resources/` tree into
every package, so `resources/android/` (manifest template, launcher icon
mipmaps) shipped as dead weight inside APK assets and Apple bundles, and
any `resources/ios/` content would ship on Android too. Those dirs are
platform-specific, so only their own platform should bundle them.

* Add `cp_all_skip_top()` to `makepad-shell`: like `cp_all()`, but skips
  top-level entries by exact name.
* Android (APK and AAB staging): bundle `resources/android/` minus the
  packaging inputs `AndroidManifest.xml.template` and `res/`, which
  already reach the package via the generated manifest and the aapt
  `res/` pipeline; skip `resources/ios/` entirely.
* Apple bundles: skip `resources/android/`, keep `resources/ios/`.
2026-08-01 10:26:31 +02:00
Kevin Boos
8e4573ee3b TextFlow: fix inline <code> spans that are too low (beneath text baseline) (#1156)
* TextFlow: fix inline `<code>` spans sagging below the baseline

finish_row_center centered every walk by its own height, so a code run's
shorter walk got a larger downward shift than the surrounding prose under
`RowAlign.Center`. That undid TextFlow's baseline_shift: inline `<code>`
spans sat a few px below the line's baseline, and their descenders poked
out of the bottom of the code box.

* FinishedWalk now carries an optional `align_height` that text runs set
  to their line style's height, so every text run on a row receives the
  same centering shift and stays on the baseline. Also fixes sub- and
  superscripts drifting under `RowAlign.Center`.
* The per-style metrics probe now caches descenders too, since we need
  the full line height (ascender + descender) to compute `align_height`.

* Html/Markdown: make the fixed/code font size scale configurable

Replaces the hardcoded 0.85 `FIXED_FONT_SIZE_SCALE` consts with a
`fixed_font_size_scale` live property on TextFlow (default 0.85), so
apps can tune how much smaller `<code>` text renders than the prose.
2026-08-01 08:25:00 +02:00
Admin
a17f745ccb Add missing platform/src/event/location.rs
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:56:19 +02:00
Admin
1afcedd8f6 NL-wide bridge-dz overlay + mbtiles-merge; fix VoiceInput unit handling
- bridge-dz baked for the entire Netherlands (17026 tiles, 29MB):
  AHN-refined over the 8 Amsterdam sheet pairs, solver-only elsewhere.
  Baked as 4 north-south strips with 2-tile overlap — the full-bbox
  global solve peaked past 60GB RSS — merged with the new mbtiles-merge
  subcommand (later input wins on overlaps, block-major write order).
  Route app bridge_dz path ams -> nl.
- audio_unit: the new VoiceInput (VoiceProcessingIO) kind takes the input
  setup/handler paths (set_input_handler panicked and aborted the app);
  VPIO capture forced mono on every platform.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:38:48 +02:00
Admin
22316f9b8c Audio: echo-cancelled capture option (Apple VoiceProcessingIO)
use_audio_inputs_with_options(devices, AudioInputOptions{echo_cancellation})
— platform-neutral trait default ignores the flag; Apple swaps the input
unit HAL->VoiceProcessingIO (system-wide AEC, the unit iOS input already
uses), so the assistant's own TTS no longer feeds back into the mic.
Voice capture (WindowVoiceInput) requests it always.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:16:29 +02:00
Admin
723b7928bb Route assistant: mmap LLM weights, fix batched-attention corruption, kokoro voice out
- ggml: read-only mmap module (unix-gated) + two-region Context (mapped
  weights / dirty caches) + segmented Metal buffer binding; llama loads
  GGUF weights as file-backed clean pages (jetsam-exempt) with owned-arena
  fallback (MAKEPAD_LLAMA_NO_MMAP=1). Route app dirty footprint 12GB -> 4-7GB;
  model load becomes lazy page-in; A/B byte-identical on 4B + 9B.
- llama: fix graph-cache keying corruption — a graph keyed wider than the
  KV cache corrupted attention for any prefill batch >= 2 (flash op reads
  permute-node dims baked at build; view reconfigure never reached the
  kernel; masks were written cache-narrow). Masks now always fill the full
  graph key width and graphs key by 1024-buckets; reconfigure path removed.
  Verified byte-exact vs per-length reference across batch 1/2/8/64/512,
  short+long prompts, mmap on/off, plus a two-session concurrency probe.
- voice: passive VoiceWaves no longer register the global audio-input
  callback (the invisible caption-bar wave stole mic audio — last
  registrant wins — and spawned duplicate whisper workers); whisper back
  to F16 default (voice Metal library has no quantized kernels; q5_0
  failed every GPU matmul); raw transcripts render immediately.
- route: kokoro TTS voice output (speaker toggle; streams reply sentences,
  announces nav maneuvers + arrival) with barge-in — voice activity on the
  mic stops playback instantly; dispatcher context 8k -> 32k (hybrid KV is
  12/48 layers, ~48KB/token); window caption bar suppressed under studio.
- llama-generate: --max-context/--prefill-batch-size + state fingerprints;
  new llama_concurrent_probe bin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 12:13:31 +02:00
Admin
676255dfc2 Land route app + platform geo/permission APIs, map nav layer, geodata radar
apps/route: AI trip planner on MapView — tool broker + local/cloud agent
dispatch, nav session + simulated drive, layers/theme state, DDG image
search, trip history, tilt-shift DOF layer (linear circle-of-confusion:
level = log2 of radius, constant growth rate, tilt raises only the
ceiling; tilt-shift on by default).

Platform: Cx geo location API (macOS/iOS/Android/web) + permission
plumbing, memory watchdog, headless build cfg. Map: nav layer M0 API,
landcover drape, bridge dz. Geodata: 250m dual-radar compositor
(radar_volume) + KNMI sync. Docs for the route/glass/blur/shiny work.

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