mirror of
https://github.com/block/buzz.git
synced 2026-11-24 18:21:59 +00:00
## What changed Previously opened channels can show their newest saved page after a cold launch, including offline. The same timeline provider combines the saved page with live edits, deletions, and optimistic sends. When the relay has loaded history, its timeline takes over and older-page navigation becomes available. The chat labels saved messages until relay history takes over. If a connected refresh fails, the chat offers Retry and keeps the saved-message label visible during the retry. - Keep verified relay events in a disposable, app-private SQLite cache per community and signing identity on iOS and Android. Close SQLite connections after each operation. - Cap the main file at 45 MiB to leave room for a rollback journal within the 100 MB per-community limit. Evict least-recently opened pages and retry once when SQLite reaches the physical limit. - Omit an oversized relay page as a whole so the cache cannot show a message without an edit or deletion from the same response. Keep readable pages available when only the recency write fails. - Purge on leave, deletion, explicit channel access refusal, and writer-confirmed loss of a known membership. Expired sessions leave the cache intact. SQLite secure deletion clears removed payloads after commit. A durable marker covers interrupted purges. Account switches and removal retire old saves. - Keep message-link lookups valid across the first connection. An access refusal still discards a late result. - After a confirmed leave or delete, record a durable cache purge before refreshing the channel list. Disk cleanup runs in the background and the refresh skips redundant writer confirmation for that channel. - For joined, unarchived channels, remove stale saved rows on channel-tagged deletions or edits the app receives while the conversation is closed. Reuse deletions from the existing reconnect catch-up. - Give an already-connected relay one 250 ms head start before reading the saved page. Offline opens start the read immediately. ## Screenshots and timing [iPhone 17e simulator captures](https://github.com/block/buzz/pull/9809#issuecomment-7050704433) show the same seeded chat before the cache, with saved messages while offline, and after the relay returns. In the debug capture run, the baseline `9c0bcd623` showed no messages within 8 seconds. The updated build `2cb28eda` showed the target saved message **752 ms** after the tap. For a first online open on the same simulator, the baseline and the instrumented `2cb28eda` build took **449 ms** and **441 ms** median from tap to target message. Each build had four measured opens after one warm-up. The ranges were 437–481 ms and 414–447 ms. In the earlier paired debug simulator experiment on `6e113d83`, the 250 ms preview delay reduced median first online open from **507 ms to 452 ms** across 15 measured opens per build. In the delay build, seeded offline opens took **488–557 ms** across the two channel medians, and reopens in the same app session took **174–245 ms**. All 20 offline opens and reopens showed the target message. ## Verification - The mobile pre-push gate and file-size check passed for `6650ebad`. Regression tests cover oversized pages, session expiry versus channel revocation, live mutations during preview, paging after relay history loads, writer-confirmed membership loss, closed-chat edits and deletions, the saved-message label across Retry and history takeover, links held across first connect, and interrupted or overlapping purges. - The host SQLite probe interrupted eviction, relay-key rotation, and a synthetic table rewrite. All three reopened with a clean integrity check. The largest observed database and journal footprint was 93.84 MB. - Physical iPhone suspension, airplane-mode reopen, and profile-mode timing are pending. ## Try it 1. While connected, open a populated channel and let its newest page save. 2. Force-quit, turn on airplane mode, and reopen the same channel. The saved page should appear. 3. Reconnect. The relay's newest page should take over without duplicating messages. A saved page can still show stale rows while the phone stays offline, for a live edit missed while the app was stopped, for an archived or unjoined public channel, or for a NIP-09 deletion without a channel tag. Reconnect catch-up covers the deletions returned by its bounded unread query. A direct online open refreshes the page. Offline thread replies are separate follow-up work. --------- Signed-off-by: Wes <wesb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz> Co-authored-by: Star Lord <b89298dbe87c6b3fd8a425b535d9d161f23c88d555a47925ae0b04dfe02b201e@buzz.block.builderlab.xyz> Co-authored-by: Rocket <0c41329ade659e01801116549bc617351689892a382bc864a1186dc9191293a7@buzz.block.builderlab.xyz> Co-authored-by: Mantis <530af7635ef7d0e1a5189d234338db88cb4ef1ede7119b4ebb4fb05c3eafe3b1@buzz.block.builderlab.xyz> Co-authored-by: Tom Brow <tomb@block.xyz> Co-authored-by: studio <dc2fc481343672df31a689840c09299972e704dac592e0da6f18486646a7ee3e@localhost>
114 lines
3.0 KiB
YAML
114 lines
3.0 KiB
YAML
name: buzz
|
|
description: Buzz mobile client
|
|
publish_to: 'none'
|
|
version: 0.0.0+1
|
|
|
|
environment:
|
|
sdk: ^3.11.4
|
|
flutter: ">=3.47.9"
|
|
|
|
dependencies:
|
|
flutter:
|
|
sdk: flutter
|
|
cupertino_icons: ^1.0.8
|
|
# Grapheme-cluster segmentation, for deciding whether a message body is
|
|
# nothing but emoji. Already present transitively via the Flutter SDK;
|
|
# declared here because we import it directly.
|
|
characters: ^1.4.0
|
|
# Fakeable time for presence release ages. Already present transitively via
|
|
# the Flutter SDK; declared here because we import it directly.
|
|
clock: ^1.1.2
|
|
hooks_riverpod: ^3.0.3
|
|
flutter_hooks: ^0.21.3
|
|
http: ^1.4.0
|
|
# Native HTTP transports, NSURLSession on iOS and Cronet on Android: HTTP/2
|
|
# and native gzip. See lib/shared/http/app_http_client.dart.
|
|
cronet_http: ^1.10.1
|
|
cupertino_http: ^3.1.0
|
|
jni: ^1.1.0
|
|
objective_c: ^9.5.0
|
|
crypto: ^3.0.7
|
|
flutter_secure_storage: ^10.0.0
|
|
flutter_svg: ^2.2.4
|
|
mobile_scanner: ^7.0.0
|
|
shared_preferences: ^2.5.5
|
|
web_socket_channel: ^3.0.1
|
|
connectivity_plus: ^7.0.0
|
|
nostr: ^2.0.0
|
|
buzz_secp256k1:
|
|
path: packages/buzz_secp256k1
|
|
pointycastle: ^4.0.0
|
|
url_launcher: ^6.3.2
|
|
gpt_markdown: 1.3.4
|
|
highlight: ^0.7.0
|
|
intl: ^0.20.2
|
|
uuid: ^4.5.1
|
|
file_selector: ^1.1.0
|
|
camera: ^0.12.0+2
|
|
image_picker: ^1.1.2
|
|
image: ^4.8.0
|
|
google_mlkit_selfie_segmentation: ^0.11.0
|
|
photo_manager: ^3.11.0
|
|
video_player: ^2.10.1
|
|
just_audio: ^0.10.6
|
|
record: ^6.2.1
|
|
package_info_plus: ^10.0.0
|
|
app_badge_plus: ^1.2.10
|
|
app_links: ^6.4.0
|
|
scrollable_positioned_list: ^0.3.8
|
|
open_filex: ^4.7.0
|
|
path_provider: ^2.1.6
|
|
share_plus: ^13.3.0
|
|
local_auth: ^3.0.2
|
|
unorm_dart: ^0.3.3
|
|
duo_kit: 0.1.1
|
|
flutter_cache_manager: ^3.5.0
|
|
file: ^7.0.1
|
|
path: ^1.9.1
|
|
sentry_flutter: ^10.5.0
|
|
sqlite3: 3.9.1
|
|
|
|
dev_dependencies:
|
|
leak_tracker: ^11.0.2
|
|
shared_preferences_platform_interface: ^2.4.2
|
|
flutter_test:
|
|
sdk: flutter
|
|
flutter_lints: ^6.0.0
|
|
fake_async: ^1.3.3
|
|
camera_platform_interface: ^2.13.1
|
|
custom_lint: ^0.8.0
|
|
riverpod_lint: ^3.1.0
|
|
mocktail: ^1.0.4
|
|
# Test-only platform interface fakes (depend_on_referenced_packages).
|
|
path_provider_platform_interface: ^2.1.2
|
|
plugin_platform_interface: ^2.1.8
|
|
video_player_platform_interface: ^6.6.0
|
|
|
|
flutter:
|
|
uses-material-design: true
|
|
shaders:
|
|
- shaders/toast_island.frag
|
|
- shaders/onboarding_wordmark.frag
|
|
assets:
|
|
- assets/images/welcome-bee.svg
|
|
- assets/images/buzz-icon.png
|
|
- assets/images/shell-gradient.png
|
|
- assets/images/buzz-wordmark.png
|
|
# Generated by `just mobile-emoji-data` from the same emoji-mart dataset
|
|
# desktop uses. Do not hand-edit.
|
|
- assets/emoji/emoji-data.json
|
|
fonts:
|
|
- family: BuzzTabler
|
|
fonts:
|
|
- asset: assets/fonts/TablerIcons.ttf
|
|
- family: Inter
|
|
fonts:
|
|
- asset: assets/fonts/InterVariable.ttf
|
|
- asset: assets/fonts/InterVariable-Italic.ttf
|
|
style: italic
|
|
- family: GeistMono
|
|
fonts:
|
|
- asset: assets/fonts/GeistMono-Variable.ttf
|
|
- asset: assets/fonts/GeistMono-Italic-Variable.ttf
|
|
style: italic
|