Skip to content

refactor(reply): clarify explicit reply tags in off mode#16189

Merged
steipete merged 2 commits intomainfrom
refactor/reply-threading-explicit-tags
Feb 14, 2026
Merged

refactor(reply): clarify explicit reply tags in off mode#16189
steipete merged 2 commits intomainfrom
refactor/reply-threading-explicit-tags

Conversation

@steipete
Copy link
Contributor

@steipete steipete commented Feb 14, 2026

Refactor only.

  • Rename allowTagsWhenOff -> allowExplicitReplyTagsWhenOff.
  • Fail closed for unknown channels when replyToMode=off (keep webchat allowed).
  • Consolidate reply threading/tag parsing into a single helper.

Tests: pnpm check, pnpm test.

Greptile Overview

Greptile Summary

Clean refactoring of the reply threading/tag system with one deliberate behavioral tightening:

  • Renames allowTagsWhenOff to allowExplicitReplyTagsWhenOff across the type, dock, plugin, and filter layers for clarity.
  • Consolidates implicit reply threading, tag parsing, and replyToCurrent resolution into a single resolveReplyThreadingForPayload helper, reducing duplication in reply-payloads.ts.
  • Broadens the "explicit" check in createReplyToModeFilter to include replyToCurrent (not just replyToTag), which compensates for the removed replyToTag ?? true default.
  • Behavioral change: unknown channels now fail closed when replyToMode=off (previously defaulted to allowing tags). Internal webchat channel is explicitly exempted. This is a security improvement.
  • Tests updated accordingly; existing integration tests confirm no regression.

Confidence Score: 5/5

  • This PR is safe to merge — it's a well-scoped refactor with one intentional security tightening, backed by passing tests.
  • The changes are primarily mechanical renames plus a consolidation of duplicated logic into a single helper. The one behavioral change (fail-closed for unknown channels) is a deliberate security improvement. All existing tests pass, the old property name is fully removed, and the refactored code paths are logically equivalent to the originals.
  • No files require special attention.

Last reviewed commit: e8ebc8e

@cursor
Copy link

cursor bot commented Feb 14, 2026

PR Summary

Medium Risk
Mostly a mechanical refactor/rename, but it changes default reply-thread behavior for unknown channels when replyToMode="off", which could alter threading in some integrations.

Overview
Refactors reply-threading so implicit reply IDs, explicit [[reply_to_*]] tag parsing/cleanup, and replyToCurrent resolution are handled by a single helper (resolveReplyThreadingForPayload), reducing duplicated logic in the reply payload pipeline.

Renames the channel threading knob allowTagsWhenOff to allowExplicitReplyTagsWhenOff (keeping allowTagsWhenOff as a deprecated alias in the core type), updates Slack docks/extensions and tests, and adjusts the “explicit reply” detection to include replyToCurrent (not just replyToTag).

Behavior tightening: when replyToMode="off", unknown channels now fail closed (do not preserve explicit reply tags) while webchat remains explicitly allowed.

Written by Cursor Bugbot for commit bf406c1. This will update automatically on new commits. Configure here.

@openclaw-barnacle openclaw-barnacle bot added channel: slack Channel integration: slack size: S maintainer Maintainer-authored PR labels Feb 14, 2026
Copy link

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

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: e8ebc8ea06

ℹ️ 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".

// Default: allow explicit reply tags/directives even when replyToMode is "off".
// Unknown channels fail closed; internal webchat stays allowed.
const allowExplicitReplyTagsWhenOff = provider
? (getChannelDock(provider)?.threading?.allowExplicitReplyTagsWhenOff ?? true)

Choose a reason for hiding this comment

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

P2 Badge Preserve backward compatibility for threading opt-out key

This lookup now only honors allowExplicitReplyTagsWhenOff, so existing channel plugins that still set the previous threading.allowTagsWhenOff: false flag will silently fall back to true and start allowing explicit reply tags even when replyToMode is off. Because plugin channels are a supported extension surface, this is a behavior regression for already-deployed plugins unless we keep a fallback to the legacy key during resolution.

Useful? React with 👍 / 👎.

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation gateway Gateway runtime size: L and removed size: S labels Feb 14, 2026
@steipete steipete force-pushed the refactor/reply-threading-explicit-tags branch from 66922d6 to bf406c1 Compare February 14, 2026 13:07
@openclaw-barnacle openclaw-barnacle bot added size: S and removed docs Improvements or additions to documentation gateway Gateway runtime size: L labels Feb 14, 2026
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

// ignore
}
return null;
};
Copy link

Choose a reason for hiding this comment

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

Near-identical alias resolver duplicates existing function

Low Severity

resolvePluginSdkAccountIdAlias is a near-verbatim copy of resolvePluginSdkAlias — the only difference is the subpath (plugin-sdk/account-id vs plugin-sdk/index). A single parameterized helper accepting the subpath as an argument would eliminate the ~30-line duplication, reducing maintenance burden and the risk of the two copies drifting out of sync.

Additional Locations (1)

Fix in Cursor Fix in Web

@steipete steipete merged commit ef70a55 into main Feb 14, 2026
26 checks passed
@steipete steipete deleted the refactor/reply-threading-explicit-tags branch February 14, 2026 13:15
hamidzr pushed a commit to hamidzr/openclaw that referenced this pull request Feb 14, 2026
)

* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
openperf pushed a commit to openperf/moltbot that referenced this pull request Feb 14, 2026
)

* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
openperf pushed a commit to openperf/moltbot that referenced this pull request Feb 14, 2026
)

* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
BigUncle pushed a commit to BigUncle/openclaw that referenced this pull request Feb 14, 2026
)

* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
mverrilli pushed a commit to mverrilli/openclaw that referenced this pull request Feb 14, 2026
)

* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
GwonHyeok pushed a commit to learners-superpumped/openclaw that referenced this pull request Feb 15, 2026
)

* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
zooqueen pushed a commit to hanzoai/bot that referenced this pull request Mar 6, 2026
)

* refactor(reply): clarify explicit reply tags in off mode

* fix(plugin-sdk): alias account-id subpath for extensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: slack Channel integration: slack maintainer Maintainer-authored PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant