Skip to content

Commit f0ae523

Browse files
ohernandezdevclaude
andcommitted
fix(tabs): dismiss forced '+' picker when a session is activated
Pressing '+' with tabs open force-shows the empty-state picker, but nothing cleared that state when the user clicked back onto an existing tab — the picker kept covering the terminal with only the (easy to miss) x as a way out. Activating any session now dismisses it, and Escape closes it too. Bump version to 0.8.9. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 2cdee33 commit f0ae523

5 files changed

Lines changed: 14 additions & 4 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "afkode",
33
"private": true,
4-
"version": "0.8.8",
4+
"version": "0.8.9",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "afkode"
3-
version = "0.8.8"
3+
version = "0.8.9"
44
description = "In-game overlay to supervise AI coding agents while you play"
55
authors = ["Omar Hernandez"]
66
license = "MIT"

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "AFKode",
4-
"version": "0.8.8",
4+
"version": "0.8.9",
55
"identifier": "app.afkode.overlay",
66
"build": {
77
"beforeDevCommand": "npm run dev",

src/main.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,12 @@ function setActive(id: string) {
10221022
// The ask strip belongs to one session; don't leave it floating over
10231023
// another tab where Insert would type into the wrong shell.
10241024
if (askSession && askSession.id !== id) closeAskStrip();
1025+
// Activating a session means the user is done with the "+" picker — if it
1026+
// stayed forced-open it would keep covering the terminal with no way back.
1027+
if (forceEmptyState) {
1028+
forceEmptyState = false;
1029+
updateEmptyState();
1030+
}
10251031
activeId = id;
10261032
for (const s of sessions.values()) {
10271033
s.pane.classList.toggle("active", s.id === id);
@@ -2300,6 +2306,10 @@ document.addEventListener("keydown", (e) => {
23002306
if (mod && !e.shiftKey && e.code === "KeyF") {
23012307
e.preventDefault();
23022308
openSearch();
2309+
} else if (e.key === "Escape" && forceEmptyState && sessions.size > 0) {
2310+
// Dismiss the forced "+" picker and return to the active session.
2311+
forceEmptyState = false;
2312+
updateEmptyState();
23032313
}
23042314
});
23052315

0 commit comments

Comments
 (0)