From 2f0fa7a120ca03f32659611704dc047e7103208a Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 5 Mar 2026 11:52:10 -0600 Subject: [PATCH 1/2] docs: add Node.js/npm prerequisites to build instructions The `cargo make dev-example` task depends on `npm run build:css` for Tailwind CSS, but the README didn't mention installing Node.js/npm or running `npm install` in the `ui/` directory. New contributors following the documented steps would hit a confusing failure. Closes #120 Co-Authored-By: Claude Opus 4.6 --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index d284c0cd..864633e6 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,11 @@ To build and run the River UI locally for development: # This example is for Ubuntu and may be different on your system sudo apt-get install libssl-dev + # Install Node.js (v20+) and npm + # See https://nodejs.org/en/download for installation instructions. + # Note: system packages (e.g. `apt-get install npm`) may ship outdated + # versions that don't work — install from the official site instead. + # Install build tools cargo install dioxus-cli cargo install cargo-make @@ -85,6 +90,9 @@ To build and run the River UI locally for development: git submodule init git submodule update + # Install Node.js dependencies (Tailwind CSS) + cd ui && npm install && cd .. + # Run development server with example data cargo make dev-example ``` From 843b8a935ff8ba471bd0927589e78e4cff8df773 Mon Sep 17 00:00:00 2001 From: Ian Clarke Date: Thu, 5 Mar 2026 11:55:37 -0600 Subject: [PATCH 2/2] fix(ui): use current room state when sending upgrade pointer to old contract The migration code was constructing a ChatRoomStateV1 with only the upgrade field set and all other fields left at Default::default(). This produced an empty configuration (zeroed owner_member_id, no members, etc.) which the old contract's state verification rejected with "Invalid signature: signature error". Fix: clone the current room state and set the upgrade pointer on it, so the old contract sees a valid state that passes verification. Closes #127 Co-Authored-By: Claude Opus 4.6 --- ui/src/components/app/freenet_api/room_synchronizer.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/src/components/app/freenet_api/room_synchronizer.rs b/ui/src/components/app/freenet_api/room_synchronizer.rs index 90a4c567..1641d16a 100644 --- a/ui/src/components/app/freenet_api/room_synchronizer.rs +++ b/ui/src/components/app/freenet_api/room_synchronizer.rs @@ -493,10 +493,11 @@ impl RoomSynchronizer { let authorized_upgrade = AuthorizedUpgradeV1::new(upgrade, &room_data.self_sk); - ChatRoomStateV1 { - upgrade: OptionalUpgradeV1(Some(authorized_upgrade)), - ..Default::default() - } + // Clone the current room state so the old contract's + // validation passes, then set the upgrade pointer on it. + let mut state = room_data.room_state.clone(); + state.upgrade = OptionalUpgradeV1(Some(authorized_upgrade)); + state } else { continue; }