DT polls every 5s for new messages to show (1) the new message warning and (2) the parent-comment-deleted error.
If a user leaves a browser window open for an hour they could run into API rate limits, leaving them unable to do anything else.
Possible solutions:
- Using slower polling for anons
- Disable polling for anons
- Pause polling when no keyboard / mouse events detected for X seconds.
Derived Requirements
- Ensure that DiscussionTools continues to detect and notify users when a new comment is posted in a thread while they have a Reply Tool widget open.
- Ensure that polling pauses after 5 minutes without mouse or keyboard activity to reduce unnecessary API requests.
- Ensure that consecutive polling failures increase the delay before subsequent polling attempts instead of continuing to poll every 5 seconds.
- Ensure that polling stops entirely after 17 consecutive failures when the next polling delay would exceed one hour.
Test Steps
Test Case 1: Ensure polling detects new comments while the Reply Tool is open
- Open a discussion page with DiscussionTools enabled.
- Open the Reply Tool for an existing comment.
- Keep the Reply Tool open and remain active on the page.
- From a separate user account or browser session, post a new comment in the same thread.
- Wait for the thread update polling to detect the new comment.
- Observe the Reply Tool.
- ✅❓❌⬜ AC1: A new-message notice appears when another user posts a new comment in the thread while the Reply Tool is open.
Test Case 2: Ensure polling pauses after 5 minutes of inactivity
- Open a discussion page with DiscussionTools enabled.
- Open the Reply Tool for an existing comment.
- Open the browser's network monitoring tools and identify the thread update polling requests.
- Stop all mouse and keyboard interaction with the page.
- Wait for at least 5 minutes.
- Observe the network activity.
- ✅❓❌⬜ AC2: Thread update polling pauses after 5 minutes without mouse or keyboard activity.
Test Case 3: Ensure polling uses an increasing delay after consecutive failures
- Open a discussion page with DiscussionTools enabled.
- Open the Reply Tool for an existing comment.
- Remain active on the page throughout the test.
- Use an appropriate test method to cause consecutive thread update polling requests to fail.
- Observe the timing between each subsequent polling request.
- ✅❓❌⬜ AC3: The delay between polling requests increases after each consecutive failure instead of continuing to poll every 5 seconds.
Test Case 4: Ensure polling stops after 17 consecutive failures
- Open a discussion page with DiscussionTools enabled.
- Open the Reply Tool for an existing comment.
- Remain active on the page throughout the test.
- Use an appropriate test method to cause 17 consecutive thread update polling requests to fail.
- Allow each retry attempt to occur according to its increased delay.
- After the 17th consecutive failure, observe subsequent network activity.
- ✅❓❌⬜ AC4: Thread update polling stops after 17 consecutive failures when the next polling delay would exceed one hour.
QA Results - TesetWiki
| AC | Status | Details |
|---|---|---|
| 1 | ✅ | T422159#12276807 |
| 2 | ✅ | T422159#12276807 |
| 3 | ✅ | T422159#12276807 |
| 4 | ✅ | T422159#12304550 |



