Drop the dedicated NestThumbStatusFilterAssembler and have the
thumb's liveness gate piggyback on NestRoomFilterAssembler, which
already subscribes to kinds=[1311, 10312, 7] + admin (4312) per
room a-tag. observeRoomLatestPresence is now a private composable
in NestsFeedLoaded.kt that opens NestRoomFilterAssemblerSubscription
and reads the latest cached MeetingRoomPresenceEvent createdAt off
the room's LiveActivitiesChannel.
Trade-off: the thumb pays for the room's full chat + reaction
history, not just presence. Bounded by LazyColumn — only currently-
composed thumbs hold subscriptions — and the cache it warms is
exactly what NestActivity needs when the user opens the room. If
wire load becomes a concern, swap to a limit:1 lite mode on the
existing assembler.
Net: -159 / +51 lines, one less filter assembler in the coordinator.
Extends the canPop FAB-position fix to every screen that hosts a
floating action button: Pictures, Videos, Articles, Longs, Shorts,
Polls, Products, Communities, Nests, Badges, Discover, WebBookmarks,
Messages, Home, GeoHash, Hashtag, Relay, Community, OldBookmarks,
EmojiPack, ChessLobby, MarmotGroups, the bookmark management screens
and the migration FAB. Adds a small FabBottomBarPadded helper so call
sites that use named FAB composables stay tidy.
https://claude.ai/code/session_01QSk7CnjNtbcgS3XBD5WEZy
The kind-30312 status tag goes stale silently when a host crashes
without publishing a CLOSED replacement, so checkStatus()'s 8-hour
fallback was the only liveness signal — abandoned rooms still
showed LiveFlag for up to 8h after the audio stopped.
Adds a per-thumb relay probe: kinds=[10312], #a=[roomATag], limit=1.
The relay returns the single most-recent presence event among all
speakers in the room, then keeps streaming so fresh heartbeats land
in real time. Speakers re-emit kind-10312 every ~60 s while
publishing, so a presence newer than 180 s means at least one
speaker is still in the room; older flips the badge to EndedFlag
even though the 30312 event still says OPEN.
UX: optimistic on first paint (LiveFlag while we have no presence
data), self-corrects within one round-trip once the relay replies.
Files:
- NestThumbStatusFilterAssembler.kt: per-room limit:1 REQ +
observeNestRoomLatestPresence composable that scans the
LiveActivitiesChannel's notes for max(createdAt) of cached
presence events.
- RelaySubscriptionsCoordinator.kt: register nestThumbStatus.
- NestsFeedLoaded.kt: thread card.id into a private
RenderLiveOrEndedFromPresence helper that gates the OPEN badge
on freshness.
AppBottomBar returns nothing on canPop entries (drawer pushes, in-app
navigations), so the floating action button drops by the bar's height
when navigating into a screen and rises again on a tab root. Reserve the
50dp gap at the FAB site via a fabBottomBarPadding(nav) modifier so the
button stays at a consistent vertical position regardless of the bar's
visibility on EmojiPacks, BookmarkGroups, and InterestSets.
https://claude.ai/code/session_01QSk7CnjNtbcgS3XBD5WEZy
NestsFeedLoaded.RenderLiveSpacesThumb gates LiveFlag/EndedFlag on
the kind-30312 status tag verbatim, so a host that crashed without
publishing a CLOSED replacement leaves the room flagged "live"
indefinitely. checkStatus() applies the same 8-hour age-out the
event's own helper uses, so abandoned OPEN rooms surface as
EndedFlag instead.
Also drop a stray println debug ("AABBCC …") in the same map block.
Mirrors the Profile Edit banner upload: a SelectSingleFromGallery
leadingIcon on the Cover Image field picks media, strips metadata,
compresses, and uploads to the user's configured Blossom (or NIP-96)
server. The returned URL fills the field so the existing publish path
tags it on the kind-30312 MeetingSpaceEvent.
The previous refactor renamed EditNestViewModelTest and
RoomParticipantActionsTest into edit/ and participants/ subdirs but
the package declarations stayed at the old flat path, so the tests
no longer compiled against the relocated production code.
The nests/room/ package had grown to 23+ files in one flat directory,
making it hard to find related composables and lifecycle helpers. Each
file is now grouped by responsibility:
activity/ Android Activity entry + AccountViewModel bridge
lobby/ Pre-join lobby card (NestJoinCard, JoinNestButton)
lifecycle/ Side-effect composables wiring VM <-> system / cache
screen/ Top-level layouts (FullScreen, PipScreen, ActionBar)
stage/ Speaker / audience grids and overlays
participants/ Per-participant host actions + role mutations
reactions/ Reaction picker
chat/ Chat panel and composer (also absorbs the old send/)
edit/ Edit-room sheet + ViewModel
theme/ Themed scope + URL font loader
Also drops the unused StagePeopleRow composable from NestCommon and
inlines its remaining one-liner connectingLabel helper into
NestActionBar (the only caller), removing NestCommon entirely.
External imports in 7 sibling files were updated to point at the new
subpackage paths.
Resolves NestFullScreen.kt by keeping the redesigned layout (header
strip, stage grid, tabs, sticky NestActionBar) while dropping the
NestThemedScope wrapper that main removed in ff00dcf3 ("screens get
too dark"). The RoomTheme import goes with it; the stale doc-comment
reference to NestThemedScope is updated accordingly.
Replaces the single scrolling Column (title → speakers row → audience
row → host queue → connection chip → talk row → buttons → chat) with
a Scaffold-bounded layout that scales to large rooms:
- Header strip with LIVE chip + listener count (uses the existing
nest_listener_count plural for the first time) and a 1-line
ellipsised summary. Topbar stays slim.
- StageGrid: vertical adaptive LazyVerticalGrid capped at 220dp,
so a 30-speaker room scrolls inside the strip without pushing
the chat below the fold.
- Tab bar (Chat / Audience · N / Hands · N) with badge counts.
Hands tab is host-only and only shown while the queue is non-empty.
- AudienceGrid: vertical adaptive LazyVerticalGrid that fills the
selected tab — handles 1,000+ listeners without performance issues
(the old single-row LazyHorizontalGrid only let you see ~5 at a time).
- NestActionBar: sticky bottom bar consolidating the old ConnectionRow,
TalkRow, and hand/react/leave row. Layout adapts to connection /
broadcast / on-stage state; failure messages get a thin status
strip above the bar instead of stealing button slots.
- Hand-raise control hides when the user is on stage (the action it
represents — "I want to speak" — no longer applies).
The PIP screen and chat panel internals are untouched.
The back button and the more-options menu used to float as
absolute-positioned overlays inside ProfileHeader. They are now
hosted in a transparent ShorterTopAppBar wired into the Scaffold's
topBar slot, so the banner can still render edge-to-edge as the
background by setting contentWindowInsets to zero and only applying
the bottom padding from Scaffold to the body.
Completes the copy approach started in 57ebded6:
- NestEditFieldRow.kt: copy of EditFieldRow, drops the BackHandler
(the activity owns back; draft auto-save runs on every keystroke
so there is nothing to flush) and points every callback at
NestNewMessageViewModel.
- NestFileUploadDialog.kt: copy of ChannelFileUploadDialog, header
shows the room host's avatar + room name from the loaded
MeetingSpaceEvent.
- NestChatPanel.kt: replaces the slim inline composer with
NestEditFieldRow + NestNewMessageViewModel. Chat message list is
still rendered from NestViewModel.chat — the new VM is scoped to
*editing and sending* messages only, per the brief.
- NestNewMessageViewModel.sendPostSync: switched from
signAndSendPrivately(template, emptySet()) to
signAndComputeBroadcast(template) so messages actually reach the
user's default relays (matches the original slim composer's
behaviour).
Pivot from sharing ChannelNewMessageViewModel (previous commit) to a
literal per-nest copy as requested.
State of this commit (incomplete — DO NOT MERGE):
- EditFieldRow.kt: reverted to original (no interceptBackPress flag)
- NestNewMessageViewModel.kt: new file, copy of ChannelNewMessageViewModel
narrowed to MeetingSpaceEvent + LiveActivitiesChatMessageEvent only
Still TODO before this branch is usable:
- Copy EditFieldRow into nests/room/send/NestEditFieldRow.kt
- Copy ChannelFileUploadDialog into nests/room/send/NestFileUploadDialog.kt
- Rewire NestChatPanel to use these copies (it currently still calls
ChannelNewMessageViewModel + EditFieldRow from the previous commit's
approach, which won't compile against the reverted EditFieldRow
signature once NestChatPanel is also reverted)
User asked to stop mid-work — committing as WIP so the tree is clean.
Wire the in-room chat composer to ChannelNewMessageViewModel +
EditFieldRow so nest chat picks up @-mention picker, file/image/
video upload, reply preview, NIP-37 draft auto-save, emoji
suggestions, content warnings, expiration, geohash, and zap-
split forwarding — the same affordances every other public chat
surface has.
The composer is backed by a LiveActivitiesChannel keyed by the
meeting space's address. ChannelNewMessageViewModel.createTemplate()
already handles the LiveActivitiesChannel branch: when channel.info
is null (which it always is for kind-30312, since info is typed to
the kind-30311 LiveActivitiesEvent), it falls through to
LiveActivitiesChatMessageEvent.message(post, channel.toATag()) —
the exact event shape the previous slim composer was emitting.
EditFieldRow gains an interceptBackPress flag so nest can opt out
of the channel-screen back-handler that would clear the field and
call nav.popBack() (a no-op on BouncingIntentNav).
The room name and the MoreVert overflow lived inline at the top of
the metadata Column, so they scrolled with the rest. Hoist them into
a Material 3 TopAppBar inside a Scaffold, matching every other major
screen in the app.
NestTopAppBar — new private composable:
- Title is `event.room()`, single-line ellipsis.
- Actions: Box wrapping the MoreVert IconButton + DropdownMenu
(Share for everyone, Edit gated on `isHost`).
- containerColor = Transparent so the themed background painted by
NestThemedScope's Surface (and any optional `bg` image) shows
through cleanly without a double-paint.
NestFullScreen body now:
Scaffold(
containerColor = Color.Transparent,
topBar = { NestTopAppBar(...) },
) { padding ->
Column(fillMaxSize.padding(padding)) {
Column(weight(1, false), verticalScroll, hpad+top pad) {
// summary, listener count, participants grid, host actions
// sheet, hand-raise queue, connection row, talk row, action
// row, reaction picker, host-leave confirm dialog
}
NestChatPanel(weight(1, true), hpad+bottom pad)
}
}
Side effects:
- Drops the manual windowInsetsPadding(safeDrawing) — Scaffold's
contentWindowInsets handles that and the TopAppBar's own
windowInsets handles the top edge.
- The EditNestSheet conditional moves to NestThemedScope's body
(after the Scaffold). It's a ModalBottomSheet, so position in
the tree doesn't change layout, but adjacency to the Scaffold
keeps the sheet/dialog boundary obvious.
https://claude.ai/code/session_01RDpuki4t8StSg1CZcXnV5b
The bottom-nav settings let users place any of these routes in the bar,
but the screens themselves never rendered AppBottomBar — so even when
configured as a tab, the bar was missing on Profile, Wallet, Lists,
BookmarkGroups, WebBookmarks, Drafts, InterestSets, EmojiPacks,
BrowseEmojiSets, and AllSettings.
AppBottomBar self-hides via nav.canPop(), so adding the bar is safe on
every entry: it appears only when the screen is the tab root, hidden
otherwise (drawer / deep link).
Same-tab tap scrolls the screen's main list to the top, mirroring the
existing tab behavior. State is hoisted as needed:
- WebBookmarks, Drafts, BrowseEmojiSets: feedState.sendToTop()
- Lists, BookmarkGroups, EmojiPacks: hoisted LazyListState/LazyGridState
through the feed-view helper, animateScrollTo(0)
- Wallet, InterestSets: hoisted LazyListState locally
- AllSettings: hoisted ScrollState (verticalScroll column)
- Profile: wrapped in Scaffold, hoisted ScrollState from RenderSurface
https://claude.ai/code/session_01PrirRcL7g8iX7vTqqLTkBS