# Collapsed project folder keyboard focus

Environment on each side: real web client in Chromium, 1280 × 800 CSS viewport, light theme; separate development servers and fresh synthetic state. The app is started using scripts/scenarios/start-app.ts in web mode with T3CODE_DEV_SEED=0. No live database is copied.

Place seed.ts in the checkout's scripts directory and run `node scripts/seed.ts <isolated-t3-home>` after starting its server. It uses the repository's makeState helper to create project render and three replay-backed threads: hidden-one, hidden-two, active.

The following sequence was executed through the T3 Browser panel on both commits:

1. Open the server's startup pairing link and wait for the sidebar.
2. Click the sidebar button for active.
3. Open /settings/labs, enable Boring sidebar (group by project), and close Settings.
4. Click the sidebar button for active again so its history is open.
5. Start a browser recording.
6. Click the expanded render project-folder button to collapse it.
7. Move the pointer to (800, 500), away from the sidebar.
8. Capture the resting state: count 2 is readable and the pen action is hidden.
9. Press Tab once. Focus moves to New thread in render. Capture this state.
10. Press Tab again. Focus leaves the pen action; count 2 is readable again.
11. Stop the recording.

Before selecting each still, compare two screenshots taken at least 500 ms apart and use identical images. The focused button's tooltip is intentional and identifies the action being tested.

Observed on base [fc2b5de20c](https://github.com/pingdotgg/t3code/commit/fc2b5de20cb572d2333e03284466e3c804d25c84): the row is not hovered, the pen has keyboard focus, and count 2 remains visible under the pen. Count rectangle (207,116,8,16) intersects button rectangle (199,112,24,24).

Observed on head [e2049606a5](https://github.com/pingdotgg/t3code/commit/e2049606a5e70ffe9e5d55fcf072fb83e8f01271): the same focus and geometry, but the count is hidden while the focused pen is visible. It returns when focus leaves.

AI-assisted; verified with the tests and tools listed above.
