Fix overzealous issue summary table reloads.

Review Request #13234 — Created Aug. 23, 2023 and submitted

Information

Review Board
release-6.x

Reviewers

The review request page does some long-running requests to fetch new
updates to various parts, including entries and the issue summary table.
The entries all had an updated timestamp included, and on the client
side we'd check to make sure there actually was an update, but the issue
summary table did not. This change adds a new timestamp to the update
payload for this, and checks that timestamp client-side to prevent us
from doing unnecessary DOM updates.

  • Ran python tests.
  • Ran js-tests.
  • Verified that when just looking at an unchanged page, the issue
    summary table was not being updated in the DOM.
  • Changed some issue state from another tab and saw the issue summary
    table reload correctly.
Summary ID
Fix overzealous issue summary table reloads.
The review request page does some long-running requests to fetch new updates to various parts, including entries and the issue summary table. The entries all had an updated timestamp included, and on the client side we'd check to make sure there actually was an update, but the issue summary table did not. This change adds a new timestamp to the update payload for this, and checks that timestamp client-side to prevent us from doing unnecessary DOM updates. Testing Done: - Ran python tests. - Ran js-tests. - Verified that when just looking at an unchanged page, the issue summary table was not being updated in the DOM. - Changed some issue state from another tab and saw the issue summary table reload correctly.
4c32cd534d203edafec44d6b82b0d7283785861d
Description From Last Updated

Missing docs here.

chipx86chipx86

Can we type this? I know typing this whole class is a huge amount of work, but we can start …

chipx86chipx86

This could probably be: self.latest_issue_timestamp = max( comment.timestamp for comment in self.all_comments )

chipx86chipx86
chipx86
  1. 
      
  2. reviewboard/reviews/detail.py (Diff revision 1)
     
     
    Show all issues

    Can we type this? I know typing this whole class is a huge amount of work, but we can start here.

  3. reviewboard/reviews/detail.py (Diff revision 1)
     
     
     
     
    Show all issues

    This could probably be:

    self.latest_issue_timestamp = max(
        comment.timestamp
        for comment in self.all_comments
    )
    
  4. 
      
david
chipx86
  1. 
      
  2. reviewboard/reviews/detail.py (Diff revisions 1 - 2)
     
     
    Show all issues

    Missing docs here.

  3. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
david
Review request changed
Status:
Completed
Change Summary:
Pushed to release-6.x (bfbe6e2)