Skip to content

Build Makepad's catalog apps in the checkout, shared by every home - #551

Merged
ymote merged 1 commit into
mainfrom
feat/makepad-apps-build-in-checkout
Oct 21, 2026
Merged

ymote merged 1 commit into
mainfrom
feat/makepad-apps-build-in-checkout

Conversation

@ymote

@ymote ymote commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

The six "source": "makepad" catalog apps (browser, files, finance, route, image, pdf) now build in the checkout's own target dir, target/makepad ($CARGO_TARGET_DIR/makepad when set), beside the native apps. Before, they built into the OctoSense home's build/makepad, so each home started cold.

Why

From a checkout, an app's first open waits for its release build (#549 moves those builds to the background). The native apps were already shared: they build in <checkout>/target whichever OctoSense home the shell runs with. The six Makepad apps built under <OCTOSENSE_HOME>/build/makepad instead, so every new home compiled all six from scratch. That includes the empty test home AGENTS.md asks for in local shell tests, and every demo profile.

Each cold build takes minutes on a busy Mac. On 19 Oct, first opens on a demo profile took 11.8 min for route, 9.4 min for finance, 6.4 min for browser and 3.6 min for pdf. They also build four variants of makepad-widgets (default, cef, pdf, maps+voice). Each home also kept its own 1.5–2 GB copy. On this Mac, ~/.octosense/build/makepad holds 2.0 GB, untouched since 7 Oct, with 11 builds of makepad-widgets. A home's copy also served every checkout run with it, so switching between checkouts on different Makepad trees rebuilt the shared folder each time.

What changes

  • catalog.rs: a Makepad row's target_dir is makepad_target_dir(). That is the target dir of the workspace around paths::project_root(), the same one launch_plan gives native apps (clients::workspace_target_dir, now shared), plus makepad/. With no checkout, it falls back to the home's build/makepad. That can't happen while a Makepad row resolves, because makepad_root() needs the same project root.
  • clients.rs: workspace_target_dir() factored out of the native branch of launch_plan. The new test makepad_launches_share_the_checkouts_build_with_every_home checks three things: a Makepad row's build dir is the native apps' target dir plus makepad; it is not under the OctoSense home; and it is the --target-dir cargo gets.
  • sandbox/tests.rs: a comment no longer says the desktop builds into the home. The test still covers a program inside the home.
  • desktop/README.md, README.zh-CN.md: where these builds go now. Also says the old ~/.octosense/build/makepad is no longer used and can be deleted. The shell deletes nothing itself, because older checkouts still build there.

Sandboxing is unchanged. Makepad rows are not native apps and get no sandbox policy. A native app's sandbox already holds its build's target dir read-only, and target/makepad sits inside that dir.

Testing

  • macOS, from phone/: cargo test --locked --features mobile-apps -p octosense-shell --lib -- clients::tests octosense::catalog::tests prebuild::tests sandbox::tests: 71 passed, including the new test.
  • Local CI gate (tools/ci-local.sh --only all --linux-host --offload): to follow on this head.
  • End to end, unverified so far: a hidden shell from a warm checkout with a brand-new OCTOSENSE_HOME should log the six Makepad apps' prebuild steps in seconds, where before each compiled from scratch. I'll run it once the maintainer's demo window closes, because only one shell runs on the machine at a time, and report it here.

🤖 Generated with Claude Code

The six "source": "makepad" catalog apps (browser, files, finance,
route, image, pdf) built into <OctoSense home>/build/makepad, so every
new home (each test or demo profile) compiled all six again, minutes
each on a busy Mac, and kept its own 1.5-2 GB copy. They now build in
the checkout's own target dir, target/makepad ($CARGO_TARGET_DIR/makepad
when set), beside the native apps, which every home already shared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ymote
ymote merged commit 45edea3 into main Oct 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant