Skip to content

Conversation

@shczhen
Copy link
Collaborator

@shczhen shczhen commented Apr 27, 2025

  • refactor logviewer backstage (use batch updates)
  • fix: backstage widgets unexpectedly reloaded

@shczhen shczhen requested a review from halajohn as a code owner April 27, 2025 03:43
@shczhen shczhen requested a review from Copilot April 27, 2025 03:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the log viewer functionality by introducing batch updates for log buffering and debounced log appending, and also fixes an issue with backstage widgets being unexpectedly reloaded.

  • Introduces a new debounced function (appendLogsById) in the widget store for batch log updates.
  • Updates the LogViewerWidget to use the new batch update function.
  • Removes an unnecessary dependency from the LogViewerPopup component to prevent unintended reloads.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
core/src/ten_manager/designer_frontend/src/store/widget.tsx Added debounced log buffering/updating mechanism for batch log updates.
core/src/ten_manager/designer_frontend/src/components/Widget/LogViewerWidget.tsx Replaced direct calls to appendLogViewerHistory with the new debounced appendLogsById.
core/src/ten_manager/designer_frontend/src/components/Popup/LogViewer.tsx Adjusted useEffect dependency array to resolve reload issues.

@halajohn halajohn merged commit d025af7 into main Apr 27, 2025
2 of 7 checks passed
@halajohn halajohn deleted the fe-bug-fix-250422 branch April 27, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants