From a1d1ca411b6aee9839598c909480e81609bd7be0 Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 11 Nov 2026 22:16:50 +0100 Subject: [PATCH 1/3] chore(deps): pin punktfunk at the CJK font merge PR #2388 merged as 7a4b0442a. The kit now draws a char Geist lacks in a system face; on the TV that is Skia's fontconfig manager, so no face is handed in. The pin also brings the host screen pick. This client has no display targets client: its rows carry no screens, so the shell shows no Screen section and never sends SetScreen. --- Cargo.lock | 12 ++++++------ Cargo.toml | 10 +++++----- src/console/model.rs | 7 ++++++- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34ae8439..5a0ac996 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "cros-codecs" version = "0.0.5" -source = "git+https://git.unom.io/unom/punktfunk?rev=9eb2eb64113b6848e921a7153edd2248b8f61d7a#9eb2eb64113b6848e921a7153edd2248b8f61d7a" +source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" dependencies = [ "log", "memchr", @@ -582,7 +582,7 @@ dependencies = [ [[package]] name = "fec-rs" version = "0.1.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=9eb2eb64113b6848e921a7153edd2248b8f61d7a#9eb2eb64113b6848e921a7153edd2248b8f61d7a" +source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" [[package]] name = "fiat-crypto" @@ -1128,7 +1128,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pf-client-core" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=9eb2eb64113b6848e921a7153edd2248b8f61d7a#9eb2eb64113b6848e921a7153edd2248b8f61d7a" +source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" dependencies = [ "anyhow", "cfg_aliases", @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "pf-console-ui" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=9eb2eb64113b6848e921a7153edd2248b8f61d7a#9eb2eb64113b6848e921a7153edd2248b8f61d7a" +source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" dependencies = [ "anyhow", "pf-client-core", @@ -1160,7 +1160,7 @@ dependencies = [ [[package]] name = "pf-l10n" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=9eb2eb64113b6848e921a7153edd2248b8f61d7a#9eb2eb64113b6848e921a7153edd2248b8f61d7a" +source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" [[package]] name = "pin-project-lite" @@ -1242,7 +1242,7 @@ dependencies = [ [[package]] name = "punktfunk-core" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=9eb2eb64113b6848e921a7153edd2248b8f61d7a#9eb2eb64113b6848e921a7153edd2248b8f61d7a" +source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" dependencies = [ "aes-gcm", "aws-lc-rs", diff --git a/Cargo.toml b/Cargo.toml index ac148c4e..d5c93363 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,14 +48,14 @@ rustls = { version = "0.23", features = ["aws_lc_rs"] } image = { version = "0.25", default-features = false, features = ["png", "jpeg"] } # Same revision for shared types. -punktfunk-core = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", features = ["quic", "chacha-aws-lc-rs", "l10n"] } -pf-client-core = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", default-features = false } +punktfunk-core = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", features = ["quic", "chacha-aws-lc-rs", "l10n"] } +pf-client-core = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", default-features = false } # The words the kit and the core show; this client reads the `client` and `console` parts too. -pf-l10n = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", default-features = false, features = ["client", "console", "host"] } +pf-l10n = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", default-features = false, features = ["client", "console", "host"] } [target.'cfg(target_os = "linux")'.dependencies] -cros-codecs = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a" } -pf-console-ui = { git = "https://git.unom.io/unom/punktfunk", rev = "9eb2eb64113b6848e921a7153edd2248b8f61d7a", default-features = false, features = ["gl"] } +cros-codecs = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c" } +pf-console-ui = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", default-features = false, features = ["gl"] } sdl3 = { version = "0.20", default-features = false } # Disable pkg-config: buildroot mangles the SDL prefix outside its sysroot. # build.rs supplies SDL3_PREFIX for direct linking. diff --git a/src/console/model.rs b/src/console/model.rs index 102930d9..b087b5e5 100644 --- a/src/console/model.rs +++ b/src/console/model.rs @@ -302,6 +302,8 @@ impl Service { game_presets: h.game_presets.clone(), profile: h.profile.clone(), running: String::new(), + // No `/display/targets` client: the shell shows no Screen section. + screens: None, key, } } @@ -432,11 +434,13 @@ impl Service { // - `EndGame`: no title here is ever `endable` (see `to_model`), so the shell never // offers it. // - `Install`: no title here carries `install` (see `to_model`), likewise. + // - `SetScreen`: no row here carries `screens`, so the shell has no Screen section. ConsoleCmd::RefreshRunning { .. } | ConsoleCmd::SetClipboard { .. } | ConsoleCmd::PromptAnswer { .. } | ConsoleCmd::EndGame { .. } - | ConsoleCmd::Install { .. } => {} + | ConsoleCmd::Install { .. } + | ConsoleCmd::SetScreen { .. } => {} } } @@ -1333,6 +1337,7 @@ fn discovered_row(d: &DiscoveredHost) -> HostRow { // Needs `/api/v1/status`, which this client does not ask — the same reason // `LibraryGame::running` is false here. Empty renders as no line. running: String::new(), + screens: None, } } From 7a17aee50f505e925c59598cc664d9a4973022be Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 11 Nov 2026 22:16:50 +0100 Subject: [PATCH 2/3] test(device): cover the UI tags webOS sends for CJK webOS writes Chinese with its script, as zh-Hans-CN or zh-Hant-TW. The tag must reach pf-l10n whole for it to pick Simplified or Traditional. --- src/platform/webos/device.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/platform/webos/device.rs b/src/platform/webos/device.rs index 3d17f2db..f8613f07 100644 --- a/src/platform/webos/device.rs +++ b/src/platform/webos/device.rs @@ -439,6 +439,11 @@ mod tests { fn the_ui_language_is_read_from_the_locale_settings() { let reply = r#"{"returnValue":true,"settings":{"localeInfo":{"locales":{"UI":"de-DE","TV":"en-US"}}}}"#; assert_eq!(ui_tag(reply).as_deref(), Some("de-DE")); + // webOS writes Chinese with its script, which picks Simplified or Traditional. + for tag in ["ja-JP", "ko-KR", "zh-Hans-CN", "zh-Hant-TW", "zh-Hant-HK"] { + let reply = format!(r#"{{"settings":{{"localeInfo":{{"locales":{{"UI":"{tag}"}}}}}}}}"#); + assert_eq!(ui_tag(&reply).as_deref(), Some(tag)); + } for none in [ r#"{"returnValue":false}"#, r#"{"settings":{"localeInfo":{"locales":{"UI":""}}}}"#, From 18c33db581840d9e229b0694681dbe89d3e2e582 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20B=C3=BChler?= <38665693+enricobuehler@users.noreply.github.com> Date: Thu, 12 Nov 2026 13:31:47 +0100 Subject: [PATCH 3/3] feat(console): show the device code while a request waits Pins punktfunk at 6e1381e3e, the typed-host merge. While a request for access waits, the console shows this device's code: the first sixteen digits of its certificate fingerprint, which the host's web console shows beside the request. The core now takes the host's fingerprint as a required argument. A row whose fingerprint does not parse fails the request; it no longer asks with no pin. --- Cargo.lock | 12 ++++++------ Cargo.toml | 10 +++++----- src/console/model.rs | 19 +++++++++++++++---- src/runtime/console_flow.rs | 1 + 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5a0ac996..da05a839 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -378,7 +378,7 @@ dependencies = [ [[package]] name = "cros-codecs" version = "0.0.5" -source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" +source = "git+https://git.unom.io/unom/punktfunk?rev=6e1381e3e976ece0362c734b2b3cf39ffd5537d1#6e1381e3e976ece0362c734b2b3cf39ffd5537d1" dependencies = [ "log", "memchr", @@ -582,7 +582,7 @@ dependencies = [ [[package]] name = "fec-rs" version = "0.1.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" +source = "git+https://git.unom.io/unom/punktfunk?rev=6e1381e3e976ece0362c734b2b3cf39ffd5537d1#6e1381e3e976ece0362c734b2b3cf39ffd5537d1" [[package]] name = "fiat-crypto" @@ -1128,7 +1128,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pf-client-core" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" +source = "git+https://git.unom.io/unom/punktfunk?rev=6e1381e3e976ece0362c734b2b3cf39ffd5537d1#6e1381e3e976ece0362c734b2b3cf39ffd5537d1" dependencies = [ "anyhow", "cfg_aliases", @@ -1144,7 +1144,7 @@ dependencies = [ [[package]] name = "pf-console-ui" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" +source = "git+https://git.unom.io/unom/punktfunk?rev=6e1381e3e976ece0362c734b2b3cf39ffd5537d1#6e1381e3e976ece0362c734b2b3cf39ffd5537d1" dependencies = [ "anyhow", "pf-client-core", @@ -1160,7 +1160,7 @@ dependencies = [ [[package]] name = "pf-l10n" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" +source = "git+https://git.unom.io/unom/punktfunk?rev=6e1381e3e976ece0362c734b2b3cf39ffd5537d1#6e1381e3e976ece0362c734b2b3cf39ffd5537d1" [[package]] name = "pin-project-lite" @@ -1242,7 +1242,7 @@ dependencies = [ [[package]] name = "punktfunk-core" version = "0.46.0" -source = "git+https://git.unom.io/unom/punktfunk?rev=7a4b0442a6959dd9cb417caf7e02c096bcb9648c#7a4b0442a6959dd9cb417caf7e02c096bcb9648c" +source = "git+https://git.unom.io/unom/punktfunk?rev=6e1381e3e976ece0362c734b2b3cf39ffd5537d1#6e1381e3e976ece0362c734b2b3cf39ffd5537d1" dependencies = [ "aes-gcm", "aws-lc-rs", diff --git a/Cargo.toml b/Cargo.toml index d5c93363..676a17ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -48,14 +48,14 @@ rustls = { version = "0.23", features = ["aws_lc_rs"] } image = { version = "0.25", default-features = false, features = ["png", "jpeg"] } # Same revision for shared types. -punktfunk-core = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", features = ["quic", "chacha-aws-lc-rs", "l10n"] } -pf-client-core = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", default-features = false } +punktfunk-core = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", features = ["quic", "chacha-aws-lc-rs", "l10n"] } +pf-client-core = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", default-features = false } # The words the kit and the core show; this client reads the `client` and `console` parts too. -pf-l10n = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", default-features = false, features = ["client", "console", "host"] } +pf-l10n = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", default-features = false, features = ["client", "console", "host"] } [target.'cfg(target_os = "linux")'.dependencies] -cros-codecs = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c" } -pf-console-ui = { git = "https://git.unom.io/unom/punktfunk", rev = "7a4b0442a6959dd9cb417caf7e02c096bcb9648c", default-features = false, features = ["gl"] } +cros-codecs = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1" } +pf-console-ui = { git = "https://git.unom.io/unom/punktfunk", rev = "6e1381e3e976ece0362c734b2b3cf39ffd5537d1", default-features = false, features = ["gl"] } sdl3 = { version = "0.20", default-features = false } # Disable pkg-config: buildroot mangles the SDL prefix outside its sysroot. # build.rs supplies SDL3_PREFIX for direct linking. diff --git a/src/console/model.rs b/src/console/model.rs index b087b5e5..cc4d2538 100644 --- a/src/console/model.rs +++ b/src/console/model.rs @@ -331,7 +331,8 @@ impl Service { .map_err(|e| crate::core::errors::pair_message(&e)) }), // The host parks this TV until its operator approves it, held to the advertised - // fingerprint. Never streams. + // fingerprint. The shell offers a request only for a host that has one; a host + // without one pairs by PIN. Never streams. ConsoleCmd::RequestAccess { addr, port, @@ -339,10 +340,20 @@ impl Service { device_name, req, } => { - let pin = shared::parse_fp(&fp_hex); + let pin = shared::parse_fp(&fp_hex).ok_or(punktfunk_core::PunktfunkError::InvalidArg("fingerprint")); self.start_pair(addr, port, req, move |addr, port, id| { - NativeClient::request_access(addr, port, (&id.0, &id.1), pin, &device_name, budget::HOST_WAIT, None) - .map_err(|e| crate::core::errors::access_message(&e)) + pin.and_then(|pin| { + NativeClient::request_access( + addr, + port, + (&id.0, &id.1), + pin, + &device_name, + budget::HOST_WAIT, + None, + ) + }) + .map_err(|e| crate::core::errors::access_message(&e)) }); } ConsoleCmd::SendLogs { diff --git a/src/runtime/console_flow.rs b/src/runtime/console_flow.rs index 9edf32ed..261ed053 100644 --- a/src/runtime/console_flow.rs +++ b/src/runtime/console_flow.rs @@ -51,6 +51,7 @@ pub(super) fn run( let opts = ConsoleOptions { device_name: "webOS TV".into(), + device_code: pf_client_core::trust::device_code(identity), version: Some(format!( "{} \u{b7} core {}", crate::core::VERSION,