Asset library: two entries, and scope library repos to the game that installed them - #45
Merged
Merged
Conversation
…installed them Adds Rapier (Apache-2.0) and three-stdlib (MIT) to the registry. Both are framework-agnostic and drop into plain three.js; use-cannon was rejected for the same reason it was proposed — it is React-Three-Fiber-only, has no LICENSE file at all, and was last pushed Feb 2024. Scopes the library the way Unity and Unreal do: browse globally, use locally. search_library was the one source taking no slug while search_local branched on it, so every game saw every repo as equally usable. Now: - hits carry `installed`, from this project's settings.assetRepos - `detail.url` appears only once the game has installed the repo. Repos are metadata-only pointers, so the url is the actionable payload — handing it out for an uninstalled repo let the agent build against something the project never took on - `detail.currentSettings` reports the game's tuned values. It previously returned catalogue defaults, so a game that set gravity to 0 still read -9.81 - uninstalled hits carry a hint pointing at asset_pick, which already was the "Add to Project" step and is unchanged Also fixes a card layout bug the new entries were the first to trigger: the grid card is a <button>, which centres its content box, so a card whose tags wrap to a second row overflowed top and bottom into overflow-hidden and its gradient header bled over the rounded corner. Measured 10px up-shift; flex column plus shrink-0 on the visual makes all cards align again. Known issue, not fixed here: with more than one registry entry, workflow.spec.ts:312 fails intermittently (7 of 12 runs; 0 of 7 at baseline). I instrumented the two obvious suspects and disproved both — the editor_bridge broadcast never lags and core-side editor tool calls never time out. Evidence points at a page.evaluate/page.reload race inside the spec itself rather than a product defect, but that is not proven and the spec is left untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YTKbJdRjJtAHEuLxkeFkm
duolahypercho
force-pushed
the
assets-library-scoping
branch
from
August 18, 2026 01:09
35a3e0c to
a49b09b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds two entries to the asset registry and scopes library repos per-project, the way Unity and Unreal do.
The entries
pmndrs/use-cannonwas the original suggestion and is rejected: it is React-Three-Fiber-only with no non-R3F entry point (this editor is raw three.js —grep -rl "@react-three" client/srcis empty), it has no LICENSE file at all (gh api repos/pmndrs/use-cannon/contents/LICENSE→ 404,.license→ null), and it was last pushed Feb 2024.Browse globally, use locally
search_librarywas the one source taking noslugwhile its siblingsearch_localcorrectly branched on it, so every game saw every repo as equally usable. That is the one place CaliCode diverged from the Unity/Unreal model:asset_catalogmanifest.jsonContent/asset_pickNow:
installed, read from this project'ssettings.assetReposdetail.urlonly once installed. Repos are metadata-only pointers, so the url is the actionable payload — handing it out for an uninstalled repo let the agent build against something the project never took on.detail.currentSettingsreports the game's tuned values. It previously returned catalogue defaults, so a game that set gravity to0still read-9.81. That was an outright bug.asset_pick, which already was the "Add to Project" step and is unchanged.Driven against a real core on a scratch port, two projects:
Card layout fix
three-stdlib is the first entry with enough tags to wrap, which exposed this: the grid card is a
<button>, and a bare button centres its content box. Content taller than the grid-stretched row overflowed top and bottom intooverflow-hidden, so the gradient header bled over the rounded corner.flex flex-colon the card plusshrink-0onRepoVisual— all three now measure identically.Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings, 888 Rust tests (+2 new) — run in a scratch worktree containing only this commit's changes, not the full working treenpx tsc -b --noEmit, 903 client testspnpm desktop:buildKnown issue — not fixed here
With more than one registry entry,
workflow.spec.ts:312fails intermittently: 7 of 12 runs with this change, 0 of 7 at baseline.I instrumented the two obvious suspects and disproved both: the
editor_bridgebroadcast never lags (Laggedcount 0 across failing runs) and core-side editor tool calls never time out. Evidence points at apage.evaluate/page.reload()race inside the spec itself rather than a product defect — but that is not proven, and the spec is deliberately left untouched rather than edited until it passes.🤖 Generated with Claude Code
https://claude.ai/code/session_014YTKbJdRjJtAHEuLxkeFkm