panel-log

GitHub

高性能日志面板技能,涵盖基于react-window的虚拟滚动、动态行高测量与缓存、自动滚动逻辑,以及ROS1/2/Foxglove多格式日志归一化和多级文本过滤功能。

.github/skills/panel-log/SKILL.md lichtblick-suite/lichtblick

Trigger Scenarios

需要实现或优化前端高性能列表渲染 处理多种日志格式的归一化与解析 实现日志级别与关键词过滤逻辑

Install

npx skills add lichtblick-suite/lichtblick --skill panel-log -g -y
More Options

Non-standard path

npx skills add https://github.com/lichtblick-suite/lichtblick/tree/develop/.github/skills/panel-log -g -y

Use without installing

npx skills use lichtblick-suite/lichtblick@panel-log

指定 Agent (Claude Code)

npx skills add lichtblick-suite/lichtblick --skill panel-log -a claude-code -g -y

安装 repo 全部 skill

npx skills add lichtblick-suite/lichtblick --all -g -y

预览 repo 内 skill

npx skills add lichtblick-suite/lichtblick --list

SKILL.md

Frontmatter
{
    "name": "panel-log",
    "description": "Deep Log panel knowledge: react-window VariableSizeList virtualization, dynamic measured row heights, autoscroll\/tail behavior, multi-format log normalization, and level\/text filtering."
}

Panel Log Skill

A high-performance log viewer with virtualized rendering and filtering.

Structure

panels/Log/
├── index.tsx          # main panel, filter state, topic selection, settings
├── LogList.tsx        # react-window VariableSizeList, dynamic heights, autoscroll
├── filterMessages.ts  # level + text filtering
└── conversion.tsx     # normalize ROS1/ROS2/Foxglove log formats

Virtualized Rendering (react-window)

<VariableSizeList
  height={containerHeight}
  itemCount={filteredMessages.length}
  itemSize={getItemSize}   // dynamic: cached height per row
  ref={listRef}
>
  {LogRow}
</VariableSizeList>

Dynamic Row Heights

  • Each entry can differ (multi-line messages, stack traces)
  • Heights are measured after first render and cached
  • resetAfterIndex() is called when content changes (recalculates from that point)
  • Cache is invalidated on resize or filter change

Autoscroll (tail)

  • At bottom → auto-scroll to new messages
  • Scrolled up → autoscroll disabled (reading history)
  • Scroll-to-bottom button re-enables it

Message Normalization (conversion.tsx)

Unifies multiple formats into one structure:

interface NormalizedLogMessage {
  level: LogLevel;   // DEBUG, INFO, WARN, ERROR, FATAL
  message: string;
  name?: string;     // logger name
  timestamp: Time;
  file?: string;
  line?: number;
}

Supported inputs: rosgraph_msgs/Log (ROS 1), rcl_interfaces/msg/Log (ROS 2), foxglove.Log.

Filtering (filterMessages.ts)

function filterMessages(
  messages: NormalizedLogMessage[],
  minLevel: LogLevel,
  searchTerm: string,
): NormalizedLogMessage[];
  • Level filter: messages at or above the selected level
  • Text search: case-insensitive substring match (no regex by default)
  • Runs on every new batch — must stay fast for 10k+ messages

Performance Notes

  • Only visible rows are rendered (react-window)
  • Measured heights are cached to avoid layout thrashing
  • Messages are accumulated and filtered in batches (250ms debounce)
  • scrollToItem is only called when actually at the bottom

Key Files

  • packages/suite-base/src/panels/Log/index.tsx
  • packages/suite-base/src/panels/Log/LogList.tsx
  • packages/suite-base/src/panels/Log/filterMessages.ts
  • packages/suite-base/src/panels/Log/conversion.tsx

Version History

  • 6435710 Current 2026-08-16 02:35
  • cab9317 2026-07-24 12:17

Same Skill Collection

.github/skills/3d-rendering/SKILL.md
.github/skills/caching-internals/SKILL.md
.github/skills/deserialization/SKILL.md
.github/skills/e2e-playwright-mcp/SKILL.md
.github/skills/electron-internals/SKILL.md
.github/skills/extensions-internals/SKILL.md
.github/skills/layouts-internals/SKILL.md
.github/skills/mcap-format/SKILL.md
.github/skills/message-path/SKILL.md
.github/skills/message-pipeline/SKILL.md
.github/skills/panel-extension-api/SKILL.md
.github/skills/panel-image/SKILL.md
.github/skills/panel-map/SKILL.md
.github/skills/panel-raw-messages/SKILL.md
.github/skills/panel-state-transitions/SKILL.md
.github/skills/panel-user-scripts/SKILL.md
.github/skills/performance/SKILL.md
.github/skills/player-internals/SKILL.md
.github/skills/plot-internals/SKILL.md
.github/skills/release-process/SKILL.md
.github/skills/remote-caching/SKILL.md
.github/skills/test-conventions/SKILL.md
.github/skills/theme/SKILL.md
.github/skills/unit-testing/SKILL.md
.github/skills/web-workers/SKILL.md
.github/skills/websocket-connection/SKILL.md

Metadata

Files
0
Version
6435710
Hash
7bce00e1
Indexed
2026-07-24 12:17

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 20:31
浙ICP备14020137号-1 $mapa de visitantes$