From 04da017f3bb6c06eb7af8fa2ea7ae9f8e276741c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 29 Sep 2026 13:30:05 +0000 Subject: [PATCH] refactor: move the NIP-46 signer screen into commonsUI (step 6 wave 6) Its Toasts are shared notices now, so it has no Android-only dependency left. The plan doc records wave 6 and names the upload stack as the next structural blocker. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01S7FuNBSKiyVecARSoE4B9P --- .../amethyst/ui/navigation/AppNavigation.kt | 2 +- .../2026-09-27-one-ui-android-desktop.md | 22 +++++++++++++++---- .../settings/nip46/Nip46SignerScreen.kt | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) rename {amethyst/src/main/java/com/vitorpamplona/amethyst => commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons}/ui/screen/loggedIn/settings/nip46/Nip46SignerScreen.kt (99%) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt index db2db89973..ba81057a14 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/navigation/AppNavigation.kt @@ -159,6 +159,7 @@ import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.settings.cordn.Cord import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.settings.cordn.CordnHubScreen import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.settings.cordn.CordnKeyPackagesScreen import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.settings.cordn.CordnLinkScreen +import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.settings.nip46.Nip46SignerScreen import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.softwareapps.SoftwareAppDetailScreen import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.softwareapps.SoftwareAppsScreen import com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.wallet.AddClinkDebitWalletScreen @@ -329,7 +330,6 @@ import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.UserSettingsScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.cordn.CordnBackupScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.cordn.CordnMigrateScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.nip46.Nip46ConnectedAppsScreen -import com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.nip46.Nip46SignerScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.shorts.ShortsScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.threadview.ThreadScreen import com.vitorpamplona.amethyst.ui.screen.loggedIn.url.UrlPostScreen diff --git a/commons/plans/2026-09-27-one-ui-android-desktop.md b/commons/plans/2026-09-27-one-ui-android-desktop.md index 2ea3bfda8f..095146935d 100644 --- a/commons/plans/2026-09-27-one-ui-android-desktop.md +++ b/commons/plans/2026-09-27-one-ui-android-desktop.md @@ -402,10 +402,24 @@ assemblers, `EventSync`, …). Packages are renamed on the way: - **Wave 5 moved:** 11 screens, 23 files: the wallet detail, send, receive and transaction screens; on-chain transactions; the Buzz canvas, agent console and DM list; badge awarding; old bookmarks; and the settings index. - - **Next:** re-measure. Known exits: the upload/gallery stack, the Android-only - `AccountViewModel` actions, `CalendarTimeFormat`, the chat views, `NestUiState`, - `NappletLauncher`, `UpdateZapAmountDialog` (biometrics), the `java.time` pickers, and - the language list in user settings. + - **Wave 6 cuts:** + - The gallery picker is shared. `SelectedMedia` holds an `expect abstract class + MediaUri`, which is `actual typealias MediaUri = android.net.Uri` on Android, so the + upload code reading `media.uri` is unchanged. The picker launchers are + expect/actual; desktop and iOS report a cancel for now. + - Other expect/actuals: `JavaSerializable`, `imageContentReceiver` (image paste) and + `SetDialogToEdgeToEdge`. + - The editor's URL highlighting uses quartz's `UrlDetector`. + - `MediaMimeTypes` moved to commons. + - **Wave 6 moved:** the NIP-46 signer screen. The other cuts clear blockers that sit + behind the upload stack. + - **Next:** the post-composer upload stack is now the main blocker, holding about 30 + screens. `UploadOrchestrator`/`MultiOrchestrator` thread an Android `Context` through + compression, metadata stripping, encryption and the NIP-95/NIP-96/Blossom uploaders, + and the composer view models call them directly. The video player stack (media3) is + next at about 22. Smaller exits remain: the Android-only `AccountViewModel` actions, + `CalendarTimeFormat`, `NestUiState`, `NappletLauncher`, `UpdateZapAmountDialog` + (biometrics), the `java.time` pickers and the language list. 7. **Navigation**: the library swap, then `AppNavigation` + rail + drawer + bottom bar. 8. **The app root port** and the new JVM shim. Then the Desktop feature inventory, and retiring the old `desktopApp`. diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/nip46/Nip46SignerScreen.kt b/commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/screen/loggedIn/settings/nip46/Nip46SignerScreen.kt similarity index 99% rename from amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/nip46/Nip46SignerScreen.kt rename to commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/screen/loggedIn/settings/nip46/Nip46SignerScreen.kt index 22e1ef4386..772d4c261f 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/settings/nip46/Nip46SignerScreen.kt +++ b/commonsUI/src/commonMain/kotlin/com/vitorpamplona/amethyst/commons/ui/screen/loggedIn/settings/nip46/Nip46SignerScreen.kt @@ -18,7 +18,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -package com.vitorpamplona.amethyst.ui.screen.loggedIn.settings.nip46 +package com.vitorpamplona.amethyst.commons.ui.screen.loggedIn.settings.nip46 import androidx.compose.animation.AnimatedVisibility import androidx.compose.animation.core.RepeatMode