The globe picker shed detail while in motion: a frame-time governor hid
city names and country borders and thinned coastlines during every drag
(the first drag always started at reduced detail), then popped them back
on release.
Draw full detail on every frame instead, and make that cheap enough:
- Give each globe canvas its own graphics layer. Without one, the
always-running crosshair pulse re-recorded the whole globe every frame,
even at rest.
- Replace the per-point Pair/DiscPt lists and per-ring Paths with reused
primitive buffers, and batch land fills, coastlines, borders, graticule
and grid outlines into a few reused paths.
- Cut outlines at the true limb crossing so they reach the globe's edge.
- Cache the globe gradients until the globe moves or zooms.
- Derive canZoomOut so the picker chrome no longer recomposes on every
zoom frame.
Trigger swipe actions from SwipeToDismissBox's onDismiss, which fires
only once the row has settled at a dismissed anchor. The previous
LaunchedEffect keyed on currentValue fired mid-drag once the row crossed
the halfway point; the reset animation then lost to the active drag and
the row stayed stuck in the dismissed position.
Offline peers in the network sheet now render their avatar, badge icons
and name in the neutral tertiary tone instead of their identity colour.
A surviving Nostr key would be loaded and re-subscribed by the post-panic reset,
so stay offline unless the identity wipe also committed.
Remember the withheld reconnect so a retried wipe that is confirmed still comes
back online; disconnect() clears desiredConnected on the failed attempt.
A request arriving while a restart loop was in flight recorded only a Boolean, so its delay was dropped and the loop retried after the fixed 2s. Record a not-before deadline and wait for it before every attempt.
Nothing has called StoreForwardManager.cacheMessage since 9795e2ce, so its
caches are always empty and every flush on session authentication is a no-op.
Remove the manager, its wiring, the never-called PacketProcessorDelegate
method and its constants. No packets or wire formats change.
handleUnexpectedStop never told the controller, so it kept reporting running and every restart request did nothing. Aware stayed down until an outside start such as an Activity resume.
Clear the controller's running state while keeping the instance for reuse, and fix what same-instance restart exposed: orphaning on a deferred start, republishing after stop(), recovery cleanup reading the coroutine's isActive, duplicate background loops, and unbounded attach retries.
The sheet composer used the main composer's routing, which follows the selected chat and falls back to the public timeline. A blocked peer is never selected, and the selection lags the sheet while a chat starts, so sheet text could go public or to the previous peer.
Send sheet text explicitly to the sheet's peer or refuse it, hold slash commands until the sheet's chat is selected, and close a sheet whose chat cannot start.
clearAllOnPanic restored the desired-connected flag but never reconnected, so
the default relays and the subscription validation loop stayed down until the
process restarted.
Reconnect from scratch on the default relays, dropping relays the wiped session
added so the fresh identity is not tied to its geohash relays. Stay offline when
the conversation wipe could not be confirmed, matching the mesh transports.
The error 1 recovery cleared the scanning flag before calling stopScanning, so the stack-level stop was always skipped. A new callback on every start also meant an earlier registration could never be stopped or detected.
Reuse one ScanCallback and force a stack-level stop on every scan failure.
The chat screen stored the unsent message separately from the state cleared
by panic wipe, leaving old text visible after completion. Mention
suggestions could also put text back into the cleared input.
Cleared the input and its command and mention suggestions when the user
confirms the wipe. Rejected mention selections when suggestions are hidden
or the nickname is no longer in the current list, including older click
handlers and rows still visible during their closing animation.
Relays return stored events newest first, and the globe backfills from
many relays at once, so the first message inserted into a channel is
often its newest. Dropping by arrival order at the 500-message cap kept
older messages instead, which could expire while discarded newer ones
were still inside the hour, undercounting or zeroing a channel's chat
activity. Drop the message with the oldest timestamp.
Chatters were derived from the retained messages, which are capped at
500 per channel, so in a busy channel someone who wrote ten minutes ago
dropped out of the headcount and roster once 500 newer messages arrived,
and prune then forgot their last-seen time. Track each writer's newest
chat time separately; the cap now bounds only the message count.
The opening rotation lands at about 4x zoom while keeping level 1, and
minus was enabled only above level 1, so it was dead with most of the
globe off screen. Minus now also zooms out to the whole globe from a
zoomed-in level 1, and disabled rail icons are dimmed; their fixed tint
had hidden the disabled state.
Zooming out in place exposed a crash in the flight path: arc() returns
rounding noise rather than zero for an unmoved center, and for such a
tiny arc ln(sqrt(b^2 + 1) - b) cancels to ln(0), making the zoom NaN.
The whole-globe button made the same flight. Use the equivalent
-asinh(b) and d3's zoom-only threshold.
The flight curve's position already divides by the arc length, so
dividing again was only right for one-radian flights: longer arcs
stopped short and snapped onto the target on the last frame, shorter
ones overshot. Cover non-unit arcs in the tests.
The opening rotation now zooms from 72% of the whole globe to 80% of
the zoom at which autoPrecision switches to two-letter cells (~4.1x),
so it lands on a regional view while the selection stays at level 1.
The end zoom is derived from the same cell-size rule autoPrecision
uses (thresholdZoomForPrecision), so it cannot drift past the threshold.
The intro stays on the glide path so rotation and zoom move together,
and a fly-to that starts below the minimum zoom (an interrupted intro)
no longer snaps up on its first frame.
The opening rotation had lost the zoom-in it used to have. It now
starts at 72% of the whole-globe size and grows into it while turning
to the location, as one 1.4 s eased move, so the selection stays at
level 1 and the entire globe stays in view.
Pinching during an interrupted intro continues from the current size
instead of snapping up to the minimum, and never pinches further out.
Flying into a fine geohash was fast, rough and jittery:
- animateTo panned linearly while zooming exponentially over a fixed
duration, so near the end the remaining fraction of a degree became
a huge on-screen jump (the target was still ~130 screens away at 99%
progress). Large zoom changes now follow GlobeFlight, the van Wijk
and Nuij smooth pan-and-zoom path used by d3-zoom and Mapbox flyTo,
along a great circle, with duration scaled to the distance.
- The target precision was forced for the whole flight, so a fine cell
was re-selected nearly every frame, recomposing the card each time.
Precision now follows the zoom and lands on the target at the end.
- Every selection change fired a haptic tick, buzzing through any
programmatic flight. Ticks now fire only for user-driven changes.
- The view center was a Float; at deep zoom one Float step of latitude
spans several pixels. It is now a Double.
Opening the picker on a selected geohash no longer dives into it: it
plays the same whole-globe rotation as the no-selection case, turning
to face that location at level 1 so the world's activity stays in view.
Addresses review feedback: connectivity was checked once, after the
initial grace period, and the publish loop could only ever set LIVE. A
connection lost while the picker was open stayed LIVE forever, and a
connection made after the grace period left a quiet globe OFFLINE until
traffic arrived.
The monitor now re-derives its status on every 500 ms tick from its own
relays' connection state, via activityStatus(): LIVE when connected and
either traffic has arrived or the grace period passed, OFFLINE when no
relay is connected after it, CONNECTING otherwise. Relay state is
polled because the relay manager mutates its relay objects in place, so
its relay list flow can drop connection changes as equal values.
The pop-in overshoot, staggered cascade and markers flying into and out
of clusters were too much motion. Markers now stay exactly where the
globe puts them: a new one fades in while growing from 60% to full size
over 200 ms with an ease-out and no overshoot, and a vanished one fades
out while shrinking slightly over 150 ms. Cluster size easing, the limb
fade and the system animator scale are unchanged.
Addresses review feedback: the monitor republished its snapshot only
when an event arrived or prune removed something. A chatter stays
listed for the hour, so prune keeps them after their five-minute online
window ends and returns false; the published online count then stayed
inflated for up to an hour.
The 15-second prune tick now always recomputes the snapshot (the
StateFlow drops unchanged ones). Only real traffic marks the sweep
LIVE, so a timed refresh cannot flip an offline globe to live.
Land and sea swapped colors, and flickered, whenever a large landmass
crossed the globe's limb. drawLandFill decides whether to invert a
ring's fill by testing sample points with ringContainsLocation, which
cast its ray along a parallel using longitudes relative to the probe.
Edges near the probe's antimeridian wrapped from +180 to -180 and
landed near zero, so a Pacific probe saw Europe's coast as crossings:
Eurasia "contained" the Pacific and the middle of North America, its
fill inverted, and the result flipped as the view rotated. The test now
counts edges crossing the probe's meridian north of it, following each
edge the short way around, as the iOS globe does. GlobeLandFillTest
checks oceans and continents against the bundled Natural Earth land.
Moving frames also strobed between detail levels. Detail was re-chosen
every 8 frames and could step back up mid-gesture, but shedding detail
is what makes frames fast again, so slow devices oscillated and
neighbor cells, labels and borders flashed. GlobeMotionGovernor now only
steps detail down within a gesture, restores full detail at rest, and
starts the next gesture at the level the device sustains.
The geohash grid, neighbor cells and city dots now draw at every detail
level instead of vanishing on touch and popping back on release; only
borders, city labels, graticule density and coastline resolution vary.
Markers used to pop on and off as data arrived, the globe turned, or
zoom merged and split clusters. GlobeMarkerAnimator tracks markers by
their busiest channel between frames:
- New markers pop in with a slight overshoot (~280 ms); a new batch is
staggered over ~110 ms so it cascades rather than flashing at once.
- Vanished markers shrink and fade out quickly (~160 ms).
- On zoom, a marker merging into a cluster flies into it and markers
splitting from a cluster fly out of it; cluster size changes ease.
- Markers fade and shrink toward the limb instead of being culled at
a depth threshold.
Durations follow the system animator scale, so Remove animations makes
every change instant. The layer reads the frame clock only while a
marker is moving or pulsing, so a settled globe still stops redrawing.
Addresses review feedback on the observe-only sweep, which bypasses the
relay manager's checks:
- Signature verification was skipped for events that only refreshed
known activity, so a relay could replay a known chat id with new
pubkeys or keep people online with unsigned heartbeats. A new
VerifiedEventFilter verifies every distinct event once and drops
repeats of an admitted id without reading their fields. Failed ids
are not remembered, so a forged copy cannot block the genuine event.
- Proof-of-work ran before verification and throws on a non-hex id,
which stopped the inbox consumer. Verification now runs first, and
each event is ingested inside its own error boundary.
GeohashActivityAggregator.wouldGrow is removed with its only caller.