v0.2.0: bubble for Android 0.2.0 — chat search, swipe for unread, faster chat opening

Desktop:
- Search lists chats whose own name matches first, so a named group
  isn't pushed out of the top 8 by chats that merely include a member.

Android (Rabbit R1) app, 0.2.0:
- Pull the chat list past its top for a search box (name, person,
  number, then group members; archived chats too; Back clears it).
- Swipe right to left marks a chat unread / read over a magenta band;
  left to right still archives (SwipeActions replaces SwipeArchive).
- Google Voice chats don't offer voice notes in the paperclip bubble.
- Chats open with their newest 60 messages, then the full history;
  marking read (and the Google Voice network call) waits until they're
  on screen. Cached pictures show at once, and one slow download no
  longer blocks the other images. Fixed a contacts reload race.
- Sandbox data gains filler chats, a named group and a 4,000-message chat.

Also: the Android app, Google Voice support, media, export, emoji and
the other work since the first commit, and a CLAUDE.md carrying the
privacy rule.
This commit is contained in:
2026-11-06 02:19:56 -08:00
parent 241a44f0ee
commit cde8cc6c55
116 changed files with 13014 additions and 379 deletions
+21 -19
View File
@@ -14,23 +14,25 @@ export function formatNumber(n: string): string {
return n
}
// Split text into voip.ms-sized parts (160 chars max per sendSMS call),
// preferring to break on whitespace.
export function splitMessage(text: string, max = 160): string[] {
const parts: string[] = []
let rest = text.trim()
while ([...rest].length > max) {
const chars = [...rest]
let cut = max
for (let i = max; i > max * 0.6; i--) {
if (/\s/.test(chars[i])) {
cut = i
break
}
}
parts.push(chars.slice(0, cut).join('').trimEnd())
rest = chars.slice(cut).join('').trimStart()
}
if (rest) parts.push(rest)
return parts
// Group chats (Google Voice only) are keyed by their members' numbers, sorted
// and comma-joined, in the place a 1:1 chat keeps its one number.
export function groupKey(numbers: string[]): string {
return [...new Set(numbers.map(normalizeNumber).filter(Boolean))].sort().join(',')
}
export function isGroup(contact: string): boolean {
return contact.includes(',')
}
export function groupMembers(contact: string): string[] {
return contact.split(',')
}
// voip.ms's sendSMS takes at most 160 characters. Longer texts go out as one
// text-only MMS, which the recipient sees as a single message (split SMS arrive
// as separate fragments, often out of order).
export const SMS_TEXT_LIMIT = 160
export function charCount(text: string): number {
return [...text].length
}