Repository navigation
feat: show pending idle stops in LSP consoles - #2359
sohamsakhare76-ai wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #2359 +/- ##
==========================================
+ Coverage 58.86% 58.95% +0.08%
==========================================
Files 849 849
Lines 36719 36899 +180
Branches 5767 5811 +44
==========================================
+ Hits 21614 21752 +138
- Misses 12102 12128 +26
- Partials 3003 3019 +16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lagergren
left a comment
There was a problem hiding this comment.
Thank you for picking up #2025, @sohamsakhare76-ai, and for Option E, as the issue suggested: no repaint timer, and the text answers "will it stop, when, and why that late". The generation counter against stale alarm callbacks, the injectable clock in the tests instead of sleeps, and the chunks for timeouts that don't fit in an int of milliseconds are all nice touches.
I ran the four changed test classes five times each with --rerun, on IC 2024.2 and on IC 2025.3, where testAScheduledStopThatFiresWhileReconnectingClearsPendingStopAndDefersIdleStop failed in the first CI run: 83 tests each time, 0 failures. So f7a4006 looks like it fixed that race.
A few things:
-
The time of the stop has no day, and ignores the IDE's time format.
HH:mmis always 24-hour, whatever Settings | Appearance & Behavior | System Settings | Date Formats says. It also shows no date: Liberty's 10 hours from 20:15 showat 06:15, which is tomorrow, and a timeout of more than a day shows a time on the wrong day. Your test with two stops a day apart and the same20:15shows that the day matters.DateFormatUtil.formatTime(long)for a stop today, andDateFormatUtil.formatDateTime(long)otherwise, would follow the IDE's format and show the date when it's another day. Both are in 2024.2. -
The fix for long timeouts deserves a commit of its own. Before this PR,
(int) TimeUnit.SECONDS.toMillis(...)overflowed for alastDocumentDisconnectedTimeoutabove 2,147,483 seconds (about 24.8 days), and such a server stopped at once. Your chunks fix that, which is a behaviour change of its own. Could it go into afix:commit, before thefeat:one, so that the release notes name it? The PR would then be rebase-merged. -
A server that something keeps alive (
LSPClientFeatures#keepServerAlive(), or a lease): the tree shows a stop time, and at that time nothing stops, the text just goes away. #2025 left this case open, and it's fine with me for now. The tooltip could say that the stop doesn't happen if something keeps the server running. What do you think? -
(optional) When a server node is expanded, its process node shows the same text right below it. #2025 suggested that the server node shows it while collapsed;
customizeCellRenderergetsexpanded.
The PR is on the 0.30.3 milestone, which opens once 0.30.2 is released this week.
Closes #2025
Summary
Implements Option E for pending idle stops in the LSP Consoles tree.
When the last document closes and a stop is scheduled, the tree displays information such as:
idle, stops after 10 h at 20:15The server remains in
ServerStatus.startedwhile the pending stop is active.Implementation
LanguageServerWrapper.lastDocumentDisconnectedTimeout.Tests
compileTestJava— successful.KeepAliveDuringPendingStopTest— 25 passed.git diff --check— passed.The read-only information-panel redesign from #1953 is intentionally outside this PR's scope.