From a043af6c75c69d99c7d1d335ec87c605bdc08510 Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer A (Kimi)" Date: Sun, 14 Jun 2026 00:22:52 +0000 Subject: [PATCH] fix(mobile-inbox): derive primary action from row.kind, not active tab (core#2766) MobileInbox was using the active tab ('kind') to decide the primary action label and POST action. During a tab switch the old rows stayed rendered while the new fetch resolved, so tapping the primary button on a stale approval row posted action=done (the task action). Fix: derive the primary action from r.kind so each row actions its own type regardless of tab timing. Regression test: tab-switch with a delayed task fetch asserts the stale approval row still shows 'Approve' and posts action=approved, not done. Co-Authored-By: Claude --- canvas/src/components/mobile/MobileInbox.tsx | 4 +- .../mobile/__tests__/MobileInbox.test.tsx | 60 +++++++++++++++++-- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/canvas/src/components/mobile/MobileInbox.tsx b/canvas/src/components/mobile/MobileInbox.tsx index b25df58bd..4429f2e8b 100644 --- a/canvas/src/components/mobile/MobileInbox.tsx +++ b/canvas/src/components/mobile/MobileInbox.tsx @@ -169,7 +169,7 @@ export function MobileInbox({ dark }: { dark: boolean }) {