From 5930f91ed63b3a9bbd1c6f5b6e0d631de294b8e8 Mon Sep 17 00:00:00 2001 From: "sorokin.oleg.edu" Date: Sun, 6 Sep 2026 07:19:26 +0300 Subject: [PATCH] Polish hosted request controls and record full desktop checks --- crates/oa-desktop/src/app/hosted/tests.rs | 2 +- crates/oa-desktop/src/hosted/view.rs | 10 ++++++---- harness/release-hosted-desktop.md | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/crates/oa-desktop/src/app/hosted/tests.rs b/crates/oa-desktop/src/app/hosted/tests.rs index 69163bc3..545dab3f 100644 --- a/crates/oa-desktop/src/app/hosted/tests.rs +++ b/crates/oa-desktop/src/app/hosted/tests.rs @@ -305,7 +305,7 @@ async fn dispatch(app: &mut App, message: Message) { #[tokio::test] async fn hosted_actual_app_tasks_publish_edit_conflict_correct_credentials_reload_and_open() { let directory = tempfile::tempdir().unwrap(); - let store = Arc::new(oa_server::store::Store::open(directory.path().to_owned()).unwrap()); + let store = Arc::new(oa_server::store::Store::open(directory.path()).unwrap()); let token = "current-secret-for-hosted-regression-0123456789"; let listener = tokio::net::TcpListener::bind("127.0.0.1:0").await.unwrap(); let base = format!("http://{}", listener.local_addr().unwrap()); diff --git a/crates/oa-desktop/src/hosted/view.rs b/crates/oa-desktop/src/hosted/view.rs index ff5c68f4..aea1cc22 100644 --- a/crates/oa-desktop/src/hosted/view.rs +++ b/crates/oa-desktop/src/hosted/view.rs @@ -68,12 +68,14 @@ fn dialog(app: &App) -> Element<'_, Message> { label("SERVICE ADDRESS"), text_input("http://127.0.0.1:8787", &state.base) .padding(10) - .on_input(|value| Message::Hosted(Event::Base(value))), + .on_input_maybe(enabled.then_some(|value| Message::Hosted(Event::Base(value)))), label("BEARER TOKEN - KEPT IN MEMORY ONLY"), text_input("Optional for a loopback service", &state.token.0) .secure(true) .padding(10) - .on_input(|value| Message::Hosted(Event::Token(Secret(value)))), + .on_input_maybe( + enabled.then_some(|value| Message::Hosted(Event::Token(Secret(value)))) + ), row![ control("Connect / refresh", Event::Connect, enabled), control( @@ -172,7 +174,7 @@ fn dialog(app: &App) -> Element<'_, Message> { row![ text_input("Search model names", &state.query) .padding(9) - .on_input(|value| Message::Hosted(Event::Query(value))) + .on_input_maybe(enabled.then_some(|value| Message::Hosted(Event::Query(value)))) .on_submit(Message::Hosted(Event::Connect)), control("Search", Event::Connect, enabled), ] @@ -216,7 +218,7 @@ fn dialog(app: &App) -> Element<'_, Message> { { "Publish another copy" } else { - "Publish as new..." + "Publish as new" }; column![ text("Hosted models").size(24), diff --git a/harness/release-hosted-desktop.md b/harness/release-hosted-desktop.md index 480e1b80..2a864b71 100644 --- a/harness/release-hosted-desktop.md +++ b/harness/release-hosted-desktop.md @@ -1,6 +1,6 @@ # Hosted desktop editing -Status: coherent implementation and 24 focused Windows tests pass; full desktop gates and native acceptance remain pending. Base: 1086e54. The lead owns integration, Linux and native acceptance. +Status: 24 focused tests, all 351 Windows desktop tests, strict desktop all-target Clippy and formatting pass; optimized build and native acceptance remain pending. Base: 1086e54. The lead owns integration, Linux and native acceptance. ## Contract and ownership @@ -31,4 +31,4 @@ A first build caught adapter visibility and test cursor API issues, both fixed. ## Remaining acceptance -Run full desktop tests, strict all-target Clippy, formatting and optimized build. Freeze a separate native trial executable with commit/hash. The lead must exercise default/minimum Windows and Linux dialogs, publish/open, graphical and textual save, API artifact changes, conflict/reload/Undo, offline recovery and local Save As. Update guide/server/scope claims that hosted desktop editing is unavailable after integration; this worker does not own those shared documents. Hosted editing remains explicit save/reload, without automatic merges, server history or collaborative synchronization. +The final Windows desktop test run passed 351 tests; strict all-target Clippy and formatting passed. Clippy caught an unnecessary test-only PathBuf allocation, which was removed. Hosted inputs now show their disabled state while requests run. Finish the optimized build. Freeze a separate native trial executable with commit/hash. The lead must exercise default/minimum Windows and Linux dialogs, publish/open, graphical and textual save, API artifact changes, conflict/reload/Undo, offline recovery and local Save As. Update guide/server/scope claims that hosted desktop editing is unavailable after integration; this worker does not own those shared documents. Hosted editing remains explicit save/reload, without automatic merges, server history or collaborative synchronization.