code-yeongyu / code-yeongyu/senpi

Contribution proposal: scope /btw Escape cancellation to in-flight side queries

Open
#914 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
429
Forks
98
Avg merge
5h 3m
Merged PRs (30d)
526

Description

## What do you want to change?

Refine `/btw` Escape ownership by side-query state:

- While side work is in flight, Escape dismisses the panel, aborts that side request, and is consumed so the concurrent main turn continues.
- After the side query settles, Escape dismisses its panel but passes through so the existing main-turn interrupt remains available.

## Why?

PR #261 intentionally chose “one Escape cancels both.” In practice, that makes one gesture cancel two independent operations: the visible `/btw` side query and the unrelated main turn. The side panel should own Escape only while it still has cancellable work.

Repro: start a slow main turn, run `/btw `, then press Escape while both are active. Today both requests abort; the proposed behavior aborts only `/btw`.

## How?

Keep the change inside the builtin BTW terminal listener. Consume Escape only for an unsettled entry; dismiss and return `undefined` after settlement. Add deterministic regressions for both states and real-TUI QA for main continuation, settled pass-through, follow-up input, and credential isolation.

A verified branch is ready at https://github.com/honb0704/senpi/tree/fix/btw-escape-consume--omo-01a00dd6. It passes the 17-test BTW suite, `npm run check`, and five independent review lanes. Open PR #880 does not supersede the listener change, though its BTW documentation/test imports may need conflict resolution.

Contributor guide

Open the contributing guide

Research direction

Start in the builtin BTW terminal listener and inspect how Escape is handled for unsettled versus settled side queries; the issue does not name a file path. Run the 17-test BTW suite and npm run check, then perform the real-TUI checks for main continuation, settled pass-through, follow-up input, and credential isolation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.