GeezerVison is showing github.com — refactor(client-runtime): move web's /feedback reply rule to the helper by viktorce · Pull Request #44991 · pingdotgg/t3code
Conversation
Problem
#44541 made /feedback keep a pending reply on web. Because composerRunsDraftLocally had only holdsOnlyText, #44541 added a second inline /feedback check in apps/web/src/components/chat/ChatComposer.tsx beside the helper call. #44957 then added commandText, the draft text with inline context references stripped, and had to edit both /feedback checks to stay in step. That leaves two copies of the /feedback check on main, and a client that adds replies later would have to copy the same workaround.
Change
No behaviour changes on web or mobile.
packages/client-runtime/src/state/composerDispatch.ts adds a required replyPending input, so a client that adds replies later has to decide what to pass, and renames holdsOnlyText to holdsNoAttachedContext. It checks in this order.
/side is local when side chat is offered, with any context.
- Attached context makes the draft not local.
/feedback on Codex is local, also with a pending reply. It reads commandText.
- A pending reply makes the draft not local.
/usage-limits and /clear are local when offered. /usage-limits reads text, and /clear reads commandText.
apps/web/src/components/chat/ChatComposer.tsx makes one call with holdsNoAttachedContext, replyPending: replyTo !== null, and commandText, and deletes its inline /feedback check and import. apps/mobile/src/features/threads/ThreadComposer.tsx passes holdsNoAttachedContext and replyPending: false, since mobile on main has no replies. packages/client-runtime/src/state/composerDispatch.test.ts adds pending-reply, attached-context, and commandText assertions. apps/web/src/components/chat/useComposerSend.ts does not change.
Scope
This is a refactor and not a bug fix. Behaviour on main is correct. CONTRIBUTING.md asks for bug fixes from outside contributors. There is no linked issue because the issue form accepts bug reports only. This PR removes the duplication that #44541 named under "Known limits" and that #44957 had to edit in two places. Closing it is fine if the team would rather handle this themselves or skip it.
Verification
vp run check:changed passes format, lint, knip, typecheck on 7 packages, composerDispatch.test.ts, and React Compiler.
- Breaking each rule on purpose fails an assertion in
composerDispatch.test.ts, including the commandText assertions for /feedback with a pending reply and /clear without one.
- All 25 tests in
apps/web/src/components/ChatView.browser.test.tsx pass unchanged, including the pending-reply test and both local-command tests from fix(web): send button names what Enter does for local commands during a running turn #44957. Those check the send button's name during a running turn, so web's button did not change. No test reaches a real feedback upload.
- For mobile, typecheck ran and the call in
ThreadComposer.tsx was read. Nobody ran the web or mobile app by hand or took captures, because nothing visible changes.
- Reviewers compared the new single helper call against
main's helper call plus inline check across generated web and mobile inputs and found no difference, up to 9,830,400 web decisions and 1,920 mobile ones.
Claude Opus 5.5 wrote the change using the Claude Code harness inside T3 Code. GPT-6.2 Sol, Claude Opus 5.5, Claude Fable 5.2, and Gemini 4 Neon reviewed it, and Gemini 4 Neon wrote this description.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
composerRunsDraftLocally now takes replyPending, and holdsOnlyText is
renamed holdsNoAttachedContext. With a pending reply, /feedback still runs
locally while /clear and /usage-limits do not, so the web composer drops
its inline /feedback check and makes one call. Mobile has no reply yet and
passes replyPending: false.
|

No actionable comments were generated in the recent review.
Walkthrough
-
Local-command routing now considers attached context and pending replies. The mobile and web composers pass the updated context input to the shared function. Tests cover command behavior with attached context, pending replies, and reply-reference text.
Changes: Local Command Routing
| Layer / File(s) |
Summary |
Update local-command routing packages/client-runtime/src/state/composerDispatch.ts, packages/client-runtime/src/state/composerDispatch.test.ts |
composerRunsDraftLocally now accepts attached-context and pending-reply inputs. Feedback commands are checked before the pending-reply guard; other command checks are skipped while a reply is pending. Tests cover these conditions and command parsing after reply-reference text. |
Update composer callers apps/mobile/src/features/threads/ThreadComposer.tsx, apps/web/src/components/chat/ChatComposer.tsx |
Both composers pass the no-attached-context state to the shared routing function. The web composer removes its separate feedback-command routing check. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Refactor
Possibly related issues
- pingdotgg/t3code#44944: The issue concerns local-command selection during a running turn. This change covers some commands during pending replies, but the reported inline-context and image-compression cases are not established as addressed.
Suggested reviewers: juliusmarminge
Merge Risk: Minimal · up to 255be
-
This refactor keeps the existing /feedback, /clear and /usage-limits routing behavior in the web and mobile composers. No merge-blocking risk was found.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title names the refactor that matches the changeset: the web /feedback reply rule moves into the shared composerRunsDraftLocally helper. It follows the conventional commit format and is specific t… |
| Description check |
 |
The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific detail. It explains the duplication being removed, the new helper ordering, caller… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Title check
-
Explanation
The title names the refactor that matches the changeset: the web /feedback reply rule moves into the shared composerRunsDraftLocally helper. It follows the conventional commit format and is specific to the primary change. It is 71 characters, which is slightly long but acceptable.
Full details: Description check
-
Explanation
The description follows the template sections (Problem, Change, Scope, Verification) and fills each one with specific detail. It explains the duplication being removed, the new helper ordering, caller updates, the scope rationale (refactor rather than bug fix, no linked issue), and the verification performed. The template asks for a model and harness note at the end, and the description includes one. Verification is detailed rather than a bare 'tests pass'. Minor concern: the Scope section argues against the template's bug-fix-only policy, but it discloses this openly and does not hide it.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between fcb8c05 and 255be2b.
Files selected for processing: 4
-
apps/mobile/src/features/threads/ThreadComposer.tsx
apps/web/src/components/chat/ChatComposer.tsx
packages/client-runtime/src/state/composerDispatch.test.ts
packages/client-runtime/src/state/composerDispatch.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|