fix: SW cache URL paths, dapp name sanitisation, inbox version#13
Merged
eurobuddha merged 1 commit intomasterfrom Mar 23, 2026
Merged
fix: SW cache URL paths, dapp name sanitisation, inbox version#13eurobuddha merged 1 commit intomasterfrom
eurobuddha merged 1 commit intomasterfrom
Conversation
- sw.js: resolve all precache URLs relative to self.location (BASE) so cache keys match Minima's path-prefixed URLs (e.g. /minidapps/0x1a2b.../style.css). Old bare-path keys (/style.css) never matched prefixed requests — entire precache was silently inert. Also simplify NETWORK_ONLY check to use filename matching instead of pathname.endsWith(). - studio-builder.js: apply safeName() to shopName before writing to dapp.conf name field. Minima constrains this field to alphanumeric/hyphens/spaces — unsanitised names with special chars could cause node registration to fail. headline keeps the full display name. - studio-builder.js: bump inline INBOX_CONFIG version 1.0.0 → 1.1.0 to match the rest of the 1.1.0 release. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
Three fixes identified by code review:
sw.js: Precache URLs now resolved relative to
self.locationusingBASE = new URL('./', self.location).href. Previous bare paths (/style.css) were stored as origin-root URLs and never matched Minima's path-prefixed requests (/minidapps/0x.../style.css) — the entire precache was silently providing zero benefit. Also simplifiedNETWORK_ONLYcheck to filename matching (split('/').pop()) which is path-prefix agnostic.studio-builder.js:
safeName()now applied toshopNamebefore writing todapp.confnamefield. Minima constrains this field — special characters could cause node registration to fail. Theheadlinefield retains the full unsanitised display name.studio-builder.js: Inline
INBOX_CONFIGversion string bumped1.0.0→1.1.0to match the rest of the release.Test plan
(ServiceWorker)for static assets)config.jsandproducts.jsalways hit the networkMy Shop (Beta)) — confirm it installs successfully on Minima node🤖 Generated with Claude Code