You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9674662
Browse filesBrowse the repository at this point in the historyBrowse files
fix(web): settle remount caret at end and keep surround-typing in answers
Summary:
- The focus restore after a plainText remount now places the caret at
the end of the current value instead of the snapshot cursor, which
was seeded from the previous mode's stale cursor prop. Both mode
transitions settle the caret at the end anyway, so this removes the
brief window where a keystroke could land at a stale offset.
- ComposerSurroundSelectionPlugin is mounted in both modes: wrapping a
selection by typing brackets/quotes is plain typing behavior, not
token behavior. The plugin takes a plainText prop and uses raw cursor
clamps in plain mode; the mention-boundary guard is skipped there so
answer text that merely looks like a mention still wraps.
Rationale:
- Follow-up to PR #7818 bot re-review: Cursor Bugbot flagged the stale
caret on mode remount, Macroscope flagged the surround-typing
regression for question answers introduced by the plugin gate.
Tests:
- vp test run src/components/ComposerPromptEditor.test.ts (5 passed)
- tsc --noEmit on apps/web clean; oxlint on both touched files clean
AI-Assisted-By: Codex
AI-Assisted: true
AI-Agent: claude-code
AI-Model: anthropic/claude-fable-5
0 commit comments