Skip to content

fix(googlechat): keep folded progress when a turn ends without an answer - #33

Merged
jai merged 2 commits into
maintain/googlechat-patch-stack-2026-10-17from
fix/googlechat-keep-progress-on-yield
Nov 11, 2026
Merged

jai merged 2 commits into
maintain/googlechat-patch-stack-2026-10-17from
fix/googlechat-keep-progress-on-yield

Conversation

@jai

@jai jai commented Nov 11, 2026

Copy link
Copy Markdown
Owner

Regression from layer 12 (#29/#31): Cosmo folded a progress update into the activity message, then yielded to a subagent. The turn settled with no answer and the activity message was deleted, so the DM showed nothing.

Now the activity message is kept, showing the last folded progress, unless a separate answer was posted in that placement (monitor delivery or a message-tool send). Tests: Google Chat 306/306, including both cases; extension tsgo clean.

When an agent folds a progress update into the activity message and then yields to a subagent, the turn settles with no answer and the monitor deleted the activity message, leaving no visible trace. Keep it as the last folded progress text unless a separate answer was posted in that placement by monitor delivery or a message-tool send.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T12:53:47.392871Z 3a0bee0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a0bee0f1d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}
const placeholder = typingMessage;
typingMessage = undefined;
if (placeholder && foldedProgressText && !answerPosted) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Mark observed deliveries as separately posted answers

When a final source reply is confirmed through onObservedReplyDelivery—for example, a shared Gateway delivery—that callback sets only hasVisibleAnswer, not answerPosted. If progress was folded earlier, this condition remains true, so settlement restores the activity and returns instead of deleting it, leaving stale progress beside the confirmed answer. Set the separate-answer flag for observed delivery as well.

Useful? React with 👍 / 👎.

Comment on lines +164 to +168
accountId: account.accountId,
spaceId: space,
threadName: deliveredThread,
sessionKey,
})?.noteSeparatePost?.();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Mark accepted chunks before throwing partial delivery

When a long message-tool answer is chunked and a later sendGoogleChatMessage call fails, the handler throws a partial-delivery error after earlier chunks are already visible. This notification runs only after the whole loop succeeds, so the activity is never marked; settlement then preserves folded progress alongside the partial answer. Notify the matching activity before throwing whenever acceptedText is nonempty.

Useful? React with 👍 / 👎.

@jai

jai commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

Codex review (CLI): applied the one finding — automatic commentary/status notices folded into the activity message are now kept on a silent turn too (test added). 307/307 Google Chat tests, extension tsgo clean.

@jai
jai merged commit 74ed024 into maintain/googlechat-patch-stack-2026-10-17 Nov 11, 2026
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.

1 participant