559 Commits

Author SHA1 Message Date
callebtc
354f1c28cd
Merge pull request #790 from permissionlesstech/ui/people-sheet-favorited-star
ui: three-state favorite stars in people sheet
2026-07-27 21:26:59 +02:00
callebtc
7a26fccff7 ui: move enable location services into nearby section
Keep disable at the sheet footer so enabling is next to nearby channels while turning location off stays a secondary action.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 21:18:49 +02:00
callebtc
32d1916ec0 ui: show three-state favorite stars in people sheet
Mirror the private-chat header so peers who favorited us get an orange outline until we favorite back.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 21:11:37 +02:00
callebtc
290d72f2b6 fix: make read receipts reliable 2026-07-27 20:03:17 +02:00
callebtc
5fd686a00a ui: celebrate being favorited in private chats
- header star wobbles and its outline turns orange when the peer
  favorites you; it only fills once you favorite them back
- mirror the 'favorited you' system notice into the private
  conversation (mesh path), matching the main chat
- expose reactive peerFavoritedUs state driven by
  FavoritesPersistenceService; keep system notices silent
  (no unread badge, read receipt or push)
2026-07-27 19:11:37 +02:00
callebtc
90b00ac557
Merge pull request #787 from permissionlesstech/fix/noise-after-Prs
Restore robust Noise handshakes and mesh DMs
2026-07-27 18:49:54 +02:00
callebtc
62dd3ca90e fix: complete direct-link routing rollback 2026-07-27 18:47:17 +02:00
callebtc
58c56a8082 ui: open lock until Noise session is established
Show ic_spec_lock_open while idle or handshaking, then Crossfade to the
closed lock on success or failure — timed with the existing tint wash so
the shackle settling reads as one smooth transition.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 18:45:29 +02:00
callebtc
6dff0844bb revert noise 2026-07-27 18:44:49 +02:00
callebtc
fa63a98e77 Update Nostr handler regression test 2026-07-27 18:28:05 +02:00
callebtc
a06c9f8614 Merge remote-tracking branch 'origin/main' into codex/background-power-optimization 2026-07-27 18:26:49 +02:00
callebtc
d8e380efae Fix background Nostr event processing 2026-07-27 18:23:26 +02:00
callebtc
21cfa62cc2 fix: address unread DM review feedback 2026-07-27 18:23:08 +02:00
callebtc
1a390b5a1f ui: glow lock for Noise handshake instead of sync icon
Match private-chat Noise status to the Tor globe treatment: one lock
glyph with an orange pulse while handshaking, then green or red with
smooth tint cross-fades — no sync/recycle swap.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 18:13:46 +02:00
callebtc
6325099e2e
Merge pull request #782 from permissionlesstech/codex/fix-nostr-dm-timestamps
Fix randomized timestamps in Nostr direct messages
2026-07-27 18:11:49 +02:00
callebtc
8c62e90711 ui: keep unread DM senders visible 2026-07-27 18:01:08 +02:00
callebtc
b22184940b Harden background relay lifecycle 2026-07-27 18:00:10 +02:00
callebtc
81a35d9dba ui: use shared green CloseButton in private and channel headers
Align conversation exit controls with bottom-sheet close chrome so the X reads as primary green rather than muted grey.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-27 17:58:36 +02:00
callebtc
85cbe20b39 fix: use authenticated timestamps for Nostr DMs 2026-07-27 17:56:48 +02:00
callebtc
6703f1bd20 Merge main into background power optimization 2026-07-27 17:47:58 +02:00
callebtc
7025009788
ui: complete the redesign — palette, top bar, composer, About, and a motion pass (#774)
* first pass

* pass 2

* cleanup

* capitalization

* strings

* input bar fixes

* fixes

* notes

* nice

* nicer

* lists

* cleanup

* button

* fixes

* animations

* Fix layout jumpiness in chat and geohash people list

Three separate causes of things moving when they should not:

- Chat lurched whenever a bottom sheet closed. Placement animation is meant
  to soften insertions and removals, but any relayout moves every item --
  a sheet's text field opening the keyboard changes the chat's IME inset,
  and closing it changes it back. Placement animation is now armed only
  briefly around a real change to the message list, so items otherwise
  track the viewport exactly.

- Anon list changed height as participants churned. Rows sized to their
  content, so any reorder could change the card's height; and the card
  sized to the live anon count, which moves constantly in a busy geohash.
  Rows now have an exact height, and a trimmed anon card reserves the full
  capped height regardless of how many are present beyond the cap.

- Anons are now their own trailing section rather than a tail on each of
  "on location" and "teleported in", which had pushed the few recognisable
  names out of view twice over. Self is never grouped as an anon.

Adds 7 tests covering the sectioning and the fixed-length behaviour.

* Group geohash people as People and Anon

Replaces the "on location" / "teleported in" / "anonymous" split with two
sections: peers who announced a nickname, then the anons.

Teleport state was never worth a section of its own -- every row already
carries it as a distinct glyph -- and splitting on it fragmented the short
list people actually read, in a channel where most participants are
anonymous anyway.

Self stays in the People section even when unnamed.

* Key message list state per conversation

Switching channels reused every piece of state in MessagesList, because none
of it was keyed on which conversation was being shown:

- The LazyListState carried the previous channel's scroll offset, so the new
  channel opened at a stale position and then corrected itself.
- hasScrolledToInitialPosition and followIncomingMessages carried over, so a
  channel entered after scrolling up in another one did not land on its
  newest message at all.
- The arrival tracker had never seen the incoming channel's ids, so a
  backlog of six or fewer messages was treated as six simultaneous arrivals
  and each one slid in.
- previousMessageCount carried over, arming placement animation for the
  relayout that the switch itself caused.

All of it is now keyed on a conversationKey derived the same way
displayMessages is. The tracker also detects a list sharing no ids with the
previous one and adopts it silently, which covers /clear and any caller that
does not supply a distinct key.

Adds 4 tests for wholesale replacement, including the case that the burst
cap cannot catch on its own.

* fix location channel layout

* icon

* location sheet

* move location error

* fix location channel lifecycle bug

* remove empty lable

* geist mono

* timestamp no seconds

* new icons

* icons

* cleanup

* mentions

* fix mentions

* grouping of geohash channel list

* colors

* fix mention colors

* Bring private and group chat headers up to the main header's layout

Both conversation headers were built on TopAppBar with a centred title, a
back arrow on the left and everything else crowded into the title slot, at
14sp with 14dp icons. Moving between the timeline and a conversation visibly
shifted the bar's height, insets and type.

Introduces ConversationHeader, built from the main header's own tokens rather
than TopAppBar: same ChatHeaderHeight, same 12/8dp edge insets, leading glyph
in a 44dp slot so it lands exactly where the brand mark does, same -6dp
optical nudge pulling the title toward it, same 17sp label.

- Drops the back button; the close action on the right is the way out.
  Leaving a channel outright already lives on its row in the network sheet,
  so it does not need a second home beside the exit.
- Leading glyph is the transport: globe over the internet, wifi/bluetooth/
  routed on the mesh, matching the main header's channel button.
- Actions are right-aligned and unweighted -- favourite, encryption state,
  close -- so a long title yields space to them instead of pushing them off
  screen.
- Private chat titles use the primary green like every other header label,
  rather than orange for Nostr-reachable peers.

Height and edge insets now belong to each header variant instead of the
ChatFloatingHeader wrapper, which was applying them a second time to the
channel header.

Adds nine spec icons in the existing 20x20 / 1.25-stroke language -- bluetooth,
wifi, routed, close, check, warning, sync, lock_open, envelope -- so the
headers and peer rows no longer mix Material glyphs into the set.

* color
2026-07-27 17:33:11 +02:00
callebtc
3054cd801e Centralize background power scheduling 2026-07-27 17:27:40 +02:00
callebtc
adba24b5de
test: add client rewrite contract suite (#779) 2026-07-27 17:05:43 +02:00
callebtc
f27c47dae2
fix: enforce soft live-location privacy gate (#780)
* fix: enforce soft location privacy gate

* fix: address location privacy review
2026-07-27 16:08:50 +02:00
callebtc
25e9779f73 colors 2026-07-27 16:06:22 +02:00
callebtc
c1c7704c32 grouping of geohash channel list 2026-07-27 15:46:11 +02:00
callebtc
b1d709fc4a fix mentions 2026-07-27 15:32:33 +02:00
callebtc
4863381dbb mentions 2026-07-27 15:27:15 +02:00
callebtc
dabc520090 Merge branch 'main' into opus/redesign-proposal 2026-07-27 14:27:27 +02:00
callebtc
fe4920465d cleanup 2026-07-27 14:02:24 +02:00
callebtc
34175988a5 icons 2026-07-27 13:49:18 +02:00
callebtc
352dd6e93f new icons 2026-07-27 13:45:51 +02:00
callebtc
7cef3f329e timestamp no seconds 2026-07-27 13:28:35 +02:00
callebtc
a85ba40637 geist mono 2026-07-27 13:27:15 +02:00
callebtc
7b03863eaa remove empty lable 2026-07-27 13:10:51 +02:00
callebtc
8db6ccfdc3 fix location channel lifecycle bug 2026-07-27 13:06:00 +02:00
callebtc
703fcd0e02 move location error 2026-07-27 13:02:11 +02:00
callebtc
a277b5e753 location sheet 2026-07-27 12:57:03 +02:00
callebtc
7ad709c38e icon 2026-07-27 12:51:34 +02:00
callebtc
562aa787d6 fix location channel layout 2026-07-27 12:49:57 +02:00
callebtc
fa43821cf4 Key message list state per conversation
Switching channels reused every piece of state in MessagesList, because none
of it was keyed on which conversation was being shown:

- The LazyListState carried the previous channel's scroll offset, so the new
  channel opened at a stale position and then corrected itself.
- hasScrolledToInitialPosition and followIncomingMessages carried over, so a
  channel entered after scrolling up in another one did not land on its
  newest message at all.
- The arrival tracker had never seen the incoming channel's ids, so a
  backlog of six or fewer messages was treated as six simultaneous arrivals
  and each one slid in.
- previousMessageCount carried over, arming placement animation for the
  relayout that the switch itself caused.

All of it is now keyed on a conversationKey derived the same way
displayMessages is. The tracker also detects a list sharing no ids with the
previous one and adopts it silently, which covers /clear and any caller that
does not supply a distinct key.

Adds 4 tests for wholesale replacement, including the case that the burst
cap cannot catch on its own.
2026-07-27 12:36:09 +02:00
callebtc
bc49c71ea0
security: stop logging Noise key material, reduce noisy logging app-wide (#775)
C1 from security review: SymmetricState/HandshakeState logged raw X25519
shared secrets, chaining keys, and handshake hashes in hex to logcat on
every handshake, in release builds. A logcat transcript of a handshake
allowed full session decryption. Both classes no longer log at all.

Also reduces excessive logging across the app (~50% fewer log calls in
the noisiest files):

- NoiseSession emits one line per completed handshake; per-message
  encrypt/decrypt and per-handshake-step debug logs removed
- Removes all content/key logging: decrypted DM content, file names,
  payload hex dumps, pubkeys, event IDs, lat/lon, peer IPs, arti log
  forwarding
- Collapses multi-line banner/emoji log sequences into single factual
  lifecycle lines (connect/disconnect, relay/Tor state transitions)
- Keeps security-relevant warnings (signature failures, replay
  detection, key mismatches, panic wipe) in compact form

No logic changes. Includes the full security review report in
docs/security-review-jul-27.md.
2026-07-27 10:33:29 +02:00
callebtc
bcfc33f35c Group geohash people as People and Anon
Replaces the "on location" / "teleported in" / "anonymous" split with two
sections: peers who announced a nickname, then the anons.

Teleport state was never worth a section of its own -- every row already
carries it as a distinct glyph -- and splitting on it fragmented the short
list people actually read, in a channel where most participants are
anonymous anyway.

Self stays in the People section even when unnamed.
2026-07-27 10:33:29 +02:00
callebtc
9703ebfcaf Fix layout jumpiness in chat and geohash people list
Three separate causes of things moving when they should not:

- Chat lurched whenever a bottom sheet closed. Placement animation is meant
  to soften insertions and removals, but any relayout moves every item --
  a sheet's text field opening the keyboard changes the chat's IME inset,
  and closing it changes it back. Placement animation is now armed only
  briefly around a real change to the message list, so items otherwise
  track the viewport exactly.

- Anon list changed height as participants churned. Rows sized to their
  content, so any reorder could change the card's height; and the card
  sized to the live anon count, which moves constantly in a busy geohash.
  Rows now have an exact height, and a trimmed anon card reserves the full
  capped height regardless of how many are present beyond the cap.

- Anons are now their own trailing section rather than a tail on each of
  "on location" and "teleported in", which had pushed the few recognisable
  names out of view twice over. Self is never grouped as an anon.

Adds 7 tests covering the sectioning and the fixed-length behaviour.
2026-07-27 10:09:37 +02:00
callebtc
0cb28a4f3a Merge remote-tracking branch 'origin/main' into opus/redesign-proposal
# Conflicts:
#	app/src/main/java/com/bitchat/android/ui/AboutSheet.kt
#	app/src/main/java/com/bitchat/android/ui/ChatScreen.kt
#	app/src/main/java/com/bitchat/android/ui/LocationChannelsSheet.kt
#	app/src/main/java/com/bitchat/android/ui/debug/DebugSettingsSheet.kt
2026-07-27 04:53:45 +02:00
callebtc
5428bc9a03 animations 2026-07-27 04:22:16 +02:00
callebtc
8e849a7bbe fixes 2026-07-27 04:14:54 +02:00
callebtc
c0b1af3d0f button 2026-07-27 03:59:51 +02:00
callebtc
32d5e6f1dc cleanup 2026-07-27 03:51:25 +02:00
callebtc
3dbe9c1c52 lists 2026-07-27 03:50:46 +02:00