Spaces:
Running on Zero
Keep keyboard focus on Studio result rows
When I focus a gene row and press Enter, CellGemma Studio selects the row but replaces the focused button during the redraw. Focus falls back to the page body, so a follow-up Space press acts on the page. I replayed seven saved predictions over local HTTP in Chrome using browser-dispatched key events. All 70 result rows lost focus on Enter, and Space deselected none of them.
This change restores focus to the same signed gene row after a redraw, even when the row's rank changes. With the patch, all 70 rows kept focus and Space deselected all 70. The row text matched in every replay. The regression test node --test tests/test_result_focus.cjs fails on main and passes with this change. It also covers rank changes and removal of the focused row.
🤖 Generated with Claude Code