Name:
[IMP] P16: Editor Extension Framework - modular Brain/AI editor (OdooEditor migration)
State:
Failed
finished in 15m
PR State:
merged
PR Author:
David Tran
PR Author Email:
PR:
#43
Committer:
David Tran
Committer Email:
davidtran.hp@gmail.com
Commit:
258943e94a160ac195cef47901ddd3c85631cf0a
Description:
[FIX] viin_brain: repair slash-focus tour (AI category priority outranks Brain)
ROOT CAUSE (tour fragility, not product code regression):
viin_ai_editor registers an "AI" powerbox category at priority 95 and an
"AI block" command at priority 90. The "Brain" category is registered at
priority 90. The OdooEditor Powerbox sorts categories by priority desc then
name asc, so "AI" (p=95) renders before "Brain" (p=90). Pressing Enter
after a bare "/" selected the "AI block" command instead of "Heading 1",
and the assertion :has(h1,h2,h3) failed.
Evidence: failure screenshot showed the AI block component rendered (the
"AI block - Empty - type a prompt or pick a template" UI) instead of an h1.
The Brain heading-via-slash command itself works correctly when explicitly
selected; the tour was testing an incidental ordering assumption.
FIX (tour fix, not product code):
Changed the powerbox step to type "/heading" instead of bare "/" before
pressing Enter. After insertText("/heading") + a keyup event, Powerbox.
_onKeyup() runs patienceDiff and filters filteredCommands to only the three
Brain heading commands (Heading 1 p=100, Heading 2 p=90, Heading 3 p=80).
"Heading 1" is then the active/first command. Tightened the final assertion
from :has(h1,h2,h3) to :has(h1) since the filter + priority guarantee h1.
FAILURE 2 (TestBrainTimelineTour): already green in the worktree; 0 failed
on isolation re-run. No code change needed.
Wikilink tour: confirmed still green (3/3 pass, 0 errors).
Branch:
17.0
Instance ID:
0
Age:
Up-time: