Commit graph

2,973 commits

Author SHA1 Message Date
andodeki
a3d8f521a9 fix(game/render): port EntityLocal particle anchors from libs/render
makepad-game-sim added EmitterAnchor::EntityLocal but game/render's
ParticleSystem still matched only Entity/Point (E0004). Port the
libs/render implementation: step() now resolves (pos, yaw) so a local
offset turns with its body; add clear(). Arcade caller passes yaw.
2026-09-26 11:17:02 +00:00
andodeki
1561856949 fix(game): pass filmed body to 5-arg camera_boom_limit
libs/sim migrated camera_boom_limit to take `ignore: u64` (the filmed
body) but the game/blocks controller, game/render scene and the
gamemaker example still called the 4-arg form, so every crate depending
on makepad-game-blocks/render failed to compile (nigig TRAFFIC-P0-01).
Pass the controller's `subject` / `world.cam_third`, mirroring the
already-migrated libs/render/src/scene.rs.
2026-09-26 11:15:34 +00:00
b580de105b fix(fork): refresh widgets from upstream work + re-apply sibling reexports 2026-09-26 03:20:34 +03:00
e3a1e72e53 fix(fork): refresh ai-hub from upstream work - HttpServerHandle API 2026-09-26 03:14:42 +03:00
82c6ef3ab0 fix(fork): refresh draw from upstream work - font API skew 2026-09-26 03:11:40 +03:00
562dfde5e3 fix(fork): add Touch protocol names to makepad-test studio_msg_name 2026-09-26 03:07:45 +03:00
ba69fc28bf fix(fork): refresh libs/regex from upstream work - ascii_word_boundary 2026-09-26 03:02:48 +03:00
b211a372d9 fix(fork): base platform+test on upstream work 5f99533 + re-apply nigig BeforeStartup, NIGIG_TEST_MODE, touch protocol 2026-09-25 23:19:08 +03:00
4e8c0b5182 fix(fork): refresh libs/regex from upstream dev - add ascii_word_boundary 2026-09-25 23:02:43 +03:00
8eaa075f1f fix(fork): refresh platform from upstream dev fda40f5 + re-apply nigig BeforeStartup, NIGIG_TEST_MODE, touch/long-press/paste/IME protocol 2026-09-25 22:55:32 +03:00
91b6267f84 fix(fork): restore upstream metal.rs - fix merge delimiter artifact 2026-09-25 21:11:01 +03:00
ce45048baf fix(fork): restore upstream blocking_http streaming API + add RemotePinch alongside nigig touch/joystick protocol 2026-09-25 20:47:20 +03:00
afccda5445 fix(fork): restore nigig game-sim/math + workspace members, take upstream finance/route manifests - preserve game crates alongside dev/work split into scene/soft-body 2026-09-25 20:12:03 +03:00
99ca24dbbc Merge upstream origin/work 5f99533 into nigig fork alongside dev 2026-09-25 17:32:26 +03:00
a0f46b7d83 Merge upstream origin/dev fda40f56 into nigig fork - preserve nigig hub/web_server, take upstream dev updates 2026-09-25 17:25:35 +03:00
02d92e5cb9 Merge remote fork gitdab/nigig-makepad-test-android preserving local nigig android commits 2026-09-25 16:35:10 +03:00
cfb2a4b0ba Merge remote fork gitdab/nigig-makepad-test-android (66cc4f1) preserving local 10 nigig android commits 2026-09-25 16:24:43 +03:00
Admin
5f99533505 Merge branch 'wm-fixes' into work 2026-09-25 11:20:28 +02:00
Admin
343de346b7 calendar: the Calendars sheet is an opaque panel, and the wide layout does not float one over its sidebar -- paper (sheets, pages, panels) was the theme's inset tint, 15% black in the desktop dark theme, so every sheet showed the content under it; it is now that tint over the window background, the colour the root already showed. A Calendars sheet or page carried from the phone or landscape layout into the wide one reopened as a 320 pt panel at the phone button's position, its Close floating over the sidebar's own calendar rows; the wide layout closes it, since the sidebar lists the calendars
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 11:14:14 +02:00
Admin
f82a3c2126 draw: glass of a view that stopped drawing leaves the screen -- a glass surface records into the window overlay and stays there while its parent list does not redraw (a cached view); a texture-cached view that went invisible never redraws, so its glass stayed where it last was. The calendar switching from its phone layout to the wide one kept the phone toolbar's glass capsule over the sidebar's mini month. The overlay now also drops a glass whose parent list renders into a pass that is no longer attached (Cx::pass_attachment_is_stale, walked up the texture-pass chain)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 11:14:14 +02:00
Admin
abcb4c3445 platform (windows): a texture pass drawn before its window has a size is skipped, not a crash -- a hosted child can draw before the host's first WindowGeomChange, at dpi 0, so a texture-cached view's pass had a NaN size: the viewport check (< 1) let NaN through, CreateTexture2D failed and the unwrap of the missing render target killed the child (calendar in wm on .100: 'Websocket closed', 3 of 4 launches). setup_pass_render_targets now says whether there is a target to draw into (refuses NaN and a render target the device could not create) and draw_pass_to_texture skips the pass
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 11:14:14 +02:00
Admin
b9882bff16 platform + wm: a hosted child redraws at its tile's new size -- two ways a geometry change was lost, measured on Windows (.100) with wm hosting clock and calendar: after a split or a resize the child kept drawing at its old size and the tile showed that frame stretched or squeezed into the new rect (child logs: the WindowGeomChange never arrived, painting stayed at 2268x1428 against a 560-wide tile)
- The child's Tick drains the network queue for HTTP and script sockets (dispatch_network_runtime_events), and that queue also carries the host socket its hosted loop reads. A host batch landing during a Tick went through dispatch_studio_msg, which drops the loop's own messages: WindowGeomChange, Swapchain, Tick. The drain now parks host-socket responses in Cx::studio_backlog once a loop owns the socket (its first read), and the loop's next read takes them first, in order. Before: 1 in 2-3 split runs lost the geometry; after: 6 of 6 runs delivered every geometry sent. Applies to the macOS and Linux X11 hosted loops too; Android hosted never drained the network in its Tick
- wm's run view cleared its bootstrap (the geometry resend) on any present, so a frame already in flight when the tile changed size cancelled the geometry before it was sent; a present settles it only after the first bootstrap beat has sent the messages

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 11:14:14 +02:00
Admin
d51069baea Merge branch 'win-deck' into work 2026-09-25 10:53:36 +02:00
Admin
3c56f0cf08 Merge branch 'd3d-first-draw' into work 2026-09-25 10:53:36 +02:00
Admin
2b05e260c1 Merge branch 'mcp-reverse' into work 2026-09-25 10:53:35 +02:00
Admin
641ef10a1f civil-time: one local wall clock for every app, and it knows the zone on Windows -- the Clock app said "UTC" on Windows because its localtime_r copy was Unix-only; clock, calendar, task, mail and wm each carried their own copy (mail's macOS-only, wm's with a separate GetLocalTime path). makepad_civil_time::local() now breaks an epoch second down by the OS's own zone rules (localtime_r on Unix, FileTimeToSystemTime + SystemTimeToTzSpecificLocalTime on Windows, so DST applies at that instant) with the UTC offset, and all five apps use it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 10:22:16 +02:00
Admin
c023dbd28b builder: an app edited after its build shows as needing a compile -- besides a newer release, the Builder reads Cargo's dep-info for the built app (target/release/<binary>.d) and shows 'compile' when any source it lists is newer than the app or gone, so changes made by a coding agent or the person are visible in the menu after an update; the check is cached per app (rechecked when the app is rebuilt or after 5 s)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 10:19:39 +02:00
Admin
48f7eabac1 wm: opening an app rebuilds it when its binary is out of date; warm instances never build -- the rule is that pre-warmed ("hot") clients only start when nothing has to compile, not that nothing compiles: opening an app (a click, F10 for the pane) builds it when its binary is missing OR older than any source cargo's dep-info (<bin>.d) lists, on every platform, then runs it in the same tile. The warm pool, the pane at startup and previews run only built, up-to-date binaries; a stale one is not warmed (remembered by its build time, so the check runs once per build) until an open rebuilds it. So no build of wm's own ever holds cargo's lock ahead of the app the person opened. A build logs to wm-client-<id>-build.log, which the app's own log no longer overwrites. On .100 with the Builder's environment: startup ran no cargo and left the stale terminal cold; Photos opened 10 s after start built and drew in 9.9 s with no lock wait; the stale terminal rebuilt on open (4.1 s) and was warmed again after
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 02:08:06 +02:00
Admin
d4f8533e42 platform (windows): a popup opened for the first time draws its rows -- AI provider dropdown, Styles menu and every other first open showed only the menu's background
Measured on .100 with apps/aichat and a draw-call log: the popup's rows use two
shaders created on its first draw (menu item background and text). D3D11
compiles them on the pool and skips their draw calls until they are installed;
the background's shader already existed, so the panel drew empty. The finished
compiles were only picked up inside a redraw (hlsl_compile_shaders ran under
need_redrawing), and a window at rest has none: the finished task raised the
internal signal, the loop woke and went back to sleep, and the rows stayed
missing until the next input. A startup shader that finished after the last
startup redraw waited 17 s for the click that opened the menu. Warm shader cache:
the same empty panel. Draw order is fine: the rows follow the background in the
popup's overlay list, above it in depth. Metal compiles inline and was correct.

- hlsl_adopt_shaders installs finished compiles; the Signal handler runs it
  when the internal signal is raised (one wake per finished task, no polling),
  and every paint tick runs it before it draws (and the stdin host's tick).
- Once the startup set is installed, new shaders compile on the UI thread
  before the frame renders, as Metal does, with a 1 s budget per frame and the
  rest on the pool. Startup keeps compiling on the pool. Measured first open
  with a cold cache: 26 ms + 19 ms, the menu complete in its first frame.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 02:03:03 +02:00
Admin
10cc3eb7dc wm: the clock and calendar know the date on Windows -- local_now() had only a POSIX (localtime_r) version and returned None on Windows, so the date view fell back to January 1 2026 and the bar's clock had no local time; Windows reads it from GetLocalTime
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 02:02:00 +02:00
Admin
6c05f3d43d ai: Connect hands the .mcpb to Claude Desktop itself -- Windows associates no program with .mcpb, so opening it with the OS opener did nothing there; Claude Desktop takes the bundle's path as an argument, running or not, and shows its install dialog
- Windows: the Store package's App Execution Alias (%LOCALAPPDATA%\Microsoft\WindowsApps\claude-desktop.exe), else the running Claude Desktop's own exe (never Claude Code's claude.exe), else the installer's AnthropicClaude\claude.exe or Programs\Claude\Claude.exe; started with no console window.
- macOS: open -a Claude <bundle>, when Claude.app is in /Applications or ~/Applications. Linux: xdg-open as before.
- No Claude Desktop found: the panel says "Claude Desktop isn't installed".

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 02:01:34 +02:00
Admin
8f4e447367 builder: CUDA crates build in an installation whose path has a space -- nvcc cannot create its intermediate files under a TMP with a space (Downloads\makepad-builder (2)) or in the verbatim \\?\ form canonicalize gives on Windows ("Could not open output file '\\?\...\tmp/tmpxft_...'"), so with CUDA installed every crate with CUDA kernels failed (aichat and files, built by wm, on .100). On Windows TEMP/TMP/TMPDIR are the tmp folder's plain short (8.3) path; measured on .100: the verbatim and spaced TMP fail, the short one compiles
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:54:08 +02:00
Admin
8a7758947d wm: the whole deck out of a Builder's source, compiled only when the person opens an app -- the Builder starts wm in the source it downloaded (with its compiler environment), but wm took a checkout to need local/, which a download has not: it fell back to sibling binaries, listed only the apps already built next to it (calculator, calendar, mixer, route) and logged "binary not found: aichat / terminal / browser / files / task". A checkout is now the workspace with apps/wm in it. And wm compiles nothing behind the person's back: every child is its built binary (the checkout's release build in CARGO_TARGET_DIR, the Builder's shared target, or the installed sibling), started directly instead of through cargo run; the warm pool, the AI pane at startup and previews start only apps that are built (seven cargo runs at startup queued on one target lock while the clicked app said "Waiting to compile" behind them). The menu lists every deck app, "compiles when opened" under those not built; opening one runs a single hidden cargo build --release -p <pkg> --bin <bin> whose progress bar is read into the tile ("compiling 103/107 crates · makepad-widgets…"), and the app starts in that tile when it is built, or the tile says the build failed and names its log
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:54:08 +02:00
Admin
482b2b1f56 wm: children open no console windows on Windows -- wm is a windowed program started detached by the Builder, so it has no console; every console program it started (the pre-ac1917d70 Builder linked every app as a console program: makepad-mixer.exe, wm.exe, calculator.exe are PE subsystem 3 in the user's install; and cargo whenever wm ran out of a checkout) got a console window of its own, which showed over the full-screen desk as "a terminal inside wm" and, with cargo, one per warm client. Every child wm starts (clients, curl for themes) and every sibling wm_api starts gets CREATE_NO_WINDOW; hosted children talk over pipes and the hub, never a console
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:53:58 +02:00
Admin
e8dae096f5 builder: menus wrap around -- Up on the first row goes to the last and Down on the last to the first, in the Rust TUI and the shell previews' lists
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:53:40 +02:00
Admin
e831c4520f Merge branch 'mcp-reverse' into work 2026-09-25 01:39:16 +02:00
Admin
7fdb4dd742 builder: the compile bar's total is the app's own crates -- the estimate takes the packages from cargo tree -p <app> (resolved for that package alone; cargo metadata resolved every workspace member's features and counted about twice as many, so an app whose other crates were already built showed 3 / 70), and after a successful build the exact count is kept beside the build output (<binary>.crates) for the next one; fresh crates still leave the total
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:35:44 +02:00
Admin
01911e2374 builder: an incremental compile's bar follows what really compiles -- crates Cargo reports as fresh (already up to date) leave the total instead of adding to the count, so the bar no longer jumps to half at once and crawls through the rest
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:20:01 +02:00
Admin
9305341f5b Merge branch 'ci-disk-space' into work 2026-09-25 01:17:56 +02:00
Admin
ff61d1e8ef ci: a full disk empties the build output before the run, not every row after it -- the mini's wall went red on workspace ("check host": failed to write full.rmeta: No space left on device), apps/browser ("comes up": grab write: No space left on device) and apps/calculator on ac1917d70: the volume had 104 MB left, 207 GB of it the checkout's target (16 target triples, 59 GB host debug). Cargo never removes what it built for a feature set or dependency graph that is gone: each triple held 8 to 10 builds of makepad-widgets alone since 09-21, and tonight's makepad-widgets features added new ones for every crate above it on every triple. The sync step now counts the build output (stopping once it reaches the free space; 434k files on the mini) and, when it is as large as what the volume has left, removes it and the run builds from cold: the worst a run adds is one more copy of what is there.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:16:33 +02:00
Admin
b6a99cb381 wm: starts on Windows -- the desk no longer overflows the 1 MB main stack
wm.exe died at startup with "thread 'main' has overflowed its stack"
(0xc00000fd) on Windows, where the main thread gets 1 MB against 8 MB on
macOS and Linux. The startup chain is shallow (~85 frames) but five of its
frames were huge: ShellIcons (41 DrawSvg, ~110 KB) sat by value in every
ShellDraw, PhoneSurface carries one ShellDraw and WmDesk carries a
PhoneSurface plus its own ShellDraw (286 KB). Each constructor layer
(WmDesk factory, WmDesk::script_new, PhoneSurface::script_new and
script_new_with_default, ShellDraw) held its whole value in its frame:
about 970 KB in five frames. Reproduced on macOS by linking wm with a
1 MB main stack (same overflow).

script gets a transparent Box<T> (ScriptNew/ScriptApply/ScriptHook forward
to T: same type id, proto, default and apply), and ShellDraw boxes its
icons. The same chain now takes ~305 KB (WmDesk 286 -> 69 KB, PhoneSurface
140 -> 30 KB, ShellDraw 117 -> 7 KB); the 1 MB-stack build starts and runs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:13:29 +02:00
Kevin Boos
fda40f5650
PortalList: stop following the end when scrolling to an earlier item (#1261)
`smooth_scroll_to()` never cleared `tail_range`, so on a list that was following
its end (e.g., a chat timeline restored at the bottom), each draw pulled the list
back down while the scroll animation moved it up, and the target was never reached.

Now scrolling to any item but the last one stops following the end and drops any
pending tail adjustment. Scrolling to the last item still resumes tailing once it lands.
2026-09-25 00:56:26 +02:00
Kevin Boos
03705413e7
Constrain Splash external I/O to the host service bridge (#1243)
* Constrain Splash external I/O to the host service bridge

* Validate untrusted Splash source with the host I/O restriction

* Give strict Splash validation a disposable storage jail

* Close the remaining ways out of the Splash host I/O restriction

- Keep CachedWidget singletons per heap, and don't register CachedWidget
  or WindowMenu in restricted isolates.
- Don't emit Html/Markdown link URLs as actions from a restricted isolate,
  and ignore its menu bar updates.
- Suppress clipboard copy/cut hits for any restricted isolate, not only
  within Splash.
- Give script calls made while an isolate is installed the same budget.
- On web, let package resource fetches skip the guest I/O guard.
- Name the validation jail without the wall clock, and skip it on wasm.
- Make the host I/O tests fail when their guards are removed.
2026-09-25 00:56:09 +02:00
Admin
0f39445982 ai: Claude Desktop drives any app with the F10 panel -- pick "Claude Desktop" in the panel's provider menu and the app serves its tools to it over MCP
- The loopback MCP server moves from Director into libs/ai/services (mcp::server); Director re-exports it, its lane tokens and tests unchanged. The dispatcher now names the server and its instructions; a TokenStore can live in memory only (ephemeral).
- mcp::host: while Claude Desktop is the provider the panel serves its registry's tools (service__tool names) on an ephemeral 127.0.0.1 port with a fresh bearer token, and writes ~/.makepad/mcp/<exe-stem>.json {pid, port, token, title} (0600 in a 0700 dir), removed when the provider changes or the panel goes. Calls queue to the UI thread and run through EngineCore::call_external: a card in the transcript, destructive calls held for the person's confirm (the pane opens for it), the result sent back when the card lands.
- mcp::mcpb: "Connect to Claude Desktop" writes <exe-stem>.mcpb (a stored zip, manifest_version 0.3, binary server = this executable with --mcp) and opens it so Claude Desktop shows its install dialog.
- platform mcp_relay: `<app> --mcp`, checked first in app_main before any Cx, window, GPU or audio, relays newline JSON-RPC on stdio to the running app's endpoint. It answers initialize/ping itself and tools/list from the app's last list while the app is down, starts the app (detached, MAKEPAD_AI_PROVIDER=claude-desktop, engine up with the pane closed) on the first call that needs it, waits up to 20 s for its file, and exits when stdin closes.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:43:05 +02:00
Admin
ac1917d70c windows: desktop apps open no console window, and still speak through pipes -- the Builder links apps as windowed programs (/SUBSYSTEM:WINDOWS, mainCRTStartup), so starting one from Explorer or the Builder shows no cmd window; app_main joins the parent terminal's console only when the process has no stdout (started from a terminal), so a pipe (an MCP client starting --mcp) and console builds keep their stdin/stdout untouched
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:26:00 +02:00
Admin
952cdc8b12 builder: the Windows exe is built for size -- cross-windows.py compiles the Builder with fat LTO, one codegen unit and opt-level z (29.8 -> 21.8 MB measured before the widget trim)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:14:18 +02:00
Admin
971c90f47a ai hub: a local chat with no model says so once, plainly -- after 'no model' the worker handed the line that just failed back to itself and retried it forever ('listening for the fleet' in a loop); it now waits for the person's next line. The message reads 'No local AI model is installed yet. Put a model file (.gguf) in <weights>, or pick another AI above.' and the fleet routes that were tried go to the log
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:14:18 +02:00
Admin
fcdb8694d5 platform (macos): the display link is kept until it is invalidated -- the CADisplayLink from NSView displayLinkWithTarget: was stored without a reference of our own; closing the last window releases the view's link before the deferred WindowClosed retires the window, so invalidate hit a freed link and macOS 15.7 aborted on its unfair lock (EXC_BREAKPOINT in retire_cocoa_window) on every app exit. The link is retained when created and released after each invalidate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:14:18 +02:00
Admin
9cd063cb3e Merge branch 'widget-features' into work 2026-09-25 00:13:30 +02:00
Admin
2e176aaea5 widgets, builder: the big widget families are features, all on by default, and the Builder takes none of them -- makepad-widgets gains tweaker (with reflect and the theme store; needs dock and data), charts (chart, chart shapes, waveform; needs color), color, data (data grid, tree view, file tree), dates (calendar, date and time pickers), chat, dock, rich_text (text flow, rich text, HTML, Markdown, LaTeX maths, log list; makepad-html, pulldown-cmark and latex-math become optional), dropzone, vector, glass and nav_menus (floating action, radial, pill-nav, line and hamburger menus) and command_palette. Each gates its modules, re-exports and registration; the core stays unconditional. Without the tweaker a Window's Tweaker is an empty hidden view, as the voice wave is without voice, and the window, widget tree and fab panel skip their tweaker and dock hooks. wm_theme and wm_api take no families; the terminal app keeps them all through a default all_widgets feature so shared target dirs build makepad-widgets once. The Builder (tools/makepad_builder) takes widgets and terminal without defaults: macOS release 30.04 MB -> 24.41 MB (stripped 24.39 -> 19.70 MB, __text 15.96 -> 12.62 MB), window and TUI unchanged (identical grab), no script errors in its log. Checked: cargo check --workspace, widgets with no features and with each feature alone, widget lib tests with and without defaults (1849 / 1100 pass), Builder on macOS, Windows and Linux targets.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 00:10:52 +02:00