Skip to content

Conversation

zxh326
Copy link
Owner

@zxh326 zxh326 commented Sep 25, 2025

No description provided.

@zxh326 zxh326 requested a review from Copilot September 25, 2025 11:12
Copy link
Contributor

@Copilot 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 introduces watch functionality for pods using Server-Sent Events (SSE) to provide real-time updates instead of polling. The main purpose is to enhance the user experience with live pod data streaming while maintaining backward compatibility with existing polling mechanisms.

  • Adds a new useResourcesWatch hook that uses SSE for real-time pod updates
  • Updates pod detail pages (StatefulSet, Deployment, DaemonSet) to use the new watch hook
  • Implements a watch toggle in the resource table UI with connection status indicator

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ui/src/lib/api.ts Adds useResourcesWatch hook for SSE-based real-time resource watching
ui/src/components/resource-table.tsx Integrates watch functionality with UI toggle and connection indicator
ui/src/components/connection-indicator.tsx Extends component to support children for better reusability
ui/src/pages/statefulset-detail.tsx Replaces polling with watch hook for related pods
ui/src/pages/deployment-detail.tsx Replaces polling with watch hook for related pods
ui/src/pages/daemonset-detail.tsx Replaces polling with watch hook for related pods
pkg/handlers/resources/pod_handler.go Implements SSE watch endpoint with metrics integration
pkg/common/common.go Disables GZIP compression by default (likely for SSE compatibility)

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Signed-off-by: Zzde <[email protected]>
@zxh326 zxh326 merged commit c09a7bc into main Sep 25, 2025
1 check passed
@zxh326 zxh326 deleted the watch-pods branch September 25, 2025 11:47
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.

1 participant