Skip to content

Show each scene's credits in the viewer's About dialog - #185

Merged
ttktjmt merged 6 commits into
mainfrom
claude/vibrant-bardeen-0ygup4
Oct 28, 2026
Merged

ttktjmt merged 6 commits into
mainfrom
claude/vibrant-bardeen-0ygup4

Conversation

@ttktjmt

@ttktjmt ttktjmt commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Closes #181.

The build writes a scene's third-party LICENSE.<component> / NOTICE.<component> files beside it (ADR 0007), but the SPA showed none of them, and a static host lists no directory for it to look in.

Manifest

  • A project gets work (its own LICENSE / NOTICE, relative to <project-id>/) and a scene gets credits (one entry per component, relative to the scene directory). Each license file is identified at build time: spdx, restriction, and its copyright line.
  • A .glb skin's skin-<id> component carries skin: <id>; a VRM skin gets a vrm summary of its own meta (name, authors, license, other license URL). The file itself is bundled unmodified.
  • Both keys are optional and an older engine ignores them, so format stays 7. A build without license files writes the same manifest as before.
  • mjswan.license.copyright_line reads a license text's holder line, skipping template placeholders (Apache-2.0's appendix) and empty holders.

Viewer

  • The About dialog gets two tabs. About keeps GitHub, Documentation, Platform and the contributors. Credits lists each component by its ID with an SPDX badge (and a restriction badge), its NOTICE in full, and its license text on demand; every skin of the scene, the one on screen first; the work's own license; and, last, the engine's own (LICENSE on demand, a link to THIRD_PARTY_LICENSES.md), so the tab is there for every scene. Texts are fetched when the tab opens or the License button is pressed.
  • I opens and closes the About dialog, also with the panel hidden (?panel=0). The panel's logo gets a hover background; its tooltip is unchanged.
  • The About tagline now reads "MuJoco Simulation on WebAssembly with Neural networks" (it said "Web Assembly" and "netwroks").
  • mjswan/manifest exposes SceneEntry.credits and ProjectCatalog.work, so a host with its own UI can show them.

Follow-ups

  • mjswan Cloud: ttktjmt/mjswan-cloud#114. Cloud ADR 0014 rejected a file list in the manifest because a license file corrected after publish would leave it stale; the issue asks Cloud to accept the keys and keep its license_files row as the source of truth.
  • ADR 0007 still says the manifest is unchanged; no ADR was written for this change.

Testing

On the branch with #184 and #186 merged in:

  • uv run pytest -m "not slow": 1178 passed. New tests cover copyright_line, the manifest listing exactly the files written, work, no keys without license files, and the skin entries (VRM 1.0, VRM 0.x, .glb).
  • npx vitest run: 887 passed, including the catalog's credits / work and lazy text loading.
  • ruff, tsc --noEmit, eslint src/: clean. ty and pyright report only existing diagnostics in files this change does not touch.
  • Built a sample app with the SPA and drove it in Chromium: I opens About with and without ?panel=0, the Credits tab lists components, skins (on screen first), the work and the engine, License expands the full text (the engine's included), and the logo hover shows.

🤖 Generated with Claude Code

https://claude.ai/code/session_012oiM38cKjSAd9Bmn4Mwgiv

The build writes a scene's third-party LICENSE / NOTICE files beside it, but a static
host lists no directory, so the SPA had no way to find them. The manifest now names
them: a project's `work` and a scene's `credits`, each file identified at build time
(`spdx`, `restriction`, the `copyright` line) and each VRM skin's `meta` summarised.
Both keys are optional and an older engine ignores them, so `format` stays 7.

The About dialog gains a Credits tab for the scene in view: each component with its
license, its NOTICE in full and the license text on demand, every skin of the scene
with the one on screen first, and the work's own license. The About tab links the
engine's LICENSE and THIRD_PARTY_LICENSES.md. `I` opens the dialog, also with the panel
hidden, and the panel's logo shows a hover background. `mjswan/manifest` exposes the
lists as `SceneEntry.credits` and `ProjectCatalog.work` for hosts with their own UI.

Closes #181

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012oiM38cKjSAd9Bmn4Mwgiv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012oiM38cKjSAd9Bmn4Mwgiv
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Deploying mjswan with  Cloudflare Pages  Cloudflare Pages

Latest commit: ee2ab89
Status:⚡️  Build in progress...

View logs

The About tab keeps GitHub, Documentation and Platform. The engine's LICENSE (shown on
demand like the others) and THIRD_PARTY_LICENSES.md move to a closing "mjswan" group of
the Credits tab, which is now always there, so a scene without credits still reaches them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012oiM38cKjSAd9Bmn4Mwgiv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012oiM38cKjSAd9Bmn4Mwgiv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012oiM38cKjSAd9Bmn4Mwgiv
@ttktjmt
ttktjmt merged commit 026607d into main Oct 28, 2026
6 checks passed
@ttktjmt
ttktjmt deleted the claude/vibrant-bardeen-0ygup4 branch October 28, 2026 17:18
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.

Show each scene's credits (LICENSE / NOTICE) in the viewer

2 participants