fix(web): treat skills as text in question answers - #7812
Conversation
Summary: - Disable skill suggestions and inline skill tokens for pending questions. - Keep cursor and trigger state aligned when pending input starts or ends. Rationale: - Question responses send answer strings, not provider turns. Rendering skill tokens there could desynchronize Lexical cursor state and recurse updates. Tests: - vp test run on five focused web test files (81 tests) - vp run --filter @t3tools/web typecheck - targeted vp lint and vp fmt --check Refs pingdotgg#7805 AI-Assisted: true AI-Agent: codex AI-Model: openai/gpt-5.6-sol
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Medium
When includeSkillTokens changes, the dead-key backtick handler still uses the value captured by the previous effect, so collapseExpandedComposerCursor computes replacementStart with the wrong tokenization mode and replaces/selects the wrong range after a $skill. Include props.includeSkillTokens in the listener effect dependencies (or read it through a ref/effect event) so the handler uses the current mode.
🤖 Copy this AI Prompt to have your agent fix this:
In file @apps/web/src/components/ComposerPromptEditor.tsx around line 1548:
When `includeSkillTokens` changes, the dead-key backtick handler still uses the value captured by the previous effect, so `collapseExpandedComposerCursor` computes `replacementStart` with the wrong tokenization mode and replaces/selects the wrong range after a `$skill`. Include `props.includeSkillTokens` in the listener effect dependencies (or read it through a ref/effect event) so the handler uses the current mode.
|
Closing in favor of #7818, which fixes the same issue (#7805) by treating question answers as plain text end to end (matching mobile) instead of threading an includeSkillTokens flag through the shared cursor and tokenizer logic. Smaller surface, and it removes the trigger-menu bug class in answers structurally. |
Closes #7805
Pending question answers used the regular composer skill UI even though the response path only sends answer strings. Selecting or completing a
$skilltoken could leave the picker open and desynchronize Lexical cursor state.This disables skill suggestions, slash-menu skill entries, and inline skill tokens while a pending question is active. File mentions and slash commands keep their existing behavior. The regular composer still supports skills.
Tests:
Evidence:
Implemented with OpenAI gpt-5.6-sol using Codex in T3 Code.
Note
Treat
$skillsyntax as plain text when pending progress existsincludeSkillTokensflag that is threaded through the prompt editor, cursor logic, and trigger detection utilities.activePendingProgress === null, disabling skill token parsing while a pending progress item exists.$skillsyntax is treated as plain text: skill triggers and menu items are excluded, and segment splitting in composer-editor-mentions.ts drops skill matches. Path and slash commands remain unaffected.$skilltokens only whenincludeSkillTokensis true.📊 Macroscope summarized 5568f19. 4 files reviewed, 1 issue evaluated, 0 issues filtered, 1 comment posted
🗂️ Filtered Issues