Commit Graph
1177 Commits
Author SHA1 Message Date
jack aae990f7ee Fix Swift 6 capture warning in AppRuntime and unused result in BLEService+Testing 2026-11-28 15:14:57 -10:00
jackandjack 72c1b6a719 Prep 2.0.0 App Store submission (#1962)
* Integrate Tier 1 2.0.0 security and reliability fixes (#1941, #1935, #1662)

* Add author block controls to Place Feed, Home Feed, and threads

* Prep 2.0.0 App Store submission: update Privacy Policy and bump build to 3

* Remove unrelated board calls from PlaceFeedView

* Address unaddressed Codex review findings (#1931, #1946, #1961, #1924)

* Fix autocorrection callsite in ContentComposerView after #1913/#1870

* Keep channel invite links intact in every language (#1818)

* Fence in-flight notifications on panic wipe and drop DM senderName userInfo (#1783)

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 15:03:12 -10:00
Jozef Koval 334bfbd7c3 Give the Tor stall test its own UserDefaults store (#1959)
The test wrote the Tor preference to UserDefaults.standard and then slept. Panic tests that ran during the sleep called PrivacyModeSettings.resetForPanic(in: .standard). When the saved mode is stealth, it writes true to the same key, so the first check failed.

ChatViewModel now takes userDefaults in its testable init (default .standard). The stall handler reads the Tor preference from it. The app still uses .standard.
2026-11-28 14:36:10 -10:00
Taksh Kothari 091be4a335 perf(nostr): 8x-17x faster Bech32 encode/decode with ASCII lookup tables and streaming polymod (#1899)
* perf(nostr): 8-17x faster Bech32 encode/decode with ASCII lookup tables and streaming polymod

* fix(lint): use failable String(bytes:encoding:) for HRP in Bech32.decode

* ci: rerun checks after the simulator job was cancelled
2026-11-28 14:36:06 -10:00
Jozef Koval 4637bb6849 Key cached message text on the sender color and own nickname (#1939)
A formatted row is cached on its message. The key held theme, seal, scheme and isSelf, but the text also shows the sender's color and highlights mentions of my nickname. A geochat sender outside the 5-minute roster kept the fallback color on earlier rows after they posted live, and a rename left the old mention highlight. Both are now part of the key.
2026-11-28 14:36:01 -10:00
Taksh Kothari 22451ca64c replay fix/noise-rate-limiter-unbounded-peer-maps onto current main (#1670)
History rewrite left this branch with no merge-base, so stale peer windows are pruned on the current sliding-window limiter.
2026-11-28 14:35:56 -10:00
Taksh Kothari 202e13cddf fix: let a resubscribing central recover from the announce rate limit (#1669)
* Document the subscription backoff ceiling

Split the existing PR change into a smaller reviewable piece.
Original change: Pin subscription recovery boundary and steady-state rate

* Let subscription announcements recover after sustained retries

Split the existing PR change into a smaller reviewable piece.
Original change: Pin subscription recovery boundary and steady-state rate

* Test subscription limiter recovery and admission bounds

Split the existing PR change into a smaller reviewable piece.
Original change: Pin subscription recovery boundary and steady-state rate
2026-11-28 14:35:51 -10:00
Jozef Koval e09d84fa18 Keep the geohash field focused when the keyboard opens (#1837)
A LazyVStack drops rows outside the visible area. When the keyboard
shrank the sheet, it dropped the focused geohash field. A VStack keeps
it, and the list is short.

Fixes #1797.
2026-11-28 14:35:46 -10:00
Taksh Kothari bfe7bd4b58 feat(ui): enable message autocorrection for normal chat input (#1870)
* feat(ui): enable autocorrection for regular chat messages while preserving it off for commands

* test(ui): add unit tests for composer autocorrection policy

* fix(ui): trim leading whitespace before detecting slash commands for autocorrection

* fix(ui): mark shouldDisableAutocorrection internal for unit test access

* fix(ui): move shouldDisableAutocorrection out of private extension
2026-11-28 14:35:42 -10:00
Taksh Kothari 3b9e6ae55f fix: drop BLE notify-on-connect options (#1758)
* drop notify-on-connect options from queued BLE connects

Those keys are what raises the lock-screen accessory prompt that names the app.

* drop notify-on-connect options from background pending connects

The wake-on-proximity arm path was the other place those options were passed.

* say people instead of users in the Bluetooth usage strings

House copy never says user, and these two lines were the ones still doing it.
2026-11-28 14:35:38 -10:00
jackandjack 7398f582f7 Format media, reply, and reaction previews cleanly across inbox and notifications (#1961)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 14:13:17 -10:00
Rod BahmanyariandClaude Opus 5.5 3746163c05 Route bare SwiftUI keys through the compressed catalog; guard against new ones (#1947)
Since #1928 the app targets no longer compile Localizable.xcstrings into
.lproj tables, so a string literal handed to Text/Label/TextField, or an
explicit LocalizedStringKey, finds no table and renders its raw key in
every locale. Dotted keys show the key itself, even in English.

Convert the seven affected call sites to String(localized:):
- settings nickname field (showed "content.input.nickname_placeholder")
- contact sheet verify button (two raw fingerprint.action.* keys)
- voice HUD "live %@" / "recording %@" (translated in the catalog, never shown)
- custom geohash field in LocationChannelsSheet and PlacesTabView (new
  location_channels.custom_geohash_placeholder key, 30 locales; bn/fa/hi
  reuse the catalog's existing transliterations, the rest keep the term)

Add noSwiftUILiteralKeysBypassTheCompressedCatalog, which fails on any
non-empty literal key under bitchat/ outside comments and #Preview blocks.
The three verify-sheet labels are allowlisted because #1815 rewrites
VerificationViews.swift.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 14:03:56 -10:00
Jozef Koval 2fac395c40 Keep parked Noise payloads when the proof watchdog fires with no session (#1744)
The capability-proof watchdog drains the peer's parked Noise payloads
whenever the timeout-restore deferral is off, whether or not a session
exists. The drain encrypts under the current session and never
re-queues, so with the handshake still in flight past the 5 s deadline
every encryption fails: media with a transfer ID gets a visible
rejection, and a delivery ack, read receipt, verify, vouch or group
payload is dropped with a log line.

No attacker is needed. Sending a photo to a private-media peer with no
session arms the watchdog and starts a handshake; anything parked
behind that handshake is lost if it outlives 5 s, which is ordinary
over a multi-hop mesh. noteNoiseSessionCleared re-arms the watchdog as
a session goes away, so a slow reconnect with a pending media decision
takes the same path.

Of the drain's four production callers the watchdog was the only one
without a session precondition; the timeout-restore case was already
held back by deferredOutbound. It now drains only under an established
session and otherwise leaves the payloads for the drain that runs when
the session authenticates. The policy resolution is unchanged.

proofTimeoutBeforeHandshakeLeavesParkedAckForTheSession drives it
through the public path -- resolvePrivateMediaSendPolicy, then
sendDeliveryAck -- and forces the watchdog as the neighbouring
proof-timeout tests do. Without the guard it fails on its last
expectation: the parked count goes from 1 to 0. It needs one DEBUG-only
count hook, because _test_privateMediaTransferState only sees payloads
that carry a transfer ID.

Encryption fails closed throughout; nothing is sent unencrypted. The
drain's error path still drops what it cannot encrypt; whether it
should re-queue payloads without a transfer ID is left for review
rather than changed here.

Full SwiftPM suite green: 2068 tests in 222 suites.
2026-11-28 14:02:48 -10:00
Jozef Koval 2a7f771524 fix(ui): scope composer drafts per window, fix panic-wipe and Bluetooth alert regressions (#1913)
* fix(ui): scope composer drafts per window, fix panic-wipe and Bluetooth alert regressions

* test(ui): isolate WaveformCache probe from concurrent panic-wipe tests

* fix(ui): scope stored drafts and mention autocomplete per window
2026-11-28 14:02:42 -10:00
Jozef Koval abaa95b6dd Remove the empty defaults on ChatTransportEventContext (#1958)
After #1949 and #1950, ChatViewModel had no copy of retryPendingReadReceiptsIfViewing. The empty default hid that, so the app built and the retry did nothing. Without defaults, a missing member fails the build. The test mock now records both calls.
2026-11-28 14:02:37 -10:00
Jozef Koval 02e6c31d7a fix(security): cancel the in-flight GeoRelay fetch and drop deferred prekey bundles on panic wipe (#1937)
* fix(security): cancel in-flight GeoRelay fetch and drop deferred prekey bundles on panic wipe

Follow-up to #1902. A detached task does not inherit cancellation, so resetForPanic() did not stop a relay-list request that had started. The fetch now forwards the cancel into the detached task.

resetIdentityForPanic() left pendingPrekeyBundles in place, so a bundle deferred before the wipe entered the prekey store when its owner authenticated later. The reset now clears the map.

Adds a fill, clear, probe test for the peer color cache behind a DEBUG-only probe.

* test: place the GeoRelay request-cancel test before the Tor-wait test

PR #1935 adds tests after the Tor-wait test. A different place keeps the two changes free of a merge conflict.
2026-11-28 14:02:33 -10:00
jackandjack 1c63ae6cab Add spatial Place Feed, Home Feed, BLE Gateway feed bridge, local WoT, Tor Blossom media, and 3D Globe beacons (#1934)
* Add spatial Place Feed, Home Feed, BLE Gateway feed bridge, local WoT, Tor Blossom media, and 3D Globe beacons

* Address PR #1934 review findings and Periphery dead-code scan

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 13:41:13 -10:00
jackandjack f20848740b Remove per-row lock and verified badges in private chats, show lock in group header (#1944)
* Remove per-row lock icon in private chats and show lock in group header

* Remove per-row verification badge from private chat rows

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 13:39:43 -10:00
jackandjack 1240953c26 Revert "Remove duplicate retryPendingReadReceiptsIfViewing redeclaration on ChatViewModel (#1950)" (#1956)
This reverts commit 9e00139146.

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 13:29:55 -10:00
jackandjack 9e00139146 Remove duplicate retryPendingReadReceiptsIfViewing redeclaration on ChatViewModel (#1950)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 13:01:31 -10:00
jackandjack 2322f928b7 Fix group chat background unread, dead-end status glyph, and retry timers (#1949)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 12:54:38 -10:00
jackandjack cfbb7e0205 Fix read-receipt eviction retry, GeoDM reconnect retry, and dead code (#1948)
* Fix read-receipt eviction retry, GeoDM offline queuing, and dead code

* Keep offline GeoDM read receipts retryable until DM relay connects

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 12:24:47 -10:00
jackandjack a00cc51be2 Harden offline-to-online and mesh-to-Nostr transport handoffs (#1946)
* Harden offline-to-online and mesh-to-Nostr transport handoffs

* Use inclusive identifiers in NostrRelayManagerTests for SwiftLint

* Fix Periphery dead-code findings on NetworkInterfaceSignature and unused helpers

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 12:24:40 -10:00
jackandjack 15ea762abc Harden read receipts: single owner, privacy controls, and encrypted persistence (#1945)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 11:26:34 -10:00
jackandjack 504541ae4c Require signed npub bindings on mesh favorites and surface short-ID ambiguity (#1936)
* Require signed npub bindings on mesh favorites and surface short-ID ambiguity

* Add command.fav.ambiguous localization entries across all locales

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 09:36:09 -10:00
jackandjack 46b735a572 Fix favoriting validation, offline toggling, blocking, and mutual-favorite routing (#1932)
* Fix favoriting validation, offline toggling, blocking, and mutual-favorite routing

* Address Codex review: persist linked Nostr unblock and replay deferred favorite mutations

* Remove unused Periphery-flagged symbols from favoriting cleanup

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 01:37:39 -10:00
jack 0947986c29 Enable audio background mode and exclusive PTT session category for Lock-Screen PTT 2026-11-28 01:21:21 -10:00
jackandjack 0d105d7e77 Enable full Swift/LLVM LTO, link-time outlining, and local package -Osize in Release (#1933)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-28 01:19:53 -10:00
jack 3e5310a457 Avoid publishing VoiceRecordingViewModel.state during SwiftUI alert updates 2026-11-28 01:15:27 -10:00
jack fec56edf43 Clamp chat ScrollView offset against programmatic overscroll on iOS 2026-11-28 01:11:21 -10:00
jack 43900e0689 Coordinate AVAudioSession handoff with iOS PushToTalk for Lock-Screen recording 2026-11-28 01:00:18 -10:00
jack f7ccde89f9 Add aps-environment entitlement required by iOS PushToTalk 2026-11-28 00:51:57 -10:00
jack d420855ceb Enable iOS Push to Talk entitlement and background mode 2026-11-28 00:48:51 -10:00
jackandjack 6f1deedb79 bitchat 2.0.0: Everyday Utility, Unified Liquid Glass Navigation & Polish (#1925)
* Add Phase 1 everyday utility: inbox tabs, encrypted history, friend invites, hybrid groups, and Privacy Mode

* Unify app chrome, sheets, DM navigation, and theme tokens across tabs

* Use slim 4-tab bottom bar with Settings tab and fix remote place titles

* Simplify all bars, sheets, and composers into one edge-to-edge chrome language

* Remove tap-to-info action from Nearby header title

* Keep floating glass bottom nav visible while typing and dismiss keyboard interactively

* Split Mesh Notices (Nearby) and Place Notes (Places) and fix first-mount top inset

* Use clean neutral Liquid Glass canvas and remove duplicate DM sheet backdrops

* Replace bottom nav with top-left dropdown, restore borderless floating glass, and move Location Notes to top of Places

* Bump version to 2.0.0, persist last tab, unify icons, and redesign notices sheets

* Unify 3D globe picker HUD onto floating Liquid Glass top bar and bottom dock

* Add swipe-right to pin and swipe-left to delete chats in inbox

* Place geo channel people count pill to the right of pin icon

* Clean up Nearby timeline: remove geo notes hint, gray echo band, and tighten top spacing

* Use normal title and sentence case across Settings and Info copy

* Move AppSupportFileStore disk writes and removals off the main thread

* Polish 2.0.0: async launch reads, onboarding, inbox search, delivery clarity, media/notifications, and copy casing

* Fix Release crash on launch: keep SwiftUI field metadata (without-names)

* Add in-chat search & jump, quoted replies, emoji reactions, and unified Contact Detail sheet (2.0.0 build 2)

* Add walkie-talkie deck and push-to-talk ergonomics

* Add Phase 3 walkie-talkie: mesh groups, auto-listen rules, and PushToTalk bridge

* Preserve 1.x Tor and RAM-only posture on upgrade, restore triple-tap wipe, and align privacy docs

* Fix compiler warnings in SystemPTTChannelManager and AppSupportFileStore

* Align peer colors across GeoDM avatars, quoted replies, and Light Mode self orange

* Indicate unread Nearby mesh messages in section switcher and Chats banner

* Remove pulsing MeshRadarView from empty Nearby chat

* Clip opaque photo blur inside card and refine dark mode reveal scrim

* Address PR #1925 review findings across invites, groups, history, and privacy mode

* Remove daily device sightings line from empty Nearby chat

* Fix SwiftLint unused_setter_value and Periphery dead-code warnings

* Remove remaining unused import and environment object for Periphery

* Replace stale mesh empty-state text with status-aware 1-liner

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 21:39:16 -10:00
jackandjack eb701f1edb Fix mesh relay suppression, directed spool, source routing, and gossip sync (#1931)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 19:54:50 -10:00
jackandjack f23dcf17dd Reduce iOS Release size: optimize Arti build-std and compress localizations (#1928)
* Optimize Arti xcframework for binary size with build-std and stripped logs

* Compress non-plural app localizations into Localizations.zlib

* Ignore unused comment parameter in compressed String(localized:) overloads

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 16:29:30 -10:00
jackandjack 29d20cadd0 Silence CLibSecp256k1 shorten-64-to-32 warnings via wrapper (#1927)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 15:39:12 -10:00
jackandjack 6a34773ca8 Harden BLE ingress, padding, scan duty, panic wipe, and remove NostrPoW bypass (#1924)
* Harden BLE ingress, padding, scan duty, panic wipe, and remove NostrPoW bypass

Tier 0 security, privacy, and battery fixes:
- Return early on unverified announces in BLEAnnounceHandler so spoofed
  announces cannot trigger dedup marks, UI refreshes, or forced announce-backs.
- Validate 0x25 group message framing and freshness before admitting to gossip,
  relay, or UI; drop unknown MessageType values instead of relaying up to 128 KiB.
- Remove NostrPoW and the 8-bit rateLimitBypassBits sender-bucket bypass;
  sign geohash kind-20000 events synchronously without cooperative-pool spin loops.
- Zeroize NoiseSymmetricState chainingKey and hash in place via memset_s.
- Use a 256-byte bucket stride in MessagePadding so every 1..2048 B frame pads
  within single-byte PKCS#7 limits (0..255 B) with no unpadded gaps.
- Duty-cycle active idle BLE scanning for solo and 1-2 peer meshes and disable
  AllowDuplicates when central links are saturated.
- Make TorManager panic directory wipe synchronous, restore userTorEnabled=true
  on panic, clear remaining in-memory caches/clipboard, mark clipboard local-only
  with expiry, and cover all connected iOS scenes in PrivacyScreen.
- Require explicit confirmation before Cashu clearnet web redeem, gate
  bitchat:// deep links during panicWipeBlocked, dedup BoardStore tombstones by
  (postID, authorSigningKey), protect Favorites/GroupStore against locked-boot
  overwrites, synchronize SecureLogger DateFormatter, and preserve image
  orientation + AFU file protection in ImageUtils.

* Gate ClipboardHelper.expirationInterval behind #if os(iOS) for Periphery

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 14:21:32 -10:00
jackandjack 94e81e8b66 Reduce iOS Release binary size with -Osize, local BitSecp256k1, and compressed Globe data (#1923)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 13:55:21 -10:00
jackandjack a09dca926c Avoid simulator boot CPU contention and scope PR iOS tests to iOS suites (#1922)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 13:42:59 -10:00
jackandjack c0b6fd164c Speed up CI workflows, fix SPM cache poisoning, and trim slow test waits (#1921)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 13:19:24 -10:00
jackandjack bca6cf00d2 Prep 1.8.1 iOS App Store submission (#1920)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
v1.8.1
2026-11-27 12:18:56 -10:00
Jozef Koval a10f5233d3 fix(ble,stores): fix PR #1893 slice crash, scan-pause lifecycle, courier panic fencing, and media store cache races (#1918)
- Normalize/rebase Data slice indices in BLEInboundWriteBuffer across both the sequential fast path and oversized early-return path (#1893/#1888).
- Move fragment scan-pause coordination from BLEService into BLERadioController (BLEFragmentScanPauseTracker), binding pause tokens to scheduler reservations and cancelling on stopServices, panic reset, cancelTransfer, releaseReservation, and Bluetooth power-off/reset.
- Fence BLEService+Courier acceptCourierDeposit and sprayCourierMail messageQueue.async hops with capturePanicLifecycleGeneration() / isCurrentPanicLifecycleGeneration(_).
- Add direct BLEOutboundFragmentPlanner.makePlan(packet:...) overload so private-media v1 compatibility checks avoid throwaway SHA-256 request hashing.
- Simplify BLEIncomingFileStore.DirectoryCache to PendingDeliveryTracker (also cleared in resetPrivateMediaReceiptsForPanic), remove directory-path cache and locked static DateFormatter in favor of POSIX Calendar formatting.
- Remove unused @discardableResult on MessageRouter.flushOutbox(for:fallbackPeerID:persist:), add unknown-ack test during unseenRecoveryPendingPersistence, and pass isLocationAuthorized in PanicWipeCoverageTests.
2026-11-27 11:58:06 -10:00
jackandjack becdeb330b fix(ui): fix double top inset in Liquid Glass chat with overlay chrome and content margins (#1917)
* fix(ui): replace nested safeAreaInset with overlay chrome and scroll content margins

* fix(ui): keep single-level safeAreaInset on iOS 16/macOS 13 for programmatic scroll targets

* fix(ui): reset ScrollView identity per timeline context to avoid stale contentOffset

* fix(test): share isolated LocationChannelManager between ChatViewModel and smoke feature models

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 11:23:38 -10:00
Krystof KratkyandClaude Opus 5.5 7999b1e192 Fill the topology sheet so its background reaches the edges (#1876)
In the empty state the topology content has no width-flexible child, so
the VStack hugs the widest caption line. The themed sheet background takes
that narrow frame, and the system sheet gray shows as gutters on the left
and right. Give the content a full-size frame, like FingerprintView does.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-27 10:51:54 -10:00
jackandjack cc37cb0946 Fix App Group defaults lookup and preserve restored BLE GATT service (#1919)
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 10:49:45 -10:00
jackandjack 87ae09c316 Fix MainActor Equatable warnings in message views and update test callers (#1916)
* Fix MainActor Equatable warnings in message views and update test callers

* Update Xcode LastUpgradeCheck and scheme versions to 2720

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 10:11:48 -10:00
Jozef Koval c513183123 fix(nostr): handle NostrProcessedEventStore write failures and drain deferred recovery IDs (#1908) 2026-11-27 09:43:45 -10:00
jackandjack 0047ba008f Harden BLE ingress, media bounds, DM read-state/notifications, and storage/URL safety (#1914)
* Require signature verification for self-addressed public messages

* Reject fragmented and foreign-directed REQUEST_SYNC packets

* Gate DM read receipts on app active state and notify delayed Nostr DMs

* Cap media deflate ratio and protect private media from public quota eviction

* Use background-accessible file protection and allowlist message URL schemes

* Track macOS active/inactive transitions for DM read-receipt gating

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
2026-11-27 09:42:29 -10:00
Jozef Koval f464331202 fix(security): bound CashuTokenDecoder cache by token length and byte cost (#1907) 2026-11-27 09:40:24 -10:00