Skip to content

feat(build): a bundled Credits.html feeds the macOS About panel - #37

Merged
tarwin merged 2 commits into
tarwin:mainfrom
slabbdev:fix/about-credits-html
Oct 5, 2026
Merged

tarwin merged 2 commits into
tarwin:mainfrom
slabbdev:fix/about-credits-html

Conversation

@slabbdev

@slabbdev slabbdev commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Split from the #8 design discussion — the one piece that needs no new API.

The bug: AppKit's standard About panel shows Resources/Credits.html only when the options dictionary carries no Credits key. The launcher always passed one ("Made with tinyjs — https://tinyjs.app"), shadowing the macOS convention for every app — @Blatman hit it in #8 and worked around it with a rebuilt launcher.

The fix, two halves:

  • tinyjs build copies a project-root Credits.html to Contents/Resources/ when present (same convention-over-configuration pattern as icon.png).
  • The launcher omits the hardcoded Credits key when the main bundle has a Credits.html, so AppKit's default behavior takes over. Without one, the tinyjs credit stays — zero change for existing apps.

Verified: launcher compiles; a project with Credits.html builds with the file in Contents/Resources/ and passes codesign --verify --strict; a project without builds byte-for-byte as before. The panel itself follows documented AppKit semantics and matches what @Blatman confirmed with his rebuild — a visual glance on your side closes it.

macOS-only; Windows/Linux untouched.

…in#8)

AppKit shows Resources/Credits.html in the standard About panel only
when the options dictionary carries no Credits key — and the launcher
always passed one ("Made with tinyjs"), shadowing the macOS convention
for every app. When the project ships a Credits.html, the build now
copies it to Resources/ and the launcher omits the hardcoded key, so
the default macOS behavior takes over; without one, nothing changes
(the tinyjs credit stays).

Requested in tarwin#8 (Credits.html + Resources-root files were the one case
the sidecar discussion surfaced that needed no new API — convention
over configuration). Reported as a working hack by @Blatman via a
rebuilt launcher; this lands it properly.

Verified: launcher compiles; a project with Credits.html builds with
the file in Contents/Resources/ and passes codesign --verify --strict;
a project without builds exactly as before. The About panel's visual
behavior follows documented AppKit semantics (no Credits key →
Credits.html) — same result @Blatman confirmed with his rebuild.
tarwin#8 review: the tinyjs credit line was hardcoded, which blocks
white-labeled apps that don't ship a Credits.html. The manifest
"attribution" string (dev via TINYJS_ATTRIBUTION env, packaged via the
TinyjsAttribution plist key, the same dual path as TinyjsUserAgent)
replaces it. Precedence: bundled Credits.html → attribution → the
tinyjs default; existing apps change nothing.

README documents the chain in the About section.
@slabbdev

slabbdev commented Oct 4, 2026

Copy link
Copy Markdown
Contributor Author

Adopting @Blatman's suggestion from #8: the manifest now takes "attribution": "…" — it replaces the hardcoded tinyjs credit line in the About panel, for apps that don't ship a Credits.html.

Precedence: bundled Credits.html → "attribution" → the tinyjs default. Plumbing follows the established dual path: dev carries it in TINYJS_ATTRIBUTION env, packaged apps get a TinyjsAttribution Info.plist key from tinyjs build (LaunchServices starts the launcher, so env alone can't reach it).

Verified: launcher recompiles, and a build with "attribution": "Built by Sam — ACME Inc" lands the key in the packaged Info.plist (with no Credits.html in Resources, exactly as configured).

tarwin added a commit that referenced this pull request Oct 5, 2026
@tarwin
tarwin merged commit 8ab19f8 into tarwin:main Oct 5, 2026
@tarwin

tarwin commented Oct 5, 2026

Copy link
Copy Markdown
Owner

Thanks @slabbdev. Merged: a bundled Credits.html shows in the About panel, checked on a built app. It'll go out in the next release.

tarwin added a commit that referenced this pull request Oct 5, 2026
tarwin added a commit that referenced this pull request Oct 5, 2026
tarwin added a commit that referenced this pull request Oct 5, 2026
tarwin added a commit that referenced this pull request Oct 5, 2026
…check, root backend entry (#37, #41)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@slabbdev
slabbdev deleted the fix/about-credits-html branch October 6, 2026 15:01
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.

2 participants