发布

  • [OPIK-4300] messages tab virtualization (#5110)

    frostbyte_neo 发布于 2026-02-11 10:25:21 +00:00

    • OPIK-4300 virtualization for messages tab

    • Remove dead LLMMessagesHighlighter and unused named exports

    Delete LLMMessagesHighlighter.tsx (exported but never imported),
    remove its re-export from the llmMessages barrel, and drop unused
    named component exports from PrettyLLMMessage/index.ts since all
    consumers use the namespace default.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Fix prettier formatting and remove unnecessary useCallback dependency

    Fix prettier indentation in PrettyLLMMessageHeader, PrettyLLMMessageTextBlock,
    MessagesTab, and useSyntaxHighlighterHooks. Remove unnecessary
    'combinedMessages' dependency from renderMessage useCallback.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Replace CodeMirror with static Lezer highlighting in Messages tab code blocks

    CodeMirror EditorView creation on mount/unmount during virtualized scrolling
    caused layout thrashing. Replace with lightweight Lezer highlightCode producing
    static elements - same visual output, orders of magnitude cheaper to
    mount. Restore code block rendering in MessagesTab and improve scroll position
    handling for expand/collapse.

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Whitelist static-code-* classnames in ESLint Tailwind rules

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

    • Use CSS variables for syntax colors, fix trailing empty line in code blocks
    • Replace hardcoded hex colors in .tok-* classes with CSS variables for
      proper dark mode support
    • Fix trailing empty line in static Lezer-highlighted code blocks
    • Add inline comments to virtualization constants
    • Remove virtualizer from useEffect dependency to prevent infinite loop

    Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


    Co-authored-by: Claude Opus 4.6 noreply@anthropic.com

    下载附件