From e1d0a28fc63eb8676df6e3642b9b91048031b76c Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Feb 2026 19:41:13 +0000 Subject: [PATCH 1/2] Fix illegal comma in test name for Kotlin/Native compatibility Replace commas with "then" in the lifecycle test name to avoid "Name contains illegal characters" errors on Native targets. https://claude.ai/code/session_01Gjo9f6vqHrAUpdto6Jr3G7 --- .../com/contextable/a2ui4k/state/SurfaceStateManagerTest.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/commonTest/kotlin/com/contextable/a2ui4k/state/SurfaceStateManagerTest.kt b/library/src/commonTest/kotlin/com/contextable/a2ui4k/state/SurfaceStateManagerTest.kt index 4e01b3a..6380839 100644 --- a/library/src/commonTest/kotlin/com/contextable/a2ui4k/state/SurfaceStateManagerTest.kt +++ b/library/src/commonTest/kotlin/com/contextable/a2ui4k/state/SurfaceStateManagerTest.kt @@ -649,7 +649,7 @@ class SurfaceStateManagerTest { // --- Multiple operations in sequence --- @Test - fun `full lifecycle - create, update components, update data, delete`() { + fun `full lifecycle - create then update components then update data then delete`() { val manager = SurfaceStateManager() // Create From 1309a253353aa5b3494cc7922220d010172426c3 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Feb 2026 20:14:15 +0000 Subject: [PATCH 2/2] Fix regex invalid pattern test crash on JS target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit JavaScript's SyntaxError from an invalid RegExp does not extend Kotlin's Exception on JS targets — it only extends Throwable. Widen the catch to Throwable so invalid patterns return false on all platforms (JVM, Native, and JS). https://claude.ai/code/session_01Gjo9f6vqHrAUpdto6Jr3G7 --- .../kotlin/com/contextable/a2ui4k/function/FunctionEvaluator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/commonMain/kotlin/com/contextable/a2ui4k/function/FunctionEvaluator.kt b/library/src/commonMain/kotlin/com/contextable/a2ui4k/function/FunctionEvaluator.kt index b0a978c..071f833 100644 --- a/library/src/commonMain/kotlin/com/contextable/a2ui4k/function/FunctionEvaluator.kt +++ b/library/src/commonMain/kotlin/com/contextable/a2ui4k/function/FunctionEvaluator.kt @@ -113,7 +113,7 @@ object FunctionEvaluator { val pattern = resolveArgString(args, "pattern", dataContext) ?: return JsonPrimitive(false) return try { JsonPrimitive(Regex(pattern).matches(value)) - } catch (e: Exception) { + } catch (_: Throwable) { JsonPrimitive(false) } }