From 94e7499d6cdcca9c917f43e9524649e1758bcee9 Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Sun, 27 Sep 2026 13:40:18 -0400 Subject: [PATCH 1/3] fix(tui3): give task rooms the keyboard when opened --- .../unreleased/1556-task-room-keyboard.md | 8 ++++ internal/manual/chat/keys.md | 4 ++ internal/tui3/room.go | 11 +++++- internal/tui3/roomfocus_test.go | 38 +++++++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 docs/changes/unreleased/1556-task-room-keyboard.md create mode 100644 internal/tui3/roomfocus_test.go diff --git a/docs/changes/unreleased/1556-task-room-keyboard.md b/docs/changes/unreleased/1556-task-room-keyboard.md new file mode 100644 index 000000000..5ae6692e7 --- /dev/null +++ b/docs/changes/unreleased/1556-task-room-keyboard.md @@ -0,0 +1,8 @@ +--- +kind: fixed +title: Opening a task room gives its note box the keyboard +pr: 1556 +surface: [chat, docs] +invalidates: + - "Opening a task with alt+t then Enter used to leave the roster holding the keyboard. A note appeared in the task's box but Enter reopened the row instead of sending it. Opening the room now releases roster focus, including the narrow overlay, so Enter sends the note to that task. Alt+t still returns to roster navigation." +--- diff --git a/internal/manual/chat/keys.md b/internal/manual/chat/keys.md index 0423cc213..f284d5e38 100644 --- a/internal/manual/chat/keys.md +++ b/internal/manual/chat/keys.md @@ -2455,6 +2455,10 @@ ink once this conversation has spent four fifths of its own `per conversation` l ## Keys in the task roster and inside a room +Opening a task's room gives the keyboard to that room. Type a note and press +`enter` to send it to the task; you do not need to press `alt+t` again first. +Use `alt+t` when you want to navigate the roster again. + **While the task roster holds the keyboard** (`alt+t`, `opt+t`): `esc` gives the keyboard back · `up`/`down` move over the needs-you band, the group headings and the tasks · `enter` opens a task's room, opens or folds a group on its heading, and opens a band row's diff --git a/internal/tui3/room.go b/internal/tui3/room.go index 3e7953e00..ade806b06 100644 --- a/internal/tui3/room.go +++ b/internal/tui3/room.go @@ -628,6 +628,9 @@ const roomTail = 120 // — and three copies of the same eight fields is three chances for the fourth // one to be built wrong. func (a *app) newRoom(id uint64, title string) *taskRoom { + // Opening a task hands its page the keyboard as well as the composer. + // Otherwise the roster keeps Enter while typed notes reach the room. + a.railTake(false) // Replacing a view must release its subscription just as Escape does. // Leaving the old lane open does not keep useful work running; it leaks a reader. a.closeRoom() @@ -1207,7 +1210,13 @@ func (a *app) openRoomFor(id uint64, title string) { // pressed: the read may come back after the rail has been redrawn, and an // absent page still opens exactly what this gesture chose. func (a *app) openRailRoom(node *taskNode) tea.Cmd { - if node == nil || a.roomStandingOn(node) { + if node == nil { + return nil + } + if a.roomStandingOn(node) { + // Selecting the open room returns to its existing draft without + // replacing the page or its subscription. + a.railTake(false) return nil } id, title, run, part := node.id, node.title, node.run, node.node diff --git a/internal/tui3/roomfocus_test.go b/internal/tui3/roomfocus_test.go new file mode 100644 index 000000000..d063d5212 --- /dev/null +++ b/internal/tui3/roomfocus_test.go @@ -0,0 +1,38 @@ +package tui3 + +import ( + "fmt" + "testing" +) + +func TestOpeningTaskFromKeyboardRosterLetsEnterSendItsNote(t *testing.T) { + for _, width := range []int{80, 140} { + t.Run(fmt.Sprint(width), func(t *testing.T) { + a, fake, _ := roomApp(t) + a.width, a.height = width, 42 + drive(t, a, altT()) + drive(t, a, key("enter")) + if a.room == nil || a.room.id != 7 { + t.Fatal("keyboard roster did not open the selected task") + } + for _, r := range "Cover invalid units too" { + drive(t, a, key(string(r))) + } + drive(t, a, key("enter")) + if len(fake.steered) != 1 || fake.steered[0].text != "Cover invalid units too" { + t.Fatalf("Enter did not send the task note: %+v; draft %q", fake.steered, a.input.String()) + } + opened := a.room + a.input.setText("Preserve this next note") + drive(t, a, altT()) + drive(t, a, key("enter")) + if a.room != opened { + t.Fatal("selecting the open task replaced its room") + } + drive(t, a, key("enter")) + if len(fake.steered) != 2 || fake.steered[1].text != "Preserve this next note" { + t.Fatalf("reselecting the room lost or blocked its existing note: %+v", fake.steered) + } + }) + } +} From b1b00fd43f9a5d37fab9996b50ca1832ddad3dfd Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Sun, 27 Sep 2026 13:41:57 -0400 Subject: [PATCH 2/3] docs: scope task note guidance to rooms accepting input --- internal/manual/chat/keys.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/manual/chat/keys.md b/internal/manual/chat/keys.md index f284d5e38..af523b5ee 100644 --- a/internal/manual/chat/keys.md +++ b/internal/manual/chat/keys.md @@ -2455,8 +2455,8 @@ ink once this conversation has spent four fifths of its own `per conversation` l ## Keys in the task roster and inside a room -Opening a task's room gives the keyboard to that room. Type a note and press -`enter` to send it to the task; you do not need to press `alt+t` again first. +Opening a task's room gives the keyboard to that room. For a task that accepts +notes, type one and press `enter` to send it; you do not need to press `alt+t` again first. Use `alt+t` when you want to navigate the roster again. **While the task roster holds the keyboard** (`alt+t`, `opt+t`): `esc` gives the keyboard From 595aee0e67a2e35357c8e5231b0d07540e7e9c0a Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Sun, 27 Sep 2026 13:50:45 -0400 Subject: [PATCH 3/3] docs: identify task-room keyboard fix as PR 1628 --- .../{1556-task-room-keyboard.md => 1628-task-room-keyboard.md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/changes/unreleased/{1556-task-room-keyboard.md => 1628-task-room-keyboard.md} (98%) diff --git a/docs/changes/unreleased/1556-task-room-keyboard.md b/docs/changes/unreleased/1628-task-room-keyboard.md similarity index 98% rename from docs/changes/unreleased/1556-task-room-keyboard.md rename to docs/changes/unreleased/1628-task-room-keyboard.md index 5ae6692e7..af5e226ca 100644 --- a/docs/changes/unreleased/1556-task-room-keyboard.md +++ b/docs/changes/unreleased/1628-task-room-keyboard.md @@ -1,7 +1,7 @@ --- kind: fixed title: Opening a task room gives its note box the keyboard -pr: 1556 +pr: 1628 surface: [chat, docs] invalidates: - "Opening a task with alt+t then Enter used to leave the roster holding the keyboard. A note appeared in the task's box but Enter reopened the row instead of sending it. Opening the room now releases roster focus, including the narrow overlay, so Enter sends the note to that task. Alt+t still returns to roster navigation."