fix(web): stop question answers from resetting the editor caret - #11337
fix(web): stop question answers from resetting the editor caret#11337shivamhwp wants to merge 1 commit into
Conversation
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a small, self-contained web bug fix that preserves answer updates while removing a stale caret repositioning side effect. It introduces no new capability, schema, configuration, or sensitive-data behavior. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Selecting a skill in a pending question answer can leave the picker stuck and trigger
Maximum call stack size exceeded. The answer callback reads the old editor snapshot and resets the caret before the new answer has rendered, re-entering Lexical with stale token offsets.Let the editor retain its selection when reporting an answer change. Picker replacements already schedule their own caret placement. This removes the extra snapshot read and focus reset.
Refs #7805. This fixes the reproduced recursion and caret corruption; it preserves the existing skill picker. The broader request to make question answers plain text remains open. Stacked on #11298.
Native Electron verification with two synthetic pending questions: the base leaves
$brounconverted, keeps 12 picker options open, and logs a stack overflow. The fix creates the Bro chip, closes the picker, and reports no errors. Typing/backspace works; Next starts empty, Previous preserves the first answer, and removing the request restores the original draft. No final answer was submitted to a provider. Web typecheck and 36 existing editor/answer tests pass; scoped lint exactly matches 17 base warnings.Before/after images and video are captured. GitHub asset upload remains pending while its background browser connection is unavailable.
Model: GPT-6. Harness: Codex.