feat: add chat wait predicates and tui cockpit#57
Conversation
| finish_message() | ||
| print count + 0 | ||
| } | ||
| ' <<EOF_CONTENT |
There was a problem hiding this comment.
Done in 17fa99a: moved the AWK program to a quoted AWK heredoc, renamed the input guards (CHAT_CONTENT, CHAT_HEADERS), and swept the remaining generic EOF heredocs in chat to semantic guards.
ikma-ricon
left a comment
There was a problem hiding this comment.
Adversarial pass focused on task/API/env/shell-safety. I found one correctness issue I would block on:
chat wait --mention/--mentionedcurrently treats mentions as plain substrings (index(body, "@" mention_filter)). That meanschat wait --as ann --mentionedwakes on@anna/@annabelle, then advances Ann’s cursor as if she was actually mentioned. This is a task/API boundary bug: the false-positive wake can mark unrelated messages read and it is exactly the kind of mention predicate edge case that will be painful in agent channels with prefix-like identities.
I opened fix-it PR #58 against this branch with a token-boundary matcher plus regressions for @ann vs @anna and punctuation-delimited @ann,. Please take that or an equivalent fix before merging.
Other areas I checked: cursor advancement around sender filters and pure-own messages, batch/loop shape, #USAGE default coverage for the new wait/TUI tasks, stale usage_* clearing through chat_tui_clean, zellij env propagation for CHAT_TUI_*/CHAT_*, macOS Bash-visible constructs, traps/tempfiles, and the nested mise run -C calls from panes. I did not find another blocker in those paths.
Validation I ran locally on the PR branch / fix-it branch:
mise run testcodebase lint "$PWD"git diff --checkbats test/tasks.bats --filter 'task wait'(on the fix-it)\n
baby-joel
left a comment
There was a problem hiding this comment.
Adversarial pass focused on TUI runtime/UX/test/readme. I found two issues I would require fixing before merge, and opened the fix-it PR here: #59
Required:
- Generated README command discovery stops at top-level/default tasks, so
chat tui:rooms,chat tui:view, andchat tui:composeare advertised as independently runnable but are not documented in the generated Commands section. This also undercounts the command surface and would have missed existing nested cursor tasks. - The TUI pane
clearfallbacks are not actually quiet whenTERMis missing/unsupported:clearemits diagnostics likeunknown terminal type/TERM environment variable not set, which pollutes real panes and the independent pane-task contract.
Validation I ran:
mise run teston PR #57: passed (199 tests)- pseudo-tty zellij smoke with
script+ timeout: layout/panes launched, but in a fresh zellij environment the first-run setup wizard also appears; not blocking this PR by itself, but it is a runtime assumption worth keeping in mind for agents on fresh boxes. mise run teston fix-it PR #59: passed (201 tests)
I did not find a separate blocker in the room switching/state-file loop, live-view refresh hash, compose send loop, or wait predicate behavior beyond the README/testability and terminal-noise gaps above.
…e-fixes' into zeke/chat-tui-wait-predicates
…nto zeke/chat-tui-wait-predicates
baby-joel
left a comment
There was a problem hiding this comment.
Re-reviewed the updated head (17fa99a) against both requested-change areas and Or's heredoc note.
Verified:
chat wait --mention/--mentionednow uses a token-boundary matcher instead of substring matching.@annno longer matches@anna, punctuation-delimited@ann,/@ann:still wakes, and a false-positive mention candidate does not advance Ann's cursor.- README task discovery now descends into nested/default task directories; the generated README includes
chat cursor:clear,chat cursor:undo,chat tui, and the pane taskschat tui:compose,chat tui:rooms,chat tui:view. - TUI pane
clear/tputfallbacks suppress terminal diagnostics whenTERMis missing/unsupported. - The touched heredocs now use semantic guards, including the quoted
AWKprogram guard in.mise/tasks/wait.
Validation I ran locally:
bats test/tasks.bats --filter 'task wait: --mentioned|task tui:|task tui:'mise run readme --check- manual
--mention anncheck confirming@annatimes out without advancing the cursor, then@ann:wakes.
No remaining blocker from my pass.
Summary
chat waitsender/mention predicates plus polling/loop controlschat tuias a zellij/gum/fzf cockpittui:rooms,tui:view,tui:composeValidation
mise run testmise run readme --checkgit diff --checkzellij setup --dump-layout lib/tui/layout.kdl >/dev/nullcodebase lint "$PWD"bats test/tasks.bats --filter 'task (wait|tui)'