mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-12 17:23:21 +00:00
This commit bundles several issues surfaced while testing host actions inside an audio room. NestActivity didn't mount `DisplayErrorMessages`, so every toast emitted by nest code (promote, demote, kick, force-mute, errors) queued into a StateFlow whose only collector lives in MainActivity. Mounted it inside NestActivity.setContent so toasts now render in front of the room UI — same way the leave-confirmation AlertDialog already does. Host actions used to fire a synchronous "Promoted X" toast regardless of whether `signAndComputeBroadcast` actually completed. Silent signer failures (TimedOut, ManuallyUnauthorized, CouldNotPerform, etc. — all Log.w-only in launchSigner) were invisible from the host's POV. Replaced with a coroutine-bound failure toast that surfaces the exception class + message; success is implicit via the UI update. The real cause of "promoted user stays in audience tab" turned out to be stale presence: a kind-10312 emitted before the role grant (with onstage=0) was pinning the freshly-promoted speaker to the audience tab. buildParticipantGrid now takes a `roleGrantSec` parameter (the kind-30312 created_at) and treats presence as authoritative only when strictly newer. Pinned with two new tests covering both the stale-ignore and fresh-respect cases. The leave-stage-on-another-client flow keeps working because that emits a fresh onstage=0. RoomParticipantActions.rebuild now uses `(original.createdAt + 1L).coerceAtLeast(now())` so a same-second promote→demote can't tie-break the wrong way under NIP-01's lowest-id rule. EditNestSheet's bottom row got squashed when the keyboard appeared — the form fields couldn't shrink, so the Save/Cancel/Close row took the hit. Split into a scrollable form column + sticky action row, wrapped the outer column in imePadding. SpeakerReactionOverlay was driving drift on a 100 ms `delay` loop over the 10 s eviction window — produced 0.16 dp per tick (visibly stepped) and the chip barely moved before disappearing. Replaced with `Animatable.animateTo` on Compose's frame clock and a 6 s duration so the chip pops, lingers visibly, then drifts up and fades. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>