refactor(reply): clarify explicit reply tags in off mode#16189
refactor(reply): clarify explicit reply tags in off mode#16189
Conversation
PR SummaryMedium Risk Overview Renames the channel threading knob Behavior tightening: when Written by Cursor Bugbot for commit bf406c1. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
💡 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) |
There was a problem hiding this comment.
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 👍 / 👎.
66922d6 to
bf406c1
Compare
There was a problem hiding this comment.
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; | ||
| }; |
There was a problem hiding this comment.
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.


Refactor only.
allowTagsWhenOff->allowExplicitReplyTagsWhenOff.replyToMode=off(keepwebchatallowed).Tests: pnpm check, pnpm test.
Greptile Overview
Greptile Summary
Clean refactoring of the reply threading/tag system with one deliberate behavioral tightening:
allowTagsWhenOfftoallowExplicitReplyTagsWhenOffacross the type, dock, plugin, and filter layers for clarity.replyToCurrentresolution into a singleresolveReplyThreadingForPayloadhelper, reducing duplication inreply-payloads.ts.createReplyToModeFilterto includereplyToCurrent(not justreplyToTag), which compensates for the removedreplyToTag ?? truedefault.replyToMode=off(previously defaulted to allowing tags). Internalwebchatchannel is explicitly exempted. This is a security improvement.Confidence Score: 5/5
Last reviewed commit: e8ebc8e