wait_for_text: optional include_baseline_row=True for in-place row writes
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 42/100
Línea de trabajo
Start at the wait_for_text entry point and its current Notes docstring describing the same-row blind spot. Review the existing wait_for_content_change and sentinel-pattern escape hatches before assessing the proposed include_baseline_row parameter. Done means same-row writes can be detected without matching the entry snapshot, including narrow-pane wraparound, with the documented trade-offs addressed.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Type: enhancement · Tier: deferred · Tool: wait_for_text
What's happening
wait_for_text deliberately skips the cursor row at entry via:
start_line = baseline_abs - state.history_size + 1
The + 1 avoids false-matching the row the cursor sat on at entry — typically the prompt line that contains the typed command echo (which already includes the pattern as a substring). This is the documented "same-row blind spot."
But this means several common CLI output shapes are invisible to the wait:
printf OK(no trailing newline — stays on the cursor row)\\r-progress updates and spinners (rewrite the same row)- Single-line status redraws (cursor returns to column 0 and overwrites)
- Some prompt redraws that paint over the prompt line
Why anchor invariance holds for the baseline row
tmux's screen_write_reverseindex only scrolls within [s->rupper, s->rlower] via grid_view_scroll_region_down, which is pure grid_move_lines — no hsize change. \\r rewriting also doesn't touch hsize. So the absolute baseline anchor (hs0 + cy0) remains pointing at the same grid row even when that row is repainted; we just don't capture it.
Proposed surface
wait_for_text(pattern=\"OK\", include_baseline_row=True)
When set, the implementation:
- At entry: capture the baseline row's current content (one extra
capture-pane -S cy0 -E cy0). - Each tick: re-capture the baseline row and diff against the entry snapshot.
- Match the pattern against the diff (i.e., the bytes that changed), not the whole row.
This avoids false-matching the typed echo (which is in the entry snapshot and therefore not in the diff) while picking up legitimate same-row writes.
Trade-offs
- Adds one
display-message/capture-paneround-trip at entry (small). - Adds row-content comparison per tick (cheap).
- Diff predicate has to handle the wraparound case for narrow panes where the "baseline row" might itself wrap.
- New public parameter on a stable-feeling API. Worth the surface only if real agent flows hit the limitation.
Recommendation
Defer until a real agent flow asks for it. Today the documented escape hatch is wait_for_content_change for "any change anywhere" and the sentinel pattern for "a unique marker I authored." If/when same-row writes become the question, this is the cleanest answer.
References
- tmux reverse-index (no hsize touch): screen-write.c#L1419
- tmux scroll-region-down (pure grid_move_lines): grid-view.c#L127
- Current docstring of the blind spot: see
wait_for_textNotes section
- Lenguaje dominante
- Python
- Estrellas
- 13
- Forks
- 0
- Merge medio
- 19 min
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de tmux-python/libtmux-mcp
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
tmux-python/libtmux-mcp#121 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
tmux-python/libtmux-mcp#120 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
tmux-python/libtmux-mcp#119 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
tmux-python/libtmux-mcp#118 ·
-
pytest filterwarnings suppresses the DeprecationWarnings this project needs to seePosiblemente ocupada @tony la tomó hace 92 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
tmux-python/libtmux-mcp#111 ·
Todos los issues de tmux-python/libtmux-mcp
Issues similares
-
bug P2 rust
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jscott3201/rusty-bacnet#2085 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
evarness-ai/iris-harness#401 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
sistemicorp/scripts#62 ·
-
area/mac help wanted needs-qa
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100