Codex (Ratatui) emits an 8x RI burst on startup right after setting DECSTBM. RI at the top of the scroll region scrolls the region down, and DECSTBM only constrains rows -- so the scroll spans every column and drags the right-rail session-tree entries down with the main pane. The chrome cache then hid the clobber because the computed sidebar frame was unchanged. The viewport renderer now flags any chunk containing RI / IND / NEL / SU / SD / IL / DL and OnPTYOut drops the sidebar cache when the flag is set, so the next drawSidebar repaints over the drift. Adds unit tests for the new flag and a harness regression scenario (sidebar_survives_ri_scroll) that fails without the fix.
29 lines
1.3 KiB
JSON
29 lines
1.3 KiB
JSON
{
|
|
"name": "sidebar_survives_ri_scroll",
|
|
"cols": 80,
|
|
"rows": 24,
|
|
"scripts": [
|
|
{
|
|
"name": "riburst",
|
|
"body": "#!/bin/sh\n# Emulates codex's startup sequence: DECSTBM the full child\n# viewport, CUP to the top of the scroll region, and burst 8 RIs\n# (ESC M). RI at the top of the scroll region scrolls the region\n# down. The host's scroll region spans every column, so without\n# the sidebar cache-invalidation fix the right-hand session tree\n# gets dragged downward and the cache hides the broken state.\nprintf '\\033[1;21r'\nprintf '\\033[1;1H'\nprintf '\\033M\\033M\\033M\\033M\\033M\\033M\\033M\\033M'\nprintf '\\033[1;1HRIBURST READY\\n'\nsleep 5\n"
|
|
}
|
|
],
|
|
"steps": [
|
|
{
|
|
"type": "mcp_call",
|
|
"method": "spawn_process",
|
|
"params": { "kind": "command", "argv": ["riburst"], "name": "riburst" }
|
|
},
|
|
{ "type": "wait_text", "contains": "RIBURST READY", "timeout_ms": 5000 },
|
|
{ "type": "wait_stable", "timeout_ms": 2000 },
|
|
{ "type": "assert_contains", "contains": "Session tree" },
|
|
{ "type": "assert_contains", "contains": "● riburst" },
|
|
{ "type": "assert_contains", "contains": "Scratchpads" },
|
|
{
|
|
"type": "assert_regex",
|
|
"regex": "(?s)Session tree[^\\n]*\\n[^─\\n]*─[─]+[^\\n]*\\n[^●\\n]*● riburst",
|
|
"timeout_ms": 2000
|
|
}
|
|
]
|
|
}
|