Paul HittandClaude Opus 5 75d7113ad3 Compose a reply (android#16)
The receiving half already worked. `Content.Reference` was in use for
reactions, an inbound reply was recognised and rendered, and `Session.Line`
already had an `about` field to hold one. What was missing was any way to START
one: no Reply in the long-press menu, no composer state, and `Session.send` had
nowhere to put a reference.

So this is narrow, as the ticket said: `Session.send(replyTo:)` passes the
reference to `Content.text(about =)` and records it locally, a Reply item sits
above Forward in the menu, and a dismissible strip above the composer says who
is being answered.

🔴 **The preview travels with the reply, and dropping it to save bytes is not a
free optimisation.** A recipient who joined the thread later or cleared their
history has never seen the message being answered — "> [missing]" is worse than
showing what was said. A test says so rather than a comment.

⚠️ **Visible before it is sent.** A reply that only appears in the sent message
is a mode nobody can see they are in, and the commonest way to answer the wrong
message is not to know you were answering one.

⚠️ **1:1 only, and the menu item is ABSENT rather than disabled in a group.**
The group send path does not carry a reply yet; accepting one there and dropping
it would be a half-feature that looks whole. The same reasoning the file already
applies to Edit and Pin on messages written before ids existed.

Three wire tests. One of them pins that a message which is NOT a reply still
goes out as a bare body — adding this must not have turned every plain message
into an envelope an older peer reads differently.

⚠️ Not included, and its own piece: tapping the quote to jump to the message it
names. That needs a scroll-to-id in the transcript list.

158 tests, 0 failures.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-07 15:45:51 -04:00
2026-09-07 15:45:51 -04:00
2026-08-21 18:22:30 -04:00
2026-08-21 18:22:30 -04:00
2026-08-21 18:22:30 -04:00
2026-08-21 18:22:30 -04:00
2026-08-21 18:22:30 -04:00

Flamenet Messenger — Android

The Android app, and the two libraries under it.

engine/   the protocol: X3DH, Double Ratchet, sealed sender, safety numbers,
          key transparency. Plain Kotlin/JVM — no Android in it at all.
client/   the relay transport: HTTP, auth, the §8 routes.
app/      the Compose app.
interop/  the cross-engine driver; not shipped.

engine and client are deliberately plain JVM libraries. The protocol has nothing to do with Android, and keeping it off the platform means their tests run anywhere a JVM does — no SDK, no emulator, no device, which is also what lets them gate in CI on Linux:

./gradlew :engine:test :client:test

The app's own unit tests need the Android SDK but still no emulator (Robolectric):

./gradlew :app:testDebugUnitTest

Where it stands

PARITY.md is the definition of done for this app — read that, not this. Every row there names the iOS file it came from so it can be re-checked rather than trusted. Headlines as of 2026-08-28: messaging, groups, attachments, voice notes, stories, calls, sealed sender, key transparency and the encrypted vault are built and tested; a cross-platform round trip against iOS was verified on 2026-08-26.

⚠️ This file said "Nothing here is an app yet" until 2026-08-28, above a tree containing the finished app — the README described the repository as it was when the engine landed and nothing updated it as the app grew around it. If a claim here ever disagrees with PARITY.md or with the tree, believe those, and fix this.

Why the engine came first, and is held to the vectors

An Android client needs the protocol implemented a third time, and the third implementation is the one that finds the places where the specification says less than the two existing engines quietly agreed on — but only if it is written against the spec and the published vectors rather than against a reading of our own Swift and JavaScript. So the engine is held to test/vectors/protocol-v1.json in flamenet-e2e — the same file the other two engines are checked against, read from that repository rather than copied here, because a copied vector file drifts and a drifting vector file stops being a check. PublishedVectorsTest looks for it beside this checkout and fails loudly if it cannot find it; FLAMENET_VECTORS overrides the search.

Two implementations that agree may both be wrong in the same way, especially when one was written while reading the other. The audit-path ordering in §19 is the worked example: a top-down reading of a bottom-up path produces the correct root for every left-spine index, so it passes any test that only checks index 0. The vector file pins a right-descending index for that reason, and the Kotlin tests assert both that the published path verifies and that the same path reversed does not.

If this engine ever disagrees with the file, the interesting question is which of the three is wrong — not this one by default.

Contributing and security

  • CONTRIBUTING.md — building (JDK 21, JAVA_HOME is not optional on a Mac), the test gate, and the platform traps that cost an hour each.
  • PARITY.md — what iOS does, what this does, and what is left. It is the definition of done for this app.
  • SECURITY.md — threat model and where to send a vulnerability report. Not an issue tracker matter: security@flamenetmessenger.com.
S
Description
Flamenet Messenger for Android — the Kotlin engine, held to the published protocol vectors. No app yet. MIT.
Readme MIT
22 MiB
Languages
Kotlin 99.3%
Shell 0.6%
Python 0.1%