agent_crew icon indicating copy to clipboard operation
agent_crew copied to clipboard

Fix WYSIWYG editor scroll, change detection, and button overlap in team settings

Open sre-helmcode opened this issue 8 months ago • 1 comments

Bug Description

Three related issues in the rich text editor (MarkdownEditor) within team settings:

  1. No scroll in WYSIWYG mode: The editor content area didn't allow scrolling when content exceeded the modal height
  2. Change detection not working: Editing text in WYSIWYG mode didn't trigger the dirty state, so Discard/Save buttons never appeared
  3. Button overlap: When switching from RAW to WYSIWYG, the Discard/Save buttons appeared behind the editor and couldn't be interacted with

Root Cause

  • TipTap doesn't fire onUpdate on initialization, so initialSyncDone flag in InstructionsEditor was never set, causing the first real edit to be treated as normalization (resetting savedContent = content, keeping isDirty always false)
  • Missing flex layout propagation from SettingsModal to MarkdownEditor prevented proper overflow handling
  • No overflow-y-auto on the WYSIWYG content area

Fix (v0.4.12)

  • Added onCreate callback to TipTap editor to emit normalized markdown on initialization
  • Wrapped WYSIWYG content in scrollable flex container (min-h-0 + flex-1 + overflow-y-auto)
  • Added flex-shrink-0 to mode toggle bar
  • Propagated flex flex-col from InstructionsEditor to MarkdownEditor

Files changed: MarkdownEditor.tsx, SkillStatusPanel.tsx

sre-helmcode avatar Apr 01 '26 14:04 sre-helmcode

Fixed in v0.4.12 (commit d4442e3)

sre-helmcode avatar Apr 01 '26 14:04 sre-helmcode