From 2772773d6d1b214eaf435f56e439ef8ec56b9bed Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 22 Nov 2026 09:57:40 -0700 Subject: v3.coinos.io/hats opens the hat shop. "Someone in the coinos group is asking where to get hats. Can we make the hat shop have a linkable url like v3.coinos.io/hats that I can direct him to?" (Adam, 2026-11-22). The shop was a screen with no address, reached from the profile editor or the About page. The /hats path now opens it once a wallet is up; someone who arrives with no wallet gets the way in first and the shop when the wallet is made. The address bar says /hats for as long as the shop is on screen, so the link can be copied from there, and goes back to / when the shop is left. New hats-link-test passes (no wallet, with a wallet, the bar, leaving); features-smoke passes. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_01VMan6Upic5L6MMJzkTn8zg --- src/app.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 61e2342..0337bd7 100644 --- a/src/app.js +++ b/src/app.js @@ -984,7 +984,7 @@ let restoringHistory = false; // true while applying a popstate (suppresses push // copy it, send it, reload it — the same paths the deep links already open. // Every other screen keeps whatever path it had (the till at /pos, the // plain app at /); only a path we set ourselves is taken back to /. -const OWN_PATH = /^\/(nevent|note|npub|naddr)1[a-z0-9]+\/?$/i; +const OWN_PATH = /^\/((nevent|note|npub|naddr)1[a-z0-9]+|hats)\/?$/i; function navUrl(snap) { try { const fp = featureHook('navPath', snap); // a feed with a public address @@ -7215,6 +7215,10 @@ const BOOT_POS = (() => { } catch { return false; } })(); if (BOOT_POS) ui.posAtBoot = true; +// v3.coinos.io/hats: the hat shop, a link to hand someone who asks where +// the hats are. Opened once a wallet is up (the hats feature's init); the +// bar says /hats while the shop is on screen, so it can be copied from there. +try { if (/^\/hats\/?$/i.test(location.pathname)) ui.hatsAtBoot = true; } catch {} // v3.coinos.io/migrate: a link to hand someone who hasn't found the // coinos.io move in the UI. Stashed (not just flagged) because the page it // leads to needs an open wallet and a payment address — a fresh device gets -- cgit v1.2.3