- 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.
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>
* 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>
* 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>
* Fix composer control overlap at large text sizes
At accessibility XXXL, the composer icons outgrew their fixed 36-point
frames, causing attachment/send accessibility-bounds overlap in the
280-point Matrix iOS simulator fixture.
All six frames used by the attachment, send and microphone controls in
ContentComposerView now use a .title2-relative @ScaledMetric with a
36-point default, so their allocations follow the icons' scaling.
Automatic regression tests cover iOS composer interactions, selected-language
layouts and photo-picker callbacks, plus macOS controls.
* Preserve the 36-point minimum for composer controls
Keep all six composer control frames at least 36 points while
preserving growth at larger Dynamic Type sizes.
* Test the composer minimum size and report UI test failures
Add extra-small Dynamic Type coverage for 36-point control allocations
in both themes using the existing test host.
Print assertion errors and failed test cases from the saved runner log,
and update the coverage documentation.
* Simplify composer sizing regression tests
Move the shared frame sizing into a modifier and test icon
containment and the 36-point minimum in the existing iOS target.
Remove the dedicated composer hosts, runners, model injection
and associated package, project and CI changes.
* fix: improve dark-mode contrast for blue and purple peer colors
* fix: guarantee >= 4.5:1 dark-mode contrast across 210-306 deg and preserve ring separation
§7 said "explicit accept before anything touches disk", which reads
like a user step. The code has none before the write: the validator
runs and the handler saves the file.
Revoking location access mid-session left kind-20001 presence going to
the last region, province and city cells until relaunch, and kept the
mesh bridge's rendezvous on the last neighborhood cell. Both read
LocationStateManager.availableChannels, which outlived the permission,
and neither checked the permission itself.
- GeohashPresenceService checks the permission before each heartbeat
and again after the decorrelation delay. The loop keeps running, so
presence resumes once access comes back.
- The bridge's locationCell goes through BridgeService.ownLocationCell,
which returns nil without authorization, so the rendezvous closes and
no presence or message copy goes to the old cell.
- LocationStateManager forgets the last fix (channels and place names)
when access is revoked, before the new permission state publishes. A
fix CoreLocation delivers after the revocation is ignored and not
geocoded, and a place-name lookup that lands late is dropped.
NearbyNotesCounter and GeoChannelCoordinator keep their own permission
checks. Three tests asserted that the channel list survives revocation;
they now assert it is cleared.
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* Require Noise-authenticated signing keys and valid clock window for prekey bundles
* Capture voice note destination at hold start and stop recording immediately on release
* Fail private messages exceeding the 255-byte TLV wire limit
* Flush 64-hex outbox aliases on reconnect and normalize BLE receipt peer IDs
* Defer unbound BLE link binding until announce verification succeeds
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
* Redesign private-media disk storage and receipt ledger around UUID names and atomic snapshot
* Consolidate ViewModel shared contexts, Combine mirrors, and PrivateChatManager
* Fold BLE micro-files and split BLEService by domain
* Merge SecureNoiseSession into NoiseSession and consolidate NoiseSessionManager slots
* Extract shared CarrierRelayEngine, add Transport defaults, and split NostrRelayManager
* Share outgoing voice-note path helper and trim unused NostrRelayManager imports
* Remove extra trailing newline in NostrRelayManager.swift
* Protect pending UI media deliveries from quota eviction and remove unused QueuedUplink wrappers
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
* Remove dead binary message, NoiseMessage, ReadReceipt, and InputValidator code
* Remove dead MessageFormattingEngine body and port single-pass hint scanner
* Remove dead AppEventStream, coordinator methods, and write-only ViewModel state
* Remove dead BLE/Sync helpers, obsolete ingress lock, and gate debug diagnostics
* Remove dead Noise, Nostr, TorManager, and BitFoundation code
* Remove dead Identity ephemeral sessions, nicknameIndex, and favorite APIs
* Remove StoreAndForwardMetrics, dead service APIs, and gate test-only helpers
* Remove dead UI verify sheet, ImageUtils NSImage path, voice metering, and stale strings
* Remove obsolete isConnected assertions in coordinator context tests
* Address PR 1903 review: preserve legacy panic cleanup and remove Periphery leftovers
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
Live voice streams a hold to other people before it is released and plays
strangers' live bursts out loud as they arrive. In 1.8.0 it defaults on, so
people get both without choosing them. Make it opt-in:
- PTTSettings falls back to off, with store-injecting forms like
NotificationPrivacySettings so tests can pin the default.
- Panic wipe resets the preference, so a wiped device comes back off.
- The live-voice coordinator reads the switch through an injectable
provider; the outbound capture gate and the inbound player use it.
- The settings subtitle says it is off by default and what turning it on
does, in all 30 locales.
Tests pin the default and the panic reset, check that a hold on the public
mesh records a classic note while the switch is off and goes live only once
it is on, and opt the existing live-voice fixtures in explicitly.
Split from #1660, which keeps slide-to-cancel.
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(ui): fix double top inset in chat and optimize crowded-room entry and scrolling
- Remove the wrapping GeometryReader and VStack around MessageListView's ScrollView under .safeAreaInset chrome so the first message no longer receives a double top safe-area inset (appearing halfway down the screen above the keyboard in Liquid Glass), and replace the implicit TupleView inside ScrollView with an explicit leading-aligned container.
- Extract Equatable MessageRowView and TextMessageView so appending a new message skips diffing, formatting, media checks, and context-menu construction for unchanged rows.
- Batch crowded-room public pipeline flushes into a single ConversationStore.appendBatch mutation and cap synchronous prewarming to the bottom viewport window.
- Share MessageFormattingEngine's single-pass UTF-8 hint scanner with BitchatMessage.contentScan and ChatMessageFormatter, add O(1) length/whitespace fast paths, and short-circuit mention/haptic/geohash-identity hot paths.
- Optimize chat entry and autocomplete by skipping debounce task spawning without '@', gating CommandSuggestionsView on '/', hoisting static localized composer strings, pre-filtering geohash candidates by prefix, and selecting top-5 mentions in O(N).
- Tune initial window size (150) and scroll follow throttle (0.15s) and add iOS layout + batch-store regression tests.
* fix(ci): satisfy Periphery scan on macOS for composer strings and message list
---------
Co-authored-by: jack <jackjackbits@users.noreply.github.com>
* Fail closed on transient Keychain read errors in identity cache, Nostr bridge, and prekeys
* Remove unused secureClear(_: inout String) in FaultInjectingKeychain for Periphery
* Use shared MockKeychain with per-key fault filter to satisfy Periphery
- Skip no-op outbox disk writes on already-cleared delivery/read acks when durable
state is loaded (MessageOutboxStore.hasDeferredDiskState), and hoist persistOutbox
out of courierBecameAvailable and flushAllOutbox loops.
- Skip duplicate disk writes in CourierStore.deposit when copy budget is unchanged
and guard carriedCount MainActor publishes.
- Cache resolved standardized media directories and reservedPayloadPaths in
BLEPrivateMediaReceiptStore and BLEIncomingFileStore (eliminating thousands of
createDirectory syscalls per incoming file save), hoist CharacterSet, and reuse
a lock-guarded DateFormatter.
- Add BLEInboundWriteBuffer.remove(for:) on central unsubscribe (plugging per-central
buffer leak), fast-path sequential appends, and pre-check wire header length before
BinaryProtocol.decode.
- Precompute contentKey/resolvedTransferId once in BLEOutboundFragmentTransferRequest.
- Move courier store deposit/spray off MainActor onto messageQueue, combine peripheral
and central link snapshots into single bleQueue.sync hops in sendEncrypted,
sendOnAllLinks, and checkPeerConnectivityOnEngine, and coordinate scan pauses across
overlapping fragment transfers.
- Isolate composer draft text and autocomplete debounce task in ComposerDraftModel
and split @mention autocomplete out of ConversationUIModel into
ComposerAutocompleteModel so keystrokes only re-evaluate ContentComposerView
instead of ContentView and all 300 message rows.
- Inject non-observing AppEnvironmentModels so ContentView and sheet containers
can forward models into sheets (#1558) and closures without subscribing to
publicChatModel, privateInboxModel, peerListModel, verificationModel, or
conversationUIModel.
- Split MessageListView into PublicMessageListView and PrivateMessageListView
hosts so public and DM timelines never invalidate each other.
- Guard redundant publishes in PrivateConversationModel, PeerIdentityStore,
AppChromeModel, LocationChannelsModel, and ConversationUIModel.
- Cache mesh palette rebuilds in ChatMessageFormatter via meshPeerMembershipRevision
and reuse viewModel.geohashIdentity(for:).
The buffer completion callback read `engine.isRunning` on the
AVAudioPlayerNode completion queue. `AVAudioPlayerNode.stop()` holds the
engine lock while it waits synchronously for that queue, so a main-thread
stop (category-escalation rebuild, teardown) deadlocked and the watchdog
killed the app (0x8BADF00D). Seen on device when opening the video camera
while a live stream's audio was playing.
Classify completions on a private serial queue instead, so the node's
completion queue never touches the engine.
(cherry picked from commit bf1e1e70b2)
* Close panic-wipe leaks across shadow key caches, singletons, disk stores, and VoiceRecorder
* Import BitLogger in VoiceRecorder for timeout warning
* Use BridgeService.locationCell in PanicWipeCoverageTests
* Address Codex review: fence MainActor ACK tasks and WaveformCache writes across panic wipe
* Validate incoming BLE image dimensions at ingest and downsample at render
* Fix MimeType interpolation and include .jpg alias in ImageContainerValidator
* Header: add a gear button that opens settings, on the settings pane
Settings were reachable only by tapping the "bitchat/" wordmark, which
reads as static text — new users have no way to find it. Add a gearshape
button at the right end of the header icon cluster that opens the App
Info sheet directly on its settings pane: the sheet's pane memory is
sticky and defaults to info, so a control labeled "settings" would
otherwise land first-time users on the info tab. The logo tap stays as
a shortcut and keeps the sticky last-used pane, and the deliberately
undiscoverable triple-tap panic wipe is unchanged.
The label/tooltip ships as a new content.header.settings key seeded
with copies of the catalog's existing "settings" translations, so it is
localized in all 30 supported languages from the start.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Review follow-ups: globe deep-link, fil translation, pane-routing test
Three items from review feedback on the gear PR:
- The gateway globe's accessibility hint promises "opens settings", but
its action presented the sheet on the sticky pane. It now passes
.settings like the gear.
- fil had English "settings" marked translated (Chessing234's catch);
now "mga setting", matching the catalog's own fil precedent in
content.accessibility.gateway_settings_hint. Also applied to
app_info.tab.settings — the label of the very tab both controls
deep-link to — so fil users don't hear "mga setting" and land on a
tab labeled "settings". (content.alert.bluetooth_required.settings
names the iOS Settings app and is left for a separate pass.)
- A regression test pins the routing contract: a promised pane
overwrites the sticky appInfo.selectedPane default, a plain present
never touches it, and first-open leaves the key absent so new users
still land on Info.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Nickname matching could put one peer's messages in another peer's
private chat on DM arrival or chat opening. A reply or explicit Resend
could then target the wrong peer. GeoDM Block could also block a
matching mesh peer while leaving the sender unblocked.
Remove both history rules and the unread-name fallback. Keep fingerprint
and known-key joins. Join courier full-key and derived short-ID history,
preserving mesh sender IDs and recognizing the aliases for receipts.
Resolve geohash Block by the sender's mapped key; stop if it is missing.
Correct the fingerprint-test fixture to resolve through the transport.
Restoring the removed rules fails their regressions. App, package and
simulator tests, performance checks, SwiftLint, unsigned iOS simulator
and macOS Release builds, and macOS Periphery pass. iOS Periphery
matches the local baseline. No hardware run; receipts tested to
transport handoff.
* Port the Android globe geohash picker to iOS
Adds the 3D globe picker from bitchat-android: a map button next to the
geohash field opens a full-screen orthographic globe (Natural Earth land,
borders and cities, geohash grid, crosshair) with drag/fling, pinch, tap
and double-tap, precision buttons and a fly-in to the current geohash.
Selecting teleports like typing a geohash.
Beyond a straight port:
- Fix ocean painted as land: the point-in-ring test counted the
antimeridian seam as a crossing for Eurasia, flipping its fill over the
Pacific and Atlantic. Android has the same bug.
- Motion detail only steps down within one gesture, so layers no longer
flash on and off while dragging.
- The geohash grid and city dots draw at every detail level instead of
vanishing while the globe moves.
Extracts GeohashCoverage so the sheet and picker share the cell-size
string, and adds the picker strings in all locales.
* Let the globe reach polar targets past the drag limit
A polar cell's center can lie past the ±89° drag limit (zzzz is at
89.91°). The animated intro clamped its latitude there and selected
zzzf, while the Reduce Motion path kept zzzz. Animations now always
reach their target; dragging keeps the limit on the far side and never
snaps a polar view back to it.