Fix error flashes replacing focused pane
This commit is contained in:
@@ -70,6 +70,8 @@ loosely follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
the command field.
|
the command field.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Error/status flashes now restore the currently focused pane instead
|
||||||
|
of drawing the empty-state hint over a running agent or process.
|
||||||
- Release workflow (`.gitea/workflows/release.yml`) now uses
|
- Release workflow (`.gitea/workflows/release.yml`) now uses
|
||||||
`mlugg/setup-zig@v2` instead of the deprecated `@v1`. v1 hard-coded
|
`mlugg/setup-zig@v2` instead of the deprecated `@v1`. v1 hard-coded
|
||||||
the pre-0.14 tarball name (`zig-linux-x86_64-<ver>.tar.xz`), so
|
the pre-0.14 tarball name (`zig-linux-x86_64-<ver>.tar.xz`), so
|
||||||
|
|||||||
@@ -2268,8 +2268,17 @@ func (st *uiState) flashError(msg string) {
|
|||||||
st.mu.Lock()
|
st.mu.Lock()
|
||||||
st.attentionText = msg
|
st.attentionText = msg
|
||||||
st.attentionAt = "" // shows on every focus until cleared
|
st.attentionAt = "" // shows on every focus until cleared
|
||||||
|
focusedPad := st.focusedPad
|
||||||
|
focusedID := st.focusedID
|
||||||
st.mu.Unlock()
|
st.mu.Unlock()
|
||||||
st.renderEmptyState()
|
switch {
|
||||||
|
case focusedPad != "":
|
||||||
|
st.repaintFocusedPad()
|
||||||
|
case focusedID != "":
|
||||||
|
st.repaintFocused()
|
||||||
|
default:
|
||||||
|
st.renderEmptyState()
|
||||||
|
}
|
||||||
st.drawTabBar()
|
st.drawTabBar()
|
||||||
st.drawSidebar()
|
st.drawSidebar()
|
||||||
st.drawStatusLine()
|
st.drawStatusLine()
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"name": "error_flash_preserves_focused_pane",
|
||||||
|
"presets": {
|
||||||
|
"processes": [
|
||||||
|
{
|
||||||
|
"name": "steady",
|
||||||
|
"argv": ["sh", "-lc", "printf 'STEADY READY\\n'; sleep 5"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"trust": ["steady"],
|
||||||
|
"steps": [
|
||||||
|
{
|
||||||
|
"type": "mcp_call",
|
||||||
|
"method": "spawn_process",
|
||||||
|
"params": {"kind": "command", "preset": "steady", "name": "steady"},
|
||||||
|
"save_as": "proc"
|
||||||
|
},
|
||||||
|
{ "type": "wait_text", "contains": "STEADY READY", "timeout_ms": 5000 },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-k" },
|
||||||
|
{ "type": "send_text", "text": "Open Settings" },
|
||||||
|
{ "type": "send_chord", "chord": "enter" },
|
||||||
|
{ "type": "send_chord", "chord": "enter" },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-n" },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-n" },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-n" },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-n" },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-n" },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-n" },
|
||||||
|
{ "type": "send_chord", "chord": "ctrl-n" },
|
||||||
|
{ "type": "send_chord", "chord": "enter" },
|
||||||
|
{ "type": "wait_text", "contains": "no active top-level agent to summarize", "timeout_ms": 5000 },
|
||||||
|
{ "type": "wait_text", "contains": "STEADY READY", "timeout_ms": 5000 },
|
||||||
|
{ "type": "assert_contains", "contains": "STEADY READY" },
|
||||||
|
{ "type": "assert_not_contains", "contains": "Press Ctrl-K to spawn an agent or process" }
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user