Phase 4 of docs/subgroups.md. Two tags on the ritual proposal, and only on the proposal. Neither is believed by anything. **`parent_group` says the ceremony is opening a subgroup.** `acceptProposal` files it on `DkgSession.parentChatRoomId` and the ritual screen will read it. Anybody can claim any parent and nothing is granted on the claim -- the participant set is still the p-tags, the threshold is still the threshold, and a proposal naming a group the receiver has never heard of opens exactly the ceremony it would have opened without the tag. The claim that decides anything is the birth certificate two steps later, which the parent's own quorum signs and which any device can check against the parent's room id alone. Carrying it is still worth it. Without it a member selected for a subgroup watches a shared key ceremony open in a room they did not ask for, with nothing saying what it is for. Being told is worth having even when the telling is not evidence, and the KDoc on the parser, the column and the `acceptProposal` call site all say so, because this is exactly the sort of field somebody later reaches for as if it meant something. **`subject` fixes a bug that predates subgroups.** `NostrDao.getOrCreateNip17ChatRoom` has always built the receiving side's room with `subject = decryptedGiftWrapPayload.parseSubject()`, and nothing on the ritual path ever wrote a subject tag. Standing up a NIP-17 room sends nothing to anybody, so the ritual proposal is routinely the first anyone hears of the room -- which meant the member who typed the name saw it and every other member got an untitled chat with a key ceremony already running in it. `SelectChatRoomTypeViewModel` has been passing a subject to `createNip17ChatRoom` that reached the creator's own device and stopped there. `broadcast` now reads `localChatRoom.chatRoom.subject` for the proposal, so every robust group created from here on names itself on the way out. Read and written through quartz's own `SubjectTag`, because it is the same tag and the same field it lands in. **Both are on the proposal alone.** Every later message belongs to a session the receiver already has both facts for, so repeating them would be bytes per round to restate something settled -- and would give a later message a say in what an opened ceremony is for. `includeParent` and `subject` are parameters of `broadcast` alongside the existing `includeThreshold`, which already works this way. `proposeRitual` and `DkgRepository.proposeRitual` take an optional `parentChatRoomId`; every existing call site is unchanged and gets null. Three tests in `RobustRoomKeyCeremonyTest`, which already stands up a real NIP-17 room and a real ceremony: the proposal carries the room's name and no later message repeats it; an ordinary ceremony claims no parent on any message; and a subgroup ceremony names its parent on the proposal alone, records it on the session, and changes nothing about the threshold or the participant count. Each walks every queued payload rather than checking the proposal alone, since the failure worth catching is a tag written on the wrong message. 396 common tests and 686 jvm tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This is a Kotlin Multiplatform project targeting Android, iOS, Desktop (JVM).
-
/composeApp is for code that will be shared across your Compose Multiplatform applications. It contains several subfolders:
- commonMain is for code that’s common for all targets.
- Other folders are for Kotlin code that will be compiled for only the platform indicated in the folder name. For example, if you want to use Apple’s CoreCrypto for the iOS part of your Kotlin app, the iosMain folder would be the right place for such calls. Similarly, if you want to edit the Desktop (JVM) specific part, the jvmMain folder is the appropriate location.
-
/iosApp contains iOS applications. Even if you’re sharing your UI with Compose Multiplatform, you need this entry point for your iOS app. This is also where you should add SwiftUI code for your project.
Build and Run Android Application
To build and run the development version of the Android app, use the run configuration from the run widget in your IDE’s toolbar or build it directly from the terminal:
- on macOS/Linux
./gradlew :composeApp:assembleDebug - on Windows
.\gradlew.bat :composeApp:assembleDebug
Build and Run Desktop (JVM) Application
To build and run the development version of the desktop app, use the run configuration from the run widget in your IDE’s toolbar or run it directly from the terminal:
- on macOS/Linux
./gradlew :composeApp:run - on Windows
.\gradlew.bat :composeApp:run
Build and Run iOS Application
To build and run the development version of the iOS app, use the run configuration from the run widget in your IDE’s toolbar or open the /iosApp directory in Xcode and run it from there.
Learn more about Kotlin Multiplatform…