Skip to content

A question answered in chat or on any of the thread's subjects unblocks the thread - #552

Merged
mcwhittemore merged 6 commits into
mainfrom
issue-549-chat-answers-questions
Nov 16, 2026
Merged

mcwhittemore merged 6 commits into
mainfrom
issue-549-chat-answers-questions

Conversation

@loopway-bot

Copy link
Copy Markdown
Contributor

Closes #549 (items 1–3; item 4, thinning the batch, is left for its own PR as the issue allows).

A chat message now answers a blocked thread's open questions, an owner comment on any open subject of the thread does too, and a blocked thread says what it waits on wherever its pending count shows.

What it does

  • A chat message to a thread marks its open question asks answered (how: "chatted", an answered event, answered by chat: ... in the log) and unblocks the session. The held queue goes out on the run after the chat block ends.
  • A permission ask is not answered by chat: the thread stays blocked until a 👍 or 👎.
  • The owner's comment on any open subject of the thread, after the ask, answers its open questions (a reply on the PR answers a question asked on the issue). Someone else's comment, an older one, or one on a closed subject doesn't.
  • loopway threads ends a blocked row with blocked: question on o/r#12 <url> ((+N more) for several asks); --json has blocked: { kind, subject, url }, absent when idle. The TUI main row shows the same, and the thread view's Pending title says the updates wait on the answer.
  • CLI version 2.0.0 to 2.0.1; README, CHANGELOG and developing.md updated.

Worth knowing

  • The blocked text names the oldest open ask. A thread with several asks shows (+N more).
  • Chat answers every open question at once, not just the latest: the owner is talking to the session, which has the whole context.
  • Sessions now emits ThreadEvents too (the answered one), so SessionsOptions.emit is widened.
  • Item 4 isn't in this PR.

Test it locally

npm run build && npm test && npm run typecheck && npm run lint && npm run format:check
  • test/asks.test.ts: chat answers a question and the next run delivers the whole queue; chat leaves a permission ask blocked; a comment on another open subject answers, while someone else's, an older one, and one on a closed subject don't.
  • test/files.test.ts: the loopway threads row and --json for blocked, several asks, answered and idle threads.

To try it live, follow the steps in #549, and see verifications/PR.md on the branch.

🤖 Generated with Claude Code

loopway-bot and others added 2 commits November 16, 2026 09:53
A blocked thread now says what it waits on in `loopway threads`, --json and the TUI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@loopway-bot

Copy link
Copy Markdown
Contributor Author

Blocked: the code delivers items 1–3 of #549 and every check passes, but none of the live steps in How to test it were run.

What I ran

On review-552 (head of issue-549-chat-answers-questions), in a separate worktree:

  • npm run build: clean
  • npm test: cli 220 passed (13 files), web 41 passed (3 files). Both match verifications/552.md
  • npm run typecheck, npm run lint, npm run format:check: clean
  • CI: test, cli-version and label are green. GitHub says the PR merges cleanly.

I didn't rerun any live step. None were run, so this isn't one doubtful step to recheck; it's the whole live verification.

Must fix

  1. The live verification is missing. In verifications/552.md, steps 1–4 are all "Not run". The reason given is that create_issue refuses the sandbox because dev doesn't read craftmilldev/loopway-sandbox. The file is honest about what wasn't checked. Still, this PR changes three things that unit tests can't show: when a real session gets unblocked, the TUI rows (the Row blocked text in tui-main.tsx and the Pending title in tui-thread.tsx have no test and nobody has looked at them), and a reply on a PR answering a question asked on its issue. Matthew has to decide how steps 1–4 get run: give this thread the sandbox, or run them by hand. The dev bot already asked him on A question answered in chat leaves the thread blocked, and its queue never goes out #549.
  2. CHANGELOG.md:9 puts the entry under ## 2.0.0. That version is already released (cli-v2.0.0 tag on 8463030). This PR ships as 2.0.1, so the line belongs under a new ## 2.0.1 heading.

Worth considering

  • sessions.ts:167: chat() answers every open question as soon as the owner types, even while a run is still in flight. If the session calls ask during that run, a chat message typed before the owner saw the question (the ask.at comes after the chat) still marks it answered. Answering only asks older than the message (ask.at < now) would match how a comment answers.
  • threads.ts:150: with any open subject now able to answer, an unrelated owner comment on the PR, such as "resolve conflicts", also answers a question asked on the issue. A question answered in chat leaves the thread blocked, and its queue never goes out #549 asks for exactly this, so it's only worth a line in the README's "A reply" bullet, so it doesn't come as a surprise.
  • In the PR body, the verifications/PR.md link points at the directory, not at verifications/552.md.

@github-actions github-actions Bot added the conflicts Conflicts with its base branch; set and cleared by the Label merge conflicts workflow label Nov 16, 2026
@github-actions

Copy link
Copy Markdown

This PR conflicts with its base branch. Rebase onto it, resolve the conflicts, and push.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the conflicts Conflicts with its base branch; set and cleared by the Label merge conflicts workflow label Nov 16, 2026
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@loopway-bot

Copy link
Copy Markdown
Contributor Author

Resolved the conflicts label: merged main into the branch and pushed.

  • The conflicts were in tui-main.tsx and tui-thread.tsx, which main had redesigned. I took main's versions and re-added the blocked text on the main row. In the thread view, the "updates queued" stat now reads "updates waiting on the answer" when the thread has open asks and a queue.
  • Main had already taken CLI version 2.0.1, so I raised this to 2.0.2.
  • Build, 238 cli tests, typecheck, lint and format all pass.

I did not rerun the live steps; the sandbox limitation in verifications/552.md still stands. I also haven't looked at the new TUI layout in a terminal.

@loopway-bot

Copy link
Copy Markdown
Contributor Author

Blocked: the merge from main is clean, but the live verification is still missing.

What I ran

At the new head, after the merge from main:

  • npm run build: clean
  • npm test: cli 238 passed (14 files), web 41 passed
  • npm run typecheck, npm run lint, npm run format:check: clean

The merge carries the blocked text into main's new TUI correctly. tui-main.tsx:111 adds the blocked text to Row, and tui-thread.tsx:102 changes the queued-updates label to "updates waiting on the answer".

Must fix

  1. Not fixed: the live verification. Steps 1–4 of A question answered in chat leaves the thread blocked, and its queue never goes out #549 have still not been run, and neither TUI change has been seen in a terminal. Matthew has to decide how they get run.
  2. Not fixed: the CHANGELOG version. The line is still under ## 2.0.0, even though main now has a ## 2.0.1 section and this PR ships as 2.0.2. It belongs under a new ## 2.0.2 heading.
  3. New: verifications/552.md is out of date. Its line 12 says 220 cli tests and lines 3 and 25 say version 2.0.1. The branch now has 238 tests and is version 2.0.2.

Worth considering

The earlier points still stand: chat answers a question the session asks after the message was typed (sessions.ts:167), and the README should say that any owner comment on the PR now answers a question.

@github-actions github-actions Bot added the conflicts Conflicts with its base branch; set and cleared by the Label merge conflicts workflow label Nov 16, 2026
@github-actions

Copy link
Copy Markdown

This PR conflicts with its base branch. Rebase onto it, resolve the conflicts, and push.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@loopway-bot

Copy link
Copy Markdown
Contributor Author

main moved again and conflicts came back, so I merged it into the branch and pushed. The only conflict was the asks.ts row in docs/developing.md; I kept main's new update.ts row and my "what a thread is blocked on" wording. Main is now at CLI 2.0.2, so this PR is 2.0.3. Build, 256 cli tests, typecheck, lint and format pass.

@github-actions github-actions Bot removed the conflicts Conflicts with its base branch; set and cleared by the Label merge conflicts workflow label Nov 16, 2026
Comment thread CHANGELOG.md Outdated

### Added

- A question answered in chat, or by a comment on any of the thread's subjects (the pull request, say), unblocks the thread, so its queue goes out. A blocked thread says what it waits on in `loopway threads`, `--json` and the TUI.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not going to be added in this version.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@loopway-bot

Copy link
Copy Markdown
Contributor Author

Moved the CHANGELOG line out of ## 2.0.0 into a new ## 2.0.3 section, which is this PR's version, and brought verifications/552.md up to date (256 cli tests, version 2.0.3). The loopway 2.0.1: watching line in it is real output from the earlier run, so I left it. Only markdown changed, so I did not rerun the checks.

Still open:

  • The live steps 1–4 of A question answered in chat leaves the thread blocked, and its queue never goes out #549 are not run: the dev bot cannot open sandbox issues because it does not read craftmilldev/loopway-sandbox. I need you to either add the sandbox to the bot's repos or run them yourself.
  • A chat message answers the questions open when it is typed. If a run already in flight asks one afterwards, that question stays open until the next chat message or a comment.

@loopway-bot

Copy link
Copy Markdown
Contributor Author

Blocked: the only thing left is the live verification.

What I ran

I read the new commits. They change only CHANGELOG.md and verifications/552.md, so the checks from the last head still apply: build, 256 cli and 41 web tests, typecheck, lint and format all pass.

Must fix

  1. Not fixed: the live verification. Steps 1–4 of A question answered in chat leaves the thread blocked, and its queue never goes out #549 have not been run, and neither TUI change has been seen in a terminal. Matthew has to decide how they get run.

Fixed: the CHANGELOG line is now under ## 2.0.3. verifications/552.md now says 256 tests and version 2.0.3, and it is right to keep the 2.0.1 log line as the output that run actually produced.

Worth considering

I withdraw my point about sessions.ts:167. answerByChat runs when the message is typed, so it can only answer asks that already exist. A question asked later in an in-flight run stays open, as you said. The README note that any owner comment on the PR answers a question still stands, and it is optional.

@mcwhittemore
mcwhittemore merged commit ad208cb into main Nov 16, 2026
3 checks passed
@mcwhittemore
mcwhittemore deleted the issue-549-chat-answers-questions branch November 16, 2026 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A question answered in chat leaves the thread blocked, and its queue never goes out

2 participants