* Empty-mesh liveliness: nearby conversations, echoes, wave action, dead drops, radar
The empty mesh timeline was a dead end: a grey zero and "nobody in range
yet". This turns it into a live surface and gives the app pull when the
mesh wakes up:
- Nearest conversation: background geohash sampling now tracks actual
chat messages (not just presence) per regional channel; the empty state
surfaces the busiest nearby conversation with a preview, one tap to
join (GeohashChatActivityTracker, fed from GeoPresenceTracker).
- Echoes: the carried 6h store-and-forward window renders as dimmed
"heard here earlier" rows at launch (new Transport
collectArchivedPublicMessages -> GossipSyncManager snapshot, decoded
with signature-derived nicknames; content-identity dedup guards
against re-synced duplicates).
- Wave: the "bitchatters nearby" notification gains a "wave" quick
action that broadcasts a mesh 👋 straight from the notification, even
backgrounded (first UNNotificationCategory in the app).
- Dead drops: /drop pins a note to the current building geohash as a
kind-1 location note with a 24h NIP-40 expiry; expired notes are now
dropped client-side at ingest; the notices sheet shows "fades in Xh";
a "location notes" toggle plus location-permission controls live in
app info (also fixes the duplicated Voice section).
- Radar: an ambient sonar animation shows the radio scanning, with a
privacy-safe daily tally ("N devices passed within range today" via
salted per-day hashes) and a "notes left here" hint that opens the
notices geo tab.
All new user-facing strings ship in all 29 locales. 1403 tests green,
including new suites for the activity tracker, sightings tally, and
note expiry/drop publishing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Review round: app-info polish, urgent/expiry parity, centered radar, pin fill, Codex P2s
- App info: LOCATION header uppercased like sibling sections; location
notes and live voice descriptions shortened (29 locales); redundant
"location access granted" line removed.
- Notices parity: urgent + expiry controls now show on the geo tab too;
the bridged Nostr note carries ["t","urgent"] and NIP-40 so relay-side
readers see both; urgent parsed back from incoming notes.
- Radar moved from the top of the empty state to the center of the chat
area, below the help text (empty state fills the visible height).
- Header pin fills whenever the scope has notices (was: only unseen),
and Nostr-only nearby notes now light it too.
- Codex P2 fixes: notification completion deferred until the wave action
is handled (background suspension dropped the send); NIP-40 notes now
prune on a timer when they expire while displayed; the location-notes
kill switch retargets the nearby-notes counter immediately.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Hide macOS segmented picker's built-in label in notices composer (duplicate 'expires in')
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Geo notes: permanent (∞) expiry default, urgent stays mesh-only
- Geo expiry picker gains ∞ as the default: a permanent note posts as a
pure relay note (no NIP-40 tag, no mesh-board copy — a board copy must
fade within days, contradicting the ∞ the user picked). 1/3/7d keep
the board + bridged-note path with NIP-40.
- The notes manager is now owned by the notices sheet (not the list) so
the composer local-echoes ∞ notes into the list; it revives via
refresh() after a tab-switch cancel, and its expiry-prune timer
survives cancel (weak self, dies with the instance).
- Urgent toggle returns to mesh-only per review — notes are ambient;
the read-side urgent-tag parse stays so tagged notes still render.
- macOS: hide the segmented picker's built-in label (duplicate
"expires in").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Clearing the mesh timeline dismisses echoes for good; tighter divider copy
Triple-tap /clear emptied the timeline but the next launch re-seeded
"heard here earlier" from the persisted archive. A MeshEchoSettings
watermark now records the clear; only messages heard after it come back
(the archive itself still carries everything for peers' sync). The
echo dedup keys reset with it, and panic wipe drops the watermark.
Divider copy tightened to "heard here earlier · last 6h" (29 locales).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Echoes visual polish: tinted history block, radar-captioned tally, ambient footer
Device-test feedback on the echoes screen:
- Archived echoes now sit on a subtle tinted background (secondary at
8%) in addition to the dim, so "heard here earlier" reads as one
distinct block; the divider carries the echo ID prefix to join it.
- "N devices passed within range today" moves out of the narration
lines to sit centered under the radar as its caption.
- When the timeline holds only echoes/system lines, a compact ambient
footer (small radar + tally + live hints) renders below the history
instead of the whole ambient layer vanishing.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Notes strip persists above the mesh chat; leaner empty-state narration
- The 📍 "notes left here" line was empty-state-only, so starting a
conversation hid it. It is now a tappable strip pinned above the mesh
timeline whenever unexpired notes exist at this place (opens the
notices geo tab); the nearby-notes counter runs for the whole mesh
timeline, not just the empty state.
- Empty state narration drops "nobody in range yet..." (the radar and
the sightings caption already say it) and the nearby-conversation
hint moves below the help line instead of splitting the narration.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Radar means searching: hide the sweep once mesh peers are connected or reachable
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Make location notes robust: durable relay subscriptions, failure decay, auto-recovery
Location notes (and geohash chat / DMs) intermittently stopped showing
events because the Nostr relay layer lost subscriptions and blacklisted
relays:
- Replay active subscriptions on every relay (re)connect. Relays drop
REQs with the socket; previously a drop silently killed the
subscription on that relay for the rest of the session. Durable
subscription intent now also survives disconnect()/resetAllConnections
(background -> foreground).
- Keep failed REQ sends queued instead of dropping them.
- Raise the EOSE fallback from a fixed 2s Timer to a 10s injected
schedule (Tor needs more than 2s), and settle EOSE trackers when a
relay disconnects before answering so initial load doesn't stall.
- Decay "permanently failed" relay markings after a 10-minute cooldown;
previously ~9 minutes of outage (or one DNS hiccup) excluded a relay
until app restart, with nothing resetting it on macOS.
- Make geo relay selection deterministic (distance, then host) so
publishers and subscribers with the same directory agree on relays.
- Post .geoRelayDirectoryDidRefresh after a directory fetch and let
LocationNotesManager auto-resubscribe out of the "no relays" state
instead of requiring a manual retry.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Guard subscription activation on connection identity
A REQ send completion from a dead socket could land after
handleDisconnection cleared the relay's subscriptions and re-mark the
subscription active, making the next connection skip the durable replay
and leave that relay silent. Only mark a subscription active if the
completing socket is still the relay's live connection.
Regression test defers send completions in the mock so the stale
completion deterministically interleaves between disconnect and
reconnect.
Addresses Codex review on #1333.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* Expand coverage for transport, chat, and media flows
* Stabilize transport and media coverage tests
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
Simplifies geonotes architecture by eliminating all background subscriptions:
- Delete LocationNotesCounter.swift (104 lines) and related tests (58 lines)
- Remove background subscription system entirely
- Icon is now constant darker orange (indicates availability, not state)
- Subscription ONLY happens when user explicitly opens the sheet
- Total: ~220 lines of code removed
Privacy Benefits:
- Zero network traffic until user action
- No location leaking to relays via background polling
- User must explicitly opt-in to discover notes
The icon (note.text in orange) simply indicates the feature is available
when location permission is granted. Notes are only fetched when the
sheet is opened, prioritizing privacy over convenience.
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
* Location notes: fix performance and UI issues
Performance fixes:
- Add Set-based duplicate detection (O(1) vs O(n) lookup)
- Eliminates lag when receiving 200+ notes during EOSE
Correctness fixes:
- Fix optimistic echo timestamp to match signed event timestamp
- Add echo IDs to noteIDs set for consistency
UI improvements:
- Remove duplicate "loading recent notes" text in header
- Simplify toolbar icon color logic for immediate green indication
- Icon now reliably turns green when notes exist in geohash
Tests: All 3 LocationNotes tests passing
* Location notes: add remaining robustness fixes
Additional improvements:
- Align counter/manager limits to 200 (prevents showing count higher than displayable)
- Set loading state before clearing notes to eliminate UI flicker on geohash change
- Add geohash validation for building-level precision (8 valid base32 chars)
- Add defensive 500-note memory cap with automatic trimming
- Clear stale notesGeohash state on sheet dismiss
Tests:
- Fix test geohashes to use valid base32 characters
- All 3 LocationNotes tests passing
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
* Move LocalizationCatalogTests out of Localization/
SPM is treating all the files under Localization as a resource as per the Package.swift, hence it’s not even building it
* Use a class object vs struct to fix build issue
* Explicitly check that the output is not a l10n key
* Remove skipped test
* fix(test): update LocationNotesManagerTests to expect localization key
The tests were failing because in the test environment, String(localized:) returns
the localization key instead of the actual localized value. Updated the assertions
to expect 'location_notes.error.no_relays' instead of the English translation
'no geo relays available near this location. try again soon.'
* Fix LocationNotesManager test assertions for localization bundle
- Update test assertions to use String(localized:) to match manager behavior in test environment
- Fixes issue where tests expected localized text but manager returns raw keys in SPM test environment
- Both manager and tests now consistently handle localization bundle differences
- Resolves P1 issue: Keep LocationNotes error messages localized
- All 124 tests now pass after clean build
* SPM: process bitchat/Localizable.xcstrings in main target to fix CLI warning; keep tests' Localization resource.