739 Commits
Author SHA1 Message Date
raucao ab6ce2c391 Merge branch 'master' into kosmos
# Conflicts:
#	release/assets/main-BuQidADV.js
#	release/assets/main-DHeKkWql.js
#	release/assets/main-DQPHLy1R.js
#	release/assets/modules-4-12-CLqbt60f.js
#	release/assets/modules-4-12-CgKFWrC7.js
#	release/assets/modules-4-12-Dmst9KUg.js
#	release/index.html
2026-12-01 10:58:19 +04:00
raucao c01aa74eb5 1.40.1
CI / Lint (push) Successful in 1m29s
CI / Test (push) Successful in 1m57s
v1.40.1
2026-12-01 10:57:50 +04:00
raucao 4a8080a41a Make sync-kosmos.sh complete
CI / Lint (push) Canceled after 1m8s
CI / Test (push) Canceled after 0s
2026-12-01 10:56:43 +04:00
raucao 6c7abec4ec Merge pull request 'Fix detail issues in the stacked mobile bottom drawers' (#142) from bugfix/stacked_drawer_details into master
CI / Lint (push) Canceled after 50s
CI / Test (push) Canceled after 50s
Reviewed-on: #142
2026-12-01 06:56:26 +00:00
raucao 76067e011d Fix detail issues in the stacked mobile bottom drawers
Release Drafter / Update release notes draft (pull_request) Successful in 48s
CI / Lint (pull_request) Successful in 1m42s
CI / Test (pull_request) Successful in 2m5s
- Place details header now keeps the same top gap as the standard 56px
  drawer header, so the place name is not crammed against the drag handle.
- Read the sheet inset untracked in the map's pin/center helpers so
  updateSelectedPin no longer re-runs on every drag frame. This stops the
  selected marker from jittering while a drawer is dragged.
- Re-center the selected place in the resized visible area when a drawer
  settles at a new detent, and pan it clear of the sheet on a same-size
  settle (restores the auto-pan that untracking removed).
- Commit the sheet's hidden position with the transform transition
  disabled so the entrance animates from fully hidden and slides up,
  instead of shrinking down from the top.
- Add acceptance tests for the header gap, the per-frame pin recompute,
  and the settle recenter/pan behaviour.
2026-12-01 10:45:47 +04:00
raucao bae3a5be23 Merge branch 'master' into kosmos
# Conflicts:
#	release/assets/main-bPhej5rb.js
#	release/assets/modules-4-12-CLqbt60f.js
#	release/assets/modules-4-12-CRUhRJ4U.js
#	release/assets/modules-4-12-D9tfwD7l.js
#	release/index.html
2026-11-30 23:26:15 +04:00
raucao 26c3f0b427 1.40.0
CI / Lint (push) Successful in 1m2s
CI / Test (push) Successful in 1m32s
v1.40.0
2026-11-30 22:58:02 +04:00
raucao e6e33ba2d2 Merge pull request 'Add a swipeable, stacked mobile bottom drawer' (#141) from feature/bottom_drawer_swiping into master
CI / Lint (push) Successful in 54s
CI / Test (push) Successful in 1m24s
Reviewed-on: #141
2026-11-30 14:29:38 +00:00
raucao 64d26951d4 Extend the expanded mobile sheet up to the search field
CI / Lint (pull_request) Successful in 56s
CI / Test (pull_request) Successful in 1m27s
Release Drafter / Update release notes draft (pull_request) Successful in 16s
The tallest detent now fills the viewport down from the top of the search
field, so a fully expanded sheet covers the search field and avatar while
leaving that little strip visible above.

- DETENT_FRACTIONS.expanded is now the whole sheet; the sheet height is the
  viewport minus a top gap (replacing the 0.92 fraction cap).
- The modifier measures that gap from the search field, relative to the sheet's
  container (the viewport top is not the app's top), falling back to 8px.
- Update the sheet-detents unit test and read the real --sheet-height in the
  stacked-sheets acceptance test.
2026-11-30 18:08:02 +04:00
raucao fabf2ffa50 WIP: Keep mobile place selection centered
The map centering helpers gated their mobile branch on `sheetInsetPx > 0`,
but the inset is published on a deferred animation frame and is briefly 0
during a sheet-to-sheet transition. On mobile that skipped the mobile branch
and fell into the desktop sidebar branch, which shifts the map center left to
make room for the sidebar and pushed the selected pin to the right edge.

Make the mobile and desktop branches mutually exclusive by viewport so the
desktop logic can never run on mobile; with a 0 inset the mobile math is a
no-op and the existing sheet-snap re-pan corrects the vertical position once
the sheet publishes its height.
2026-11-30 17:49:20 +04:00
raucao 0e099972f6 WIP: Rework drawer headers and sheet scrolling
Drawer headers: a shared DrawerHeader component renders the desktop nav-bar
layout (back + centered title + close) and a mobile variant (left title, no
back button, a single X that dismisses the top sheet — back when there is a
parent, otherwise close). Place details uses the place name as its title with
a compact, borderless header, and on mobile moves the photos below the place
type. The X and back buttons now have aria-labels.

Sheet scrolling: the content only scrolls while the sheet is at its largest
detent; below that, dragging anywhere on the sheet (including list rows and
links, not just the header) resizes it. At the largest detent, pulling down on
the content while it is scrolled to the top shrinks the sheet (overscroll to
shrink).

Place details opens at the medium detent again. The mobile photo carousel no
longer bleeds to the sheet edges, gets a wider gap and the same corner radius
as the action buttons.
2026-11-30 17:38:35 +04:00
raucao 5c7d5d6de0 WIP: Per-sheet drawer heights and minimized background sheets
Give each bottom sheet its own default height and remember the size the
user drags it to, per sheet, so one sheet's height no longer leaks into the
next.

- App menu now opens at the medium detent instead of near-full-screen.
- Place details opens at the short (collapsed) detent; the results and list
  sheets stay at medium.
- Detent memory is keyed by route (map-ui.sheetDetents) instead of one
  shared slot, and the `detent` arg is authoritative on mount.
- Background (parent) sheets are pinned to the minimum reachable detent on
  mount and on viewport changes, so they can never peek above the top sheet
  no matter how short it is. They still never write the detent memory.
2026-11-30 15:43:15 +04:00
raucao c56917e122 WIP: Stack parent sheets behind the mobile bottom drawer
Derive the sheet stack from the URL instead of mutating it: the route
template keeps rendering the top sheet, and application.gjs renders the
service-driven parent (search results, lists index, app menu) behind it on
mobile, inert, so closing the top sheet reveals the parent at its
remembered size.

- bottom-sheet modifier: `background` arg — background instances settle
  immediately, inject no handle, take no gestures, never own the inset slot,
  and never write the remembered detent (restore-only).
- z-index: demote background sheets below the top sheet, including the app
  menu whose desktop z-index was inverted.
- outside tap on mobile pops to the parent without hideSidebar(), keeping
  the session and detent alive; desktop keeps today's close-all.
- tracked matchMedia-backed viewport service for the mobile breakpoint.
- lists index extracted into a component so it can render top or background.
- scope .sidebar-content lookups and test selectors to .sheet-top.

Known v1 limitation: popping hard-cuts to the parent route (no exit
animation). The full derived stack with independent detents for 3-level
chains is deferred.
2026-11-30 15:17:20 +04:00
raucao 97eddbf3d3 Add swipe-to-resize mobile bottom drawer
Mobile sheets (search results, place details, lists, menu, contributions,
activity, new place) become draggable bottom sheets with three detents
(collapsed / medium / expanded), fling-snapping, and swipe-down-to-dismiss.
The sheet is transform-based and content never reflows while dragging.

The map, crosshair, and pin-centering react to the live covered height through
mapUi.sheetInsetPx, replacing the old hardcoded "bottom 50%" assumptions.

Also fixes a backtracking crash that made the drawer disappear when opening a
place from search results: the modifier no longer writes tracked service state
during render. Writes are coalesced into an animation-frame flush and gated by
an ownership token, so a stale sheet can't corrupt the inset.
2026-11-30 14:42:54 +04:00
raucao 322262ea53 Merge pull request 'Open the gallery on a shared place photo link' (#139) from feature/photo_links into master
CI / Lint (push) Successful in 1m5s
CI / Test (push) Successful in 1m34s
Reviewed-on: #139
2026-11-30 09:05:38 +00:00
raucao bb05e7fa43 Re-align the photo carousel when the list changes under it
CI / Lint (pull_request) Successful in 1m15s
CI / Test (pull_request) Successful in 1m46s
Release Drafter / Update release notes draft (pull_request) Successful in 18s
On a cold cache the gallery opened on the linked photo, but the large main
view showed the place's first photo. The gallery opens as soon as the linked
event is in the store, then the remaining photos stream in and
parsePlacePhotos promotes the first landscape to index 0, shifting the linked
photo's offset. scrollToNewPhoto only re-ran when the focused event changed,
so the track stayed at the old offset while the thumbnail highlight (driven by
the template, not the scroll position) looked correct.

Re-align to the focused slide when the photo set changes, keyed by the joined
event ids so it only fires on a genuine add/remove/reorder. The re-align is
deferred with requestAnimationFrame so the DOM has updated, and setupCarousel
re-observes the slides the same way so the intersection observer keeps
tracking them.
2026-11-30 13:02:08 +04:00
raucao a2bda44a65 Open the gallery on a shared place photo link
CI / Lint (pull_request) Successful in 59s
CI / Test (pull_request) Successful in 1m33s
The /e/:event_id route redirected to the place with a `photo` query param,
but that only scrolled the inline carousel. It now opens the gallery modal,
focused on the linked photo.

The photo list loads asynchronously (cache first, then relays) and more
photos can arrive while the gallery is open, so the auto-open waits for the
linked photo, opens exactly once, and keeps focus on the same event id.
A manual open or close consumes the pending link so a late-arriving photo
cannot reopen or hijack the gallery the user is looking at.

When the linked photo is hidden as untrusted, following the link reveals all
untrusted photos by that author for the current place. The reveal is
place-scoped and cleared when the place changes, so it never leaks into
other places, and other authors' hidden photos stay hidden.
2026-11-30 12:12:48 +04:00
raucao 7dbdb035f7 Merge branch 'master' into kosmos
# Conflicts:
#	release/assets/main-BHr2t0K0.js
#	release/assets/modules-4-12-C5tGRFkG.js
#	release/assets/modules-4-12-CRUhRJ4U.js
#	release/assets/modules-4-12-DRDkPElI.js
#	release/index.html
2026-11-29 17:42:37 +04:00
raucao 1227d27b60 1.39.0
CI / Lint (push) Successful in 55s
CI / Test (push) Successful in 1m10s
v1.39.0
2026-11-29 17:37:42 +04:00
raucao 36bfc54e6c Merge pull request 'Copy photo event IDs reliably, add "Copy share link"' (#138) from copy-photo-id into master
CI / Lint (push) Successful in 54s
CI / Test (push) Successful in 1m22s
Reviewed-on: #138
2026-11-29 13:35:06 +00:00
raucao 543d810ab2 Remove the unused canUseClipboard helper
CI / Lint (pull_request) Successful in 55s
CI / Test (pull_request) Successful in 1m22s
Release Drafter / Update release notes draft (pull_request) Successful in 15s
canCopyText covers the same capability checks and is the one the app actually uses.
2026-11-29 17:31:45 +04:00
raucao 731c9d6def Merge pull request 'Default to the BTC Map Overpass provider' (#137) from chore/overpass_default into master
CI / Lint (push) Successful in 55s
CI / Test (push) Successful in 1m26s
Reviewed-on: #137
2026-11-29 13:30:28 +00:00
raucao 47830f7224 Add a Copy share link action to the photo gallery
CI / Lint (pull_request) Successful in 48s
CI / Test (pull_request) Successful in 1m10s
The new menu item copies an absolute <origin>/e/<nevent> link. The /e/ route resolves the event from relays, reads its i tag and opens the place with the photo focused, so recipients land directly on the photo in Marco.

Extract the nevent-building logic into buildEventReference() so the raw event ID copy and the share link share one implementation, and use sentence case for the menu labels.
2026-11-29 17:27:17 +04:00
raucao 3a9ddea010 Default to BTC Map Overpass provider
CI / Lint (pull_request) Successful in 57s
CI / Test (pull_request) Successful in 1m32s
Release Drafter / Update release notes draft (pull_request) Successful in 16s
Switch the default Overpass API provider to overpass.btcmap.org and
migrate users still on the previous overpass-api.de default over once.
2026-11-29 17:27:11 +04:00
raucao d8365b4ce6 Copy via the shared clipboard helper and keep the gallery open
The photo event ID button called navigator.clipboard.writeText directly, so copying failed on insecure origins where that API is unavailable. Route it (and the invoice and connection-link copies) through app/utils/share.js copyText, which falls back to execCommand.

copyEventId also never stopped the click from bubbling. Because closeMenu() runs after an await, the dropdown unmounted before the event reached the overlay's background-click handler, whose detached-target check then closed the gallery. Stop propagation synchronously like the zap and delete actions.
2026-11-29 17:20:07 +04:00
raucao 42ccad158d Merge pull request 'Improve README, move development info to new doc' (#136) from doc/readme into master
CI / Lint (push) Successful in 54s
CI / Test (push) Successful in 1m13s
Reviewed-on: #136
2026-11-29 12:43:28 +00:00
raucao 698942b29d Update README
CI / Lint (pull_request) Successful in 57s
CI / Test (pull_request) Successful in 1m27s
Release Drafter / Update release notes draft (pull_request) Successful in 43s
2026-11-29 16:41:46 +04:00
raucao 6ed067a973 Mention PWA installation and mark the kosmos deployment legacy
CI / Lint (pull_request) Successful in 57s
CI / Test (pull_request) Canceled after 1m26s
2026-11-29 16:40:23 +04:00
raucao 06c2849d6c Improve README, move development info to new doc
CI / Lint (pull_request) Successful in 57s
CI / Test (pull_request) Successful in 1m27s
2026-11-29 16:36:23 +04:00
raucao 4949df2d54 Merge branch 'master' into kosmos
# Conflicts:
#	release/assets/main-BD5lfqyM.js
#	release/assets/modules-4-12-DPYeIi5w.js
#	release/assets/modules-4-12-DRDkPElI.js
#	release/assets/modules-4-12-Dqxw6E4Q.js
#	release/index.html
2026-11-28 21:49:30 +04:00
raucao 62f6920b31 1.38.0
CI / Lint (push) Successful in 52s
CI / Test (push) Successful in 1m22s
v1.38.0
2026-11-28 21:48:23 +04:00
raucao 723085cd43 Merge pull request 'Open Nostr event links from the search field' (#134) from feature/nostr_search into master
CI / Lint (push) Successful in 54s
CI / Test (push) Successful in 1m25s
Reviewed-on: #134
2026-11-28 16:36:54 +00:00
raucao ad19c32719 Make the Nostr cancel test deterministic
CI / Lint (pull_request) Successful in 53s
CI / Test (pull_request) Successful in 58s
Release Drafter / Update release notes draft (pull_request) Successful in 15s
The test's mock resolved on a fixed 200ms timer, racing the ~200ms
window between the spinner appearing and the lookup completing. On a
slower CI browser the lookup finished (and toasted) before the query
was shortened, so the assertion failed. Hold the lookup open with a
manually released promise so it is always pending when the query is
shortened.
2026-11-28 19:46:35 +04:00
raucao 84d21fd1ed Merge pull request 'Open signer apps on desktop, log out remote signers via NIP-46' (#135) from feature/remote_signers_everywhere into master
CI / Lint (push) Successful in 51s
CI / Test (push) Successful in 1m21s
Reviewed-on: #135
2026-11-28 15:41:53 +00:00
raucao f6e3bae0d1 Send a NIP-46 logout when disconnecting a remote signer
CI / Lint (pull_request) Successful in 56s
CI / Test (pull_request) Successful in 1m19s
Release Drafter / Update release notes draft (pull_request) Successful in 15s
disconnect() now clears the local state and the stored client keypair
first, then asks the remote signer to drop the session with a NIP-46
logout request (via applesauce's NostrConnectSigner.logout()). The
request is a courtesy hint, so a failure is only logged and never blocks
the local disconnect.

Extension signers still just close their connection.

Refs #125
2026-11-28 19:38:09 +04:00
raucao bba9a2a444 Open Nostr event links from the search field
CI / Lint (pull_request) Successful in 57s
CI / Test (pull_request) Failing after 1m9s
The full-text search field now detects anything the /e/ handler can open
(raw 64-hex ids, note1/nevent1/naddr1 codes, nostr: URIs, kind:pubkey:d
coordinates and permalinks) and opens it instead of running a Photon or
bookmark search.

As-you-type, a pasted reference resolves through the event store while the
field shows a spinner and the popover offers a single row labelled by kind
("Place photo" / "Place review", or a generic "Nostr event"). A reference
that cannot be found shows the usual not-found toast, and an unlinked event
is flagged as such. Submitting a reference, and direct /search?q=<ref>
links, route straight to the /e/ handler.
2026-11-28 19:36:02 +04:00
raucao a6b931ec24 Open signer apps from any device and detect failed launches
Offer the nostrconnect:// link on desktop too, instead of only on mobile,
and stop calling it a mobile-only signer.

The connect modal now shows an "Open signer app" link on every device,
alongside "Copy connection link" and a "Show QR code" toggle (hidden by
default). When the link is used, watch for the signer app taking over the
page and otherwise reveal a hint pointing at the QR code and copy link.

The mobile-only auto-redirect is gone; launching now happens through the
explicit button on all platforms.

Refs #127
2026-11-28 19:24:48 +04:00
raucao 3c8ddf9286 Merge branch 'master' into kosmos
# Conflicts:
#	release/assets/main-B-1wPM4A.js
#	release/assets/modules-4-12-CvJU34cM.js
#	release/assets/modules-4-12-DPYeIi5w.js
#	release/assets/modules-4-12-DWN9ffW9.js
#	release/index.html
2026-11-28 18:15:10 +04:00
raucao 487e0c6ea3 1.37.0
CI / Lint (push) Successful in 54s
CI / Test (push) Successful in 1m15s
v1.37.0
2026-11-28 18:14:37 +04:00
raucao d0275918b3 Merge pull request 'Add NIP-89 app handler docs and Nostr publishing scripts' (#132) from feature/nip-89 into master
CI / Lint (push) Successful in 53s
CI / Test (push) Successful in 1m13s
Reviewed-on: #132
2026-11-28 14:09:37 +00:00
raucao fc9f496416 Add the NIP-89 client tag to published events
CI / Lint (pull_request) Successful in 59s
CI / Test (pull_request) Successful in 1m21s
Release Drafter / Update release notes draft (pull_request) Successful in 16s
Tag published photos (kind 360), deletions (kind 5) and zap requests
(kind 9734) with ["client","Marco","31990:1f79058c…:marco.earth","wss://nostr.kosmos.org/"]
so clients can attribute them to Marco. Uses applesauce's EventFactory
clientTag via a shared app/utils/client-tag helper.
2026-11-28 18:04:08 +04:00
raucao f554a04def Update the app handler description
Use the same about text as the app's kind-0 profile: "Unhosted maps app, enhancing OpenStreetMap with decentralized user data and content".
2026-11-28 17:51:48 +04:00
raucao c30e8cee72 Add NIP-05, category tags and the ngit repo to the app handler
CI / Lint (pull_request) Successful in 55s
CI / Test (pull_request) Failing after 1m16s
Set content.nip05 (marco@kosmos.org), a ["t","maps"] category tag, and a
kind-30617 `a` tag linking the ngit repository — the three fields NostrHub's
app listing reads. Add the values as config in scripts/nostr-common.sh.
2026-11-28 17:50:35 +04:00
raucao 38ca6ba296 Publish the app handler under the author's npub
CI / Lint (pull_request) Successful in 51s
CI / Test (pull_request) Successful in 1m11s
Move the handler identity from the dedicated app key to the author's own
npub (the same key that authors the NIP specs), and add
scripts/unpublish-app-handler.sh to delete an old handler via a NIP-09
kind-5 event. Document the identity and the retirement flow.
2026-11-28 17:33:53 +04:00
raucao 5300cc1dc8 Remove paid relay from default list
CI / Lint (pull_request) Successful in 52s
CI / Test (pull_request) Successful in 1m11s
2026-11-28 17:24:15 +04:00
raucao ba804fa69b Advertise implemented NIPs in the NIP-89 app handler
CI / Lint (pull_request) Successful in 52s
CI / Test (pull_request) Successful in 1m14s
Add NIP references to Marco's kind 31990: an `i` tag per implemented
official NIP and an `a` tag for Marco's own kind-30817 Place Photos NIP,
shaped the way NostrHub's app directory reads them.

Also fix the stale note about the /e/ route being planned; it is
implemented.
2026-11-28 17:14:02 +04:00
raucao ba782b7f57 Merge pull request 'Open places and their photo from shared event links' (#131) from feature/nip-89-app-handler into master
CI / Lint (push) Successful in 55s
CI / Test (push) Successful in 1m15s
Reviewed-on: #131
2026-11-28 10:08:10 +00:00
raucao 4d5e36f4f8 Open places and their photo from shared event links
CI / Lint (pull_request) Successful in 52s
CI / Test (pull_request) Successful in 1m13s
Release Drafter / Update release notes draft (pull_request) Successful in 14s
Add an /e/:event_id route that resolves a NIP-19 event reference (nevent
with relay hints, note, naddr, raw hex id, an optional nostr: prefix, or a
full permalink) to the event, reads its i tag and opens the place. When the
event is a place photo, focus it in the place details carousel via a
?photo= query param.

Also keep the selected place's photo subscription open instead of completing
on the first relay's EOSE, so photos that live on a slower relay are no
longer dropped (the submission relay holds only a subset).
2026-11-28 13:49:58 +04:00
raucao d62340c3b1 Note the /e/ handler and photo focus in the NIP-89 app handler doc
CI / Lint (pull_request) Successful in 52s
CI / Test (pull_request) Successful in 1m3s
2026-11-28 13:49:48 +04:00
raucao 2fce1f532e Add NIP-89 app handler docs and Nostr publishing scripts
Document Marco's NIP-89 app handler (kind 31990) and recommendation
(kind 31989), and how the place NIPs are published on Nostr as kind 30817
custom NIPs.

Add shell scripts that build and publish these events via nak: the app
handler, a recommendation, and the NIP specs. The publishing relay list
lives in scripts/nostr-relays.txt for easy editing. Signing requires an
explicit NOSTR_SECRET_KEY (nsec or NIP-46 bunker URL), and the scripts
refuse to publish from the wrong identity.
2026-11-28 12:39:28 +04:00