Skip to content
Open
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
4 changes: 4 additions & 0 deletions src-tauri/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Each release needs a `## X.Y.Z — YYYY-MM-DD` section here before its `desktop-vX.Y.Z` tag is pushed. The release
workflow copies that section into the GitHub release and the in-app update notes, and fails without it.

## 0.9.156 — 2026-11-14

- The phone pairing code is now a link: point the iPhone Camera at it and tap the banner to open TMGR on the pairing confirmation. Scanning inside the TMGR app still works. Update the TMGR iPhone app first: older app versions do not read the new code.

## 0.9.155 — 2026-11-14

- Text you send from the iPhone app to a stopped Claude Code or Codex session is now typed with the prefix "Owner via phone: ", so it can never start a shell (`!`) or slash (`/`) command. Invisible and control characters, line breaks and trailing backslashes are removed first.
Expand Down
2 changes: 1 addition & 1 deletion 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 src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tmgr"
version = "0.9.155"
version = "0.9.156"
description = "TMGR desktop app"
authors = ["TMGR"]
license = ""
Expand Down
8 changes: 6 additions & 2 deletions src-tauri/src/decisions/phone/pairing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ fn is_uuid(s: &str) -> bool {
})
}

fn qr_data_url(text: &str) -> Result<String, String> {
pub(super) fn pair_link(json: &[u8]) -> String {
format!("tmgr://pair#tmgr-pair:v1:{}", URL_SAFE_NO_PAD.encode(json))
}

pub(super) fn qr_data_url(text: &str) -> Result<String, String> {
let code = qrcode::QrCode::new(text.as_bytes()).map_err(|_| "could not draw the QR code".to_owned())?;
let svg = code.render::<qrcode::render::svg::Color>().min_dimensions(320, 320).quiet_zone(true).build();
Ok(format!("data:image/svg+xml;base64,{}", STANDARD.encode(svg)))
Expand Down Expand Up @@ -146,7 +150,7 @@ impl Phones {
exp: exp_ms,
};
let json = serde_json::to_vec(&payload).map_err(|e| e.to_string())?;
let text = format!("tmgr-pair:v1:{}", URL_SAFE_NO_PAD.encode(json));
let text = pair_link(&json);
let qr = qr_data_url(&text)?;
*self.pairing.lock().unwrap_or_else(|p| p.into_inner()) = Some(Pending {
api_base: base.clone(),
Expand Down
16 changes: 16 additions & 0 deletions src-tauri/src/decisions/phone/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1573,3 +1573,19 @@ fn a_listening_card_refreshes_every_minute_and_an_idle_one_every_five() {
r.hub.answer(&id, AnswerIn { dismissed: true, ..Default::default() }).unwrap();
waiter.join().unwrap();
}

#[test]
fn the_pairing_qr_is_a_tmgr_pair_link_around_the_raw_payload() {
let link = super::pairing::pair_link(br#"{"v":1}"#);
let raw = link.strip_prefix("tmgr://pair#").unwrap();
let body = raw.strip_prefix("tmgr-pair:v1:").unwrap();
use base64::Engine;
assert_eq!(base64::engine::general_purpose::URL_SAFE_NO_PAD.decode(body).unwrap(), br#"{"v":1}"#);
assert!(!link.contains('?') && link.matches('#').count() == 1);
}

#[test]
fn the_largest_pairing_link_still_fits_in_a_qr_code() {
let link = super::pairing::pair_link(&vec![b'x'; 1100]);
assert!(super::pairing::qr_data_url(&link).is_ok());
}
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "../node_modules/@tauri-apps/cli/config.schema.json",
"productName": "TMGR",
"version": "0.9.155",
"version": "0.9.156",
"identifier": "dev.tmgr.desktop",
"build": {
"frontendDist": "../dist",
Expand Down
3 changes: 3 additions & 0 deletions src/decisions-phones/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
:src="s.pairing.qr_svg_data_url"
:alt="$t('decisions.phones.qrAlt')"
/>
<p class="muted" data-test="qr-hint">
{{ $t('decisions.phones.qrHint') }}
</p>
<p class="muted">
<i18n-t keypath="decisions.phones.expiresInTime" scope="global">
<template #time>
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/decisions.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
"phones": {
"title": "tmgr · Phones",
"qrAlt": "Pairing QR code",
"qrHint": "Scan with the iPhone Camera, or in TMGR → Settings → Pair with desktop",
"expiresInTime": "Expires in {time}",
"typeCode": "Type the code shown on your iPhone",
"confirm": "Confirm",
Expand Down
Loading