From 7c707e7a09353e24b7df2a71d7e640deaea3fe8a Mon Sep 17 00:00:00 2001 From: Valentin Haudiquet Date: Mon, 19 Oct 2026 19:40:59 +0200 Subject: [PATCH] feat(claw): list account watches beside repo watches on the surface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A saved account whose forge notifications are not actually followed was invisible: the save's watch flag defaults to false on the tool and the HTTP route, and GET /v1/watches listed only the repo-watch table. The first question a silent forge thread raises — is my account even subscribed? — was unanswerable from outside. The route now answers it. --- crates/rhema-claw/src/http.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/crates/rhema-claw/src/http.rs b/crates/rhema-claw/src/http.rs index bcab745..b1b00f5 100644 --- a/crates/rhema-claw/src/http.rs +++ b/crates/rhema-claw/src/http.rs @@ -534,7 +534,18 @@ async fn watches_list(State(state): State) -> Result, (St .watches .list() .map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?; - Ok(Json(json!({ "watches": watches }))) + // The account watches ride along: a saved account whose forge + // notifications are not actually being followed is invisible + // otherwise — the save's `watch` flag defaults to false on both the + // tool and this surface, and "is my account subscribed?" is the + // first question a silent forge thread raises. + let account_watches = state + .watches + .list_account_watches() + .map_err(|err| (StatusCode::INTERNAL_SERVER_ERROR, err.to_string()))?; + Ok(Json( + json!({ "watches": watches, "account_watches": account_watches }), + )) } /// `{"forge", "repo", "host"?, "token"?}` — the shape every watch entry