From df5e7d93963f0256285b13ddf750761930797e78 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 28 Feb 2026 22:53:24 +0000 Subject: Fix star/read buttons: _id string vs number type mismatch The Go API returns _id as a JSON string (due to the `json:",string"` tag on Item.Id), but the frontend compared it with === against numbers from parseInt(). String "5" === number 5 is always false in JS, so toggleStar, mark-as-read, and keyboard shortcuts silently did nothing. Fix: - Coerce _id to Number() when items are loaded from the API - Use Number() coercion in all store.items.find() comparisons as defense - Revert the CSS touch-target changes (the issue was never about size) - Add a regression test with string _id to prevent reintroduction https://claude.ai/code/session_012CNdRhGhU3hxjrwvZt2BHZ --- frontend-vanilla/src/style.css | 9 --------- 1 file changed, 9 deletions(-) (limited to 'frontend-vanilla/src/style.css') diff --git a/frontend-vanilla/src/style.css b/frontend-vanilla/src/style.css index 757d213..47b2de2 100644 --- a/frontend-vanilla/src/style.css +++ b/frontend-vanilla/src/style.css @@ -490,15 +490,6 @@ select:focus { vertical-align: middle; transition: color 0.2s; line-height: 1; - flex-shrink: 0; - min-width: 44px; - min-height: 44px; - display: flex; - align-items: center; - justify-content: center; - height: auto; - text-transform: none; - font-weight: normal; } .star-btn.is-starred { -- cgit v1.2.3