281 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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 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 6b37db7d42 Speed up photo processing without noticeable quality loss
CI / Lint (pull_request) Successful in 54s
CI / Test (pull_request) Successful in 1m14s
Release Drafter / Update release notes draft (pull_request) Successful in 17s
Photo processing was slow on most devices because blurhash was encoded
from the full-resolution image, the original file was decoded up to five
times, and the Android fallback path skipped native resizing.

- Encode blurhash from a <=64px canvas instead of full resolution
- Process main image, thumbnail and blurhash in a single worker pass,
  decoding the original only once and deriving the thumbnail from the
  resized main image
- Retry createImageBitmap via an in-memory Blob before falling back to
  stepped software scaling, and validate the browser honored the resize
- Avoid the redundant full-resolution canvas and release intermediate
  canvases during stepped scaling
- Swap the preview to the processed thumbnail and decode it async
- Lower main image JPEG quality to 0.85

Adds unit tests for the image-processor service and documents the design
in doc/dev/photo-upload-performance.md.
2026-11-28 02:52:57 +04:00
raucao 748bc626a8 Publish and consume x tags on kind 360 place photos
CI / Lint (pull_request) Successful in 59s
CI / Test (pull_request) Successful in 1m24s
Release Drafter / Update release notes draft (pull_request) Successful in 16s
Emit top-level x tags for the primary media and thumbnail SHA-256 hashes (with the primary also inside imeta) when publishing. Parsed photos expose the hash set, and photo deletion prefers it over extracting hashes from Blossom URLs, keeping URL extraction as a fallback for legacy events.
2026-11-27 19:23:16 +04:00
raucao 9a5517012c Fix activity feed first load, sender names, and infinite scroll
- Treat contacts as loaded only once the kind 3 event exists, so the first
  home window is fetched with the follow list, and re-fetch the initial window
  when contacts arrive late.
- Resolve sender kind 0 profiles from the user's relays and the content's
  origin relays, and retry unresolved senders after the first load.
- Auto-load older pages while the end sentinel stays visible via a service-side
  loop, guarded by hasMore and a fetch lock, with an epoch token so a mode
  switch invalidates in-flight fetches.
- Deduplicate zap entries across window re-fetches.
2026-11-17 00:31:06 +04:00
raucao 509fc08268 Move edit action into the saved-places dropdown
CI / Lint (pull_request) Successful in 51s
CI / Test (pull_request) Successful in 1m9s
Release Drafter / Update release notes draft (pull_request) Successful in 41s
The edit form only changes the saved entry's title and description, not the
OSM data, so surface it under the Save dropdown as "Edit saved place"
instead of a standalone action button.

This also keeps the actions row to Save and Share with even padding, so the
earlier equal-width row layout is no longer needed.
2026-11-16 13:01:11 +04:00
raucao 53b5c2d2a4 Add place sharing via Web Share API and Marco link
CI / Lint (pull_request) Successful in 54s
CI / Test (pull_request) Failing after 1m11s
Add a Share button to the place details actions row. On systems with the
Web Share API it opens the native share sheet; everywhere else it opens a
small fallback menu offering "Copy link" and "Copy coordinates".

- OSM places share the public Marco place URL plus the name and
  coordinates; custom places share name and coordinates only, since their
  internal id is private and their Marco URL would not resolve for others
- No external map links; copy falls back to document.execCommand so the
  feature keeps working on non-secure origins
- The button is hidden while editing and when there is nothing to share
2026-11-16 12:30:48 +04:00
raucao bf09101a24 Move operator info to the bottom of its section
CI / Lint (push) Successful in 1m6s
CI / Test (push) Successful in 1m26s
2026-09-25 16:22:54 +02:00
raucao b9103b28a9 Add operator info to place details
CI / Lint (pull_request) Successful in 1m5s
CI / Test (pull_request) Successful in 1m23s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
2026-09-24 19:02:27 +02:00
raucao faea3d26cd Use nevent with relay hints for copying photo event ID
CI / Lint (pull_request) Successful in 47s
CI / Test (pull_request) Successful in 1m4s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
Also adds provenance for newly uploaded photos

refs #46
2026-09-18 11:51:00 +02:00
raucao b295636799 Show Nearby search in search input field
CI / Lint (pull_request) Successful in 1m8s
CI / Test (pull_request) Successful in 1m28s
Release Drafter / Update release notes draft (pull_request) Successful in 4s
Add a special Nearby category, show it in the input field, and make it
dismissable via X button (same as other searches)
2026-09-17 23:38:50 +02:00
raucao 75c0862134 Hide Nostr publishing settings when no account connected
CI / Lint (pull_request) Successful in 1m11s
CI / Test (pull_request) Successful in 1m30s
Release Drafter / Update release notes draft (pull_request) Successful in 15s
2026-09-17 22:24:51 +02:00
raucao f7eacf58d1 Clear wording
CI / Lint (pull_request) Successful in 1m3s
CI / Test (pull_request) Successful in 1m22s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
2026-09-08 15:28:33 -06:00
raucao c8b9ddc1e5 Improve icons
CI / Lint (pull_request) Successful in 1m5s
CI / Test (pull_request) Successful in 1m23s
2026-09-08 15:23:14 -06:00
raucao e9be615c9a WIP Add payment methods to place details 2026-09-08 12:33:06 -06:00
raucao 0d92fc9937 Fix lint errors
CI / Lint (pull_request) Successful in 1m5s
CI / Test (pull_request) Successful in 1m20s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
2026-09-03 14:21:22 -06:00
raucao 7e2bce84db Immediately load OSM place when selecting a map feature
CI / Lint (pull_request) Failing after 1m3s
CI / Test (pull_request) Successful in 1m20s
No waiting for Overpass when selecting visible POIs anymore
2026-09-03 14:16:11 -06:00
raucao 4653947454 WIP Saved places 2026-09-03 10:08:48 -06:00
raucao 39e5240af2 Use new icon in My Contributions header 2026-09-02 18:48:50 -06:00
raucao 35aa3c950f Auto-load older activities
Both initially (if not enough recent ones are available), and when
scrolling to the end of an activity timeline
2026-09-02 18:36:58 -06:00
raucao a4a8d123d3 Split Activity timeline in Home and Explore
Adds a new Explore timeline with contributions from anyone on trusted
relays.
2026-09-02 15:06:10 -06:00
raucao 92c6190d28 Add followee's photo uploads to Activity timeline 2026-09-02 11:23:34 -06:00
raucao 36989e1dc2 WIP Add activity photo item
Can show one or more photo additions in the activity timeline
2026-09-02 10:22:15 -06:00
raucao 6804e80528 Fix photo dropdown not closing after deletion
CI / Lint (pull_request) Successful in 1m12s
CI / Test (pull_request) Successful in 1m27s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
fixes #90
2026-08-30 09:02:07 -06:00
raucao 23444a49a8 Omit year for current year, tweak layout
CI / Lint (pull_request) Successful in 1m2s
CI / Test (pull_request) Successful in 1m17s
Release Drafter / Update release notes draft (pull_request) Successful in 4s
2026-08-29 15:50:49 -06:00
raucao c7fc98d4bd Add place names to Activity timeline
Create a new place name resolver service with the logic previously used
for My Contributions only
2026-08-29 14:34:56 -06:00
raucao 3f6bd5267f WIP Add activity timeline route/sidebar showing incoming zaps 2026-08-29 12:01:48 -06:00
raucao 17dd721986 Introduce tooltip component
CI / Lint (pull_request) Successful in 1m18s
CI / Test (pull_request) Successful in 1m32s
Release Drafter / Update release notes draft (pull_request) Successful in 6s
Tooltips need to be more reliable and controlled than simple title
attributes.
2026-08-27 07:47:14 -06:00
raucao 474bc8cd63 Add relay trust settings, provenance cache
By default, only automatically show photos for relays marked as trusted
(which by default is the required read relay). For other relays, only
show the user's own events by default, but allow showing all events via
link in place details (drawer bottom)
2026-08-26 18:06:06 -06:00
raucao 2746ec035d Add media server selection to Nostr settings
CI / Lint (pull_request) Successful in 1m3s
CI / Test (pull_request) Successful in 1m16s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
Also, hide the fallback option when there's no server to fall back to
2026-08-21 11:27:03 -06:00
raucao beda860093 Change default zap amount
CI / Lint (pull_request) Failing after 8s
CI / Test (pull_request) Failing after 6s
2026-08-20 16:38:04 -06:00
raucao 82bc6a424e Hide zap button when inappropriate
* Current user has No Nostr pubkey connected
* Creator can't accept zaps
* Creator is current user (self-zap)
2026-08-20 16:19:51 -06:00
raucao 74e9860e08 Improve zap modal styles 2026-08-20 16:02:12 -06:00
raucao 135a30f1cd Refactor markup and styles to re-use existing code where possible 2026-08-20 14:58:00 -06:00
raucao 2869ed6677 Subscribe to zap receipt when zapping, show success for external
payment
2026-08-20 12:24:54 -06:00
raucao 644d6a2856 WIP Allow users to zap photos
Working, basic implementation of zaps for photos. No fetching or
rendering of receipts yet.
2026-08-20 10:34:10 -06:00
raucao bfcf855020 Render data and uploader name for current photo in gallery
CI / Lint (pull_request) Successful in 1m0s
CI / Test (pull_request) Successful in 1m12s
Release Drafter / Update release notes draft (pull_request) Successful in 5s
2026-08-19 18:05:52 -06:00