Skip to content

Conversation

@jbair06
Copy link
Member

@jbair06 jbair06 commented Jan 8, 2026

Description:
This pull request enhances the notification filtering logic and improves the handling of transaction node updates in the transaction table. The main improvements include supporting multiple notification types in the notification filtering composable, updating the transaction node row to filter by multiple notification types for certain collections, and setting up real-time updates for transaction nodes via WebSocket events.

Notification Filtering Enhancements:

  • Updated useFilterNotifications to accept and handle an array of notification types, allowing filtering by multiple types at once. [1] [2]
  • Modified TransactionNodeRow.vue to use this new capability, especially for the HISTORY collection, which now filters notifications by several relevant types. [1] [2]

Transaction Node Table Improvements:

  • Added logic in TransactionNodeTable.vue to subscribe to WebSocket TRANSACTION_ACTION events, triggering a refresh of transaction nodes when relevant backend events occur.
  • Integrated composables for marking notifications as read and managing disposable WebSocket connections, improving notification state management and resource cleanup. [1] [2]

Related issue(s):

Fixes #2148

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@jbair06 jbair06 requested review from a team and yiliev0 as code owners January 8, 2026 07:58
@jbair06 jbair06 requested a review from jsync-swirlds January 8, 2026 07:58
@codecov
Copy link

codecov bot commented Jan 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.85%. Comparing base (6b9594a) to head (197d4da).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2151   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files         175      175           
  Lines        6832     6832           
  Branches     1315     1315           
=======================================
  Hits         6822     6822           
  Misses         10       10           

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

ericleponner
ericleponner previously approved these changes Jan 8, 2026
Copy link
Contributor

@ericleponner ericleponner left a comment

Choose a reason for hiding this comment

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

Looks good to me.
My comments are cosmetic.

@svienot svienot self-requested a review January 8, 2026 14:30
svienot
svienot previously approved these changes Jan 8, 2026
Copy link
Contributor

@svienot svienot left a comment

Choose a reason for hiding this comment

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

LGTM

@jsync-swirlds jsync-swirlds removed their request for review January 8, 2026 15:33
Copy link
Contributor

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 pull request refactors WebSocket subscription management and enhances notification filtering to support multiple notification types. The changes introduce a reusable useWebsocketSubscription composable that consolidates WebSocket event handling across the application, and updates the notification system to properly track and display notifications for various transaction states in the History collection.

Key changes include:

  • Created a new useWebsocketSubscription composable to standardize WebSocket event subscriptions
  • Updated useFilterNotifications to accept arrays of notification types instead of single types
  • Enhanced transaction node rows to show notifications for multiple relevant states in the History collection

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
useWebsocketSubscription.ts New composable that encapsulates WebSocket subscription logic with automatic connection/reconnection handling
useFilterNotifications.ts Updated to accept and filter by multiple notification types simultaneously
TransactionNodeRow.vue Modified to use notification type arrays and compute hasOldNotifications for proper notification display
TransactionNodeTable.vue Integrated WebSocket subscription and useMarkNotifications with specified notification types
History.vue Refactored to use the new useWebsocketSubscription composable, removing manual subscription code
TransactionGroupDetails.vue Refactored to use the new useWebsocketSubscription composable, removing manual subscription code
TransactionDetails.vue Refactored to use the new useWebsocketSubscription composable, removing manual subscription code

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@ericleponner ericleponner left a comment

Choose a reason for hiding this comment

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

LGTM

@ericleponner ericleponner merged commit 162f033 into main Jan 8, 2026
38 of 40 checks passed
@ericleponner ericleponner deleted the history-notifications-not-being-removed branch January 8, 2026 19:48
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.

History page not updating notification display or read status in organizations using transactionnodetable

4 participants