Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to Remedy (`remedy-ai`) are documented here.

## [Unreleased]

## [0.70.2] - 2026-11-15

### Fixed
- Switch to Web UI now signs the browser in. The desktop mints a one-time sign-in link and opens it, so the browser app no longer loses its connection and shows the first-run wizard. A one-time link now works even while browser token bootstrap is off (the desktop default); an explicit `REMEDY_HTTP_BOOTSTRAP=0` still blocks it. (#65)
- A settings load that fails (server restarting, browser not signed in) shows a connection message instead of the first-run setup wizard, so an existing install never looks reset. (#65)

## [0.70.1] - 2026-11-15

### Added
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "com.remedy.groveconnect"
minSdk = 26
targetSdk = 35
versionCode = 50
versionName = "0.70.1"
versionCode = 51
versionName = "0.70.2"
}

buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions desktop/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "desktop",
"private": true,
"version": "0.70.1",
"version": "0.70.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "app"
version = "0.70.1"
version = "0.70.2"
description = "Remedy Desktop — local AI partner for knowledge, design, and code"
authors = ["Ahmi <ahmitdarrow@gmail.com>"]
license = "Apache-2.0"
Expand Down
39 changes: 39 additions & 0 deletions desktop/src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2825,6 +2825,35 @@ fn start_dragging_main_window(app: AppHandle) -> Result<(), String> {
Ok(())
}

/// POST /api/auth/bootstrap-link with the desktop's own token; returns the URL.
fn mint_web_ui_link() -> Result<String, String> {
use std::io::{Read, Write};
let token = get_local_api_token()?;
let mut s = TcpStream::connect_timeout(&status_addr(), Duration::from_secs(2))
.map_err(|e| format!("connect: {e}"))?;
let _ = s.set_read_timeout(Some(Duration::from_secs(3)));
let req = format!(
"POST /api/auth/bootstrap-link HTTP/1.1\r\nHost: 127.0.0.1:{}\r\n\
Authorization: Bearer {}\r\nContent-Length: 0\r\nConnection: close\r\n\r\n",
api_port(),
token
);
s.write_all(req.as_bytes()).map_err(|e| format!("write: {e}"))?;
let mut buf = String::new();
let _ = s.read_to_string(&mut buf);
if !(buf.starts_with("HTTP/1.1 200") || buf.starts_with("HTTP/1.0 200")) {
return Err(format!("unexpected response: {}", buf.lines().next().unwrap_or("")));
}
let body = buf.split("\r\n\r\n").nth(1).unwrap_or("");
let v: serde_json::Value =
serde_json::from_str(body.trim()).map_err(|e| format!("json: {e}"))?;
v.get("url")
.and_then(|u| u.as_str())
.filter(|u| u.starts_with("http://127.0.0.1:"))
.map(str::to_string)
.ok_or_else(|| "no url in response".to_string())
}

/// Hide desktop window to tray and open the browser WebUI (same chat app via local API).
#[tauri::command]
fn switch_to_web_ui(app: AppHandle) -> Result<String, String> {
Expand All @@ -2843,6 +2872,16 @@ fn switch_to_web_ui(app: AppHandle) -> Result<String, String> {
thread::sleep(Duration::from_millis(200));
}

// The browser has no IPC token. Mint a one-time sign-in link (authenticated
// with the desktop's own token) so it does not land on a bogus first run.
let url = match mint_web_ui_link() {
Ok(link) => link,
Err(e) => {
log::warn!("switch_to_web_ui: one-time link not minted: {e}");
url
}
};

// Same stay-ready path as title-bar Close (WSLg minimizes; others hide).
if let Some(w) = primary_window(&app) {
stay_ready_after_close(&w)?;
Expand Down
2 changes: 1 addition & 1 deletion desktop/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "Remedy Desktop",
"mainBinaryName": "Remedy Desktop",
"version": "0.70.1",
"version": "0.70.2",
"identifier": "com.remedy.desktop",
"build": {
"frontendDist": "../dist",
Expand Down
10 changes: 9 additions & 1 deletion desktop/src/help/articles/13-whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

High-level product notes for owners. Full detail: repo `CHANGELOG.md`.

Current release: **v0.70.1**. Installed apps update on their own.
Current release: **v0.70.2**. Installed apps update on their own.

Remedy lives on this computer. She finishes the goal you set, keeps the rules
you gave her, and waits for you before money, send, or delete.

## Contents

- [0.70.2 — Switch to Web UI stays signed in](#0702---switch-to-web-ui-stays-signed-in)
- [0.70.1 — About](#0701---about)
- [0.70.0 — Ten languages](#0700---ten-languages)
- [0.69.2 — The browser app in pip installs](#0692---the-browser-app-in-pip-installs)
Expand All @@ -32,6 +33,13 @@ you gave her, and waits for you before money, send, or delete.

Earlier notes follow on this page, newest first.

## 0.70.2 - Switch to Web UI stays signed in

- **Switch to Web UI.** Opening the browser app from the desktop now signs you
in, so it keeps your chats and settings instead of showing the first-run
setup. If the browser ever can't reach Remedy, it says so and leaves your
setup untouched.

## 0.70.1 - About

- **About.** About Remedy shows the app version, a link to the source on GitHub, and the line "Hope this helps" - Ahmi.
Expand Down
8 changes: 5 additions & 3 deletions desktop/src/hooks/useAppBootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ export function useAppBootstrap(opts: {
if (cancelled) return

if (!settings) {
setShowSetupWizard(true)
// A failed settings load (auth, restarting server) is NOT first run:
// never open the setup wizard here or an existing install looks reset.
setServerError(
'Could not load settings yet — complete setup once the local server is ready. '
+ 'If save fails, use Retry then Open setup.',
'Could not reach your Remedy settings (the local server is not '
+ 'responding or this browser is not signed in to it). Your setup '
+ 'is untouched. Use Retry, or reopen the Web UI from the desktop app.',
)
return
}
Expand Down
10 changes: 9 additions & 1 deletion docs/manual/13-whats-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

High-level product notes for owners. Full detail: repo `CHANGELOG.md`.

Current release: **v0.70.1**. Installed apps update on their own.
Current release: **v0.70.2**. Installed apps update on their own.

Remedy lives on this computer. She finishes the goal you set, keeps the rules
you gave her, and waits for you before money, send, or delete.

## Contents

- [0.70.2 — Switch to Web UI stays signed in](#0702---switch-to-web-ui-stays-signed-in)
- [0.70.1 — About](#0701---about)
- [0.70.0 — Ten languages](#0700---ten-languages)
- [0.69.2 — The browser app in pip installs](#0692---the-browser-app-in-pip-installs)
Expand All @@ -32,6 +33,13 @@ you gave her, and waits for you before money, send, or delete.

Earlier notes follow on this page, newest first.

## 0.70.2 - Switch to Web UI stays signed in

- **Switch to Web UI.** Opening the browser app from the desktop now signs you
in, so it keeps your chats and settings instead of showing the first-run
setup. If the browser ever can't reach Remedy, it says so and leaves your
setup untouched.

## 0.70.1 - About

- **About.** About Remedy shows the app version, a link to the source on GitHub, and the line "Hope this helps" - Ahmi.
Expand Down
2 changes: 1 addition & 1 deletion native/go/httpapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

// Version matches pyproject.toml; scripts/sync_version.py stamps this const.
const Version = "0.70.1"
const Version = "0.70.2"

// Config controls the minimal local API server.
type Config struct {
Expand Down
25 changes: 24 additions & 1 deletion native/go/httpapi/bootstrap.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,22 @@ func (b *bootstrapLinks) mint(now time.Time) string {
return nonce
}

// peek reports whether nonce is a live link without burning it.
func (b *bootstrapLinks) peek(nonce string, now time.Time) bool {
nonce = strings.TrimSpace(nonce)
if len(nonce) < 32 {
return false
}
b.mu.Lock()
defer b.mu.Unlock()
for n, exp := range b.nonces {
if subtle.ConstantTimeCompare([]byte(n), []byte(nonce)) == 1 {
return now.Before(exp)
}
}
return false
}

// consume reports whether nonce is a live link, and burns it either way.
func (b *bootstrapLinks) consume(nonce string, now time.Time) bool {
nonce = strings.TrimSpace(nonce)
Expand Down Expand Up @@ -126,7 +142,14 @@ func (s *Server) handleLocalBootstrap(w http.ResponseWriter, r *http.Request) {
})
return
}
if !HTTPBootstrapEnabled(s.homeDir) {
// A live one-time link is explicit owner consent (only a caller that
// already holds the token can mint one), so it opens the default-off
// desktop sidecar too. An explicit REMEDY_HTTP_BOOTSTRAP=0 still wins.
linkOK := s.bootLinks.peek(r.URL.Query().Get("nonce"), time.Now())
if env, forced := envTruthy("REMEDY_HTTP_BOOTSTRAP"); forced && !env {
linkOK = false
}
if !HTTPBootstrapEnabled(s.homeDir) && !linkOK {
writeJSON(w, http.StatusForbidden, map[string]any{
"error": "http_bootstrap_disabled",
"detail": "Browser token bootstrap is off. Desktop still uses IPC " +
Expand Down
27 changes: 27 additions & 0 deletions native/go/httpapi/bootstrap_same_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"io"
"net/http"
"net/url"
"os"
"runtime"
"strings"
"testing"
Expand Down Expand Up @@ -125,6 +126,32 @@ func TestBootstrapLinkIsSingleUseWhenPeerUnknown(t *testing.T) {
}
}

func TestBootstrapLinkOpensDefaultOffSidecar(t *testing.T) {
t.Setenv("REMEDY_DESKTOP_SIDECAR", "1") // http_bootstrap defaults off
base := startBootstrapServer(t)
os.Unsetenv("REMEDY_HTTP_BOOTSTRAP") // helper forces it on; restored by t.Setenv cleanup
stubPeer(t, false, errPeerUnsupported)
if code, body, _ := bootstrapGet(t, base, ""); code != http.StatusForbidden || body["error"] != "http_bootstrap_disabled" {
t.Fatalf("no link on default-off sidecar: %d %v", code, body)
}
if code, _, _ := bootstrapGet(t, base, strings.Repeat("A", 43)); code != http.StatusForbidden {
t.Fatalf("guessed link accepted: %d", code)
}
nonce := mintLink(t, base)
if code, body, text := bootstrapGet(t, base, nonce); code != http.StatusOK || body["token"] != sameUserTestToken {
t.Fatalf("valid link on default-off sidecar: %d %s", code, text)
}
}

func TestBootstrapLinkRespectsExplicitLockdown(t *testing.T) {
base := startBootstrapServer(t)
nonce := mintLink(t, base)
t.Setenv("REMEDY_HTTP_BOOTSTRAP", "0")
if code, body, _ := bootstrapGet(t, base, nonce); code != http.StatusForbidden || body["error"] != "http_bootstrap_disabled" {
t.Fatalf("lockdown must beat a link: %d %v", code, body)
}
}

func TestBootstrapLinkNeedsTokenToMint(t *testing.T) {
base := startBootstrapServer(t)
req, _ := http.NewRequest(http.MethodPost, base+"/api/auth/bootstrap-link", nil)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# unrelated package (remedy 0.0.6) that pulls ancient Jinja2/begins.
# Import package and CLI entry point remain `remedy`.
name = "remedy-ai"
version = "0.70.1"
version = "0.70.2"
description = "Personal AI partner for any ability level — drives this computer to finish goals (life tasks, research, games, code). Not a medical product."
readme = "README.md"
license = { text = "Apache-2.0" }
Expand Down
14 changes: 7 additions & 7 deletions scripts/latest.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"version": "v0.70.1",
"notes": "Remedy Desktop v0.70.1 \u2014 Windows installer, Linux AppImage, and macOS app",
"pub_date": "2026-11-16T00:46:51Z",
"version": "v0.70.2",
"notes": "Remedy Desktop v0.70.2 \u2014 Windows installer, Linux AppImage, and macOS app",
"pub_date": "2026-11-16T05:58:45Z",
"platforms": {
"windows-x86_64": {
"signature": "",
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/v0.70.1/Remedy.Desktop_0.70.1_x64-setup.exe"
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/v0.70.2/Remedy.Desktop_0.70.2_x64-setup.exe"
},
"linux-x86_64": {
"signature": "",
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/v0.70.1/Remedy.Desktop_0.70.1_amd64.AppImage"
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/v0.70.2/Remedy.Desktop_0.70.2_amd64.AppImage"
},
"darwin-aarch64": {
"signature": "",
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/runtime-v0.70.1/Remedy.Desktop_0.70.1_aarch64.app.tar.gz"
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/runtime-v0.70.2/Remedy.Desktop_0.70.2_aarch64.app.tar.gz"
},
"darwin-x86_64": {
"signature": "",
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/runtime-v0.70.1/Remedy.Desktop_0.70.1_x64.app.tar.gz"
"url": "https://github.com/AhmiDarrow/RemedyAI/releases/download/runtime-v0.70.2/Remedy.Desktop_0.70.2_x64.app.tar.gz"
}
}
}
7 changes: 5 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading