Process render overflow fix#1220
Conversation
Distinguish a disconnected server from an empty result so the snackbar reflects the actual state, and log refresh failures with their stack trace for easier debugging.
Implement operator==/hashCode so ListView can skip rebuilding rows whose process data is unchanged between refreshes, reducing unnecessary widget rebuilds for idle processes.
Proc.toJson/toString and the Miscs import were never referenced by the GUI app, so drop them to keep the model lean.
Implement WidgetsBindingObserver so the periodic process refresh timer is cancelled when the app is paused and resumed (with an immediate refresh) when it returns to the foreground, avoiding wasted battery and traffic on background SSH commands. Also align InkWell borderRadius with CardX for consistent ripple clipping.
The previous index-based comparison treated loading (status parsing in progress) as eligible for running process commands, which could contend with the in-flight status request on the same SSH connection. Use explicit equality with connected/inished instead.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Unix ps script generation drops the Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lib/view/page/process.dart (1)
349-358: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winSerialize stop commands with process refreshes.
A periodic
_refresh()can already be awaitingclient.run(ps)while Line 354 startsclient.run(kill)on the same client; then Line 358 may immediately return because_isRefreshingis still true, leaving stale data. Reuse a shared process-command guard/mutex for kill and refresh, or block the stop action while refresh is active.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/view/page/process.dart` around lines 349 - 358, The stop action in the onTap handler is racing with the periodic refresh because it calls client.run(_killProcessCmd(...)) and then _refresh() without sharing the existing refresh guard. Update the process control flow in page/process.dart so the kill command and _refresh() use the same mutex/serialization mechanism as _refresh and any client.run(ps) path, or make the stop action wait until refresh completes before issuing the kill. Use the onTap callback, _refresh(), _isRefreshing, and the client.run(...) call sites as the key places to wire in the shared guard.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/data/model/server/proc.dart`:
- Line 56: The command parsing in Proc needs to handle quoted executable paths
before splitting binary and args. Update the binary/args derivation logic in
_parseArgs so it respects a quoted Windows path like "C:\Program
Files\App\app.exe" and does not split on the first literal space inside quotes.
Make sure the resulting binary is the full executable path, args contains only
the remaining switches, and any name/sort/display logic that depends on binary
is based on the parsed executable rather than the raw split tokens.
In `@lib/view/page/process.dart`:
- Around line 94-106: The _refresh flow is still showing the disconnected
snackbar every time the timer-driven refresh is skipped, which causes repeated
spam during filtered states. Update _refresh in Process page to silently return
when _canRunProcessCmd(serverState) is false, or gate the snackbar so it only
appears for explicit user-triggered refreshes, using the existing _refresh and
_canRunProcessCmd symbols to keep the periodic path quiet.
- Around line 415-418: The Windows branch in _killProcessCmd currently returns a
PowerShell-only command, which can fail when client.run() executes under a
cmd.exe SSH shell instead of PowerShell. Update the SystemType.windows case in
_killProcessCmd to use a cmd-compatible process termination command so it works
through the client.run() path. Keep the Linux/BSD branch unchanged and ensure
the new Windows command remains forceful and targets the given pid.
---
Outside diff comments:
In `@lib/view/page/process.dart`:
- Around line 349-358: The stop action in the onTap handler is racing with the
periodic refresh because it calls client.run(_killProcessCmd(...)) and then
_refresh() without sharing the existing refresh guard. Update the process
control flow in page/process.dart so the kill command and _refresh() use the
same mutex/serialization mechanism as _refresh and any client.run(ps) path, or
make the stop action wait until refresh completes before issuing the kill. Use
the onTap callback, _refresh(), _isRefreshing, and the client.run(...) call
sites as the key places to wire in the shared guard.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 4e7e3ede-0db8-437c-819c-53333f7f6b61
⛔ Files ignored due to path filters (1)
pubspec.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
lib/data/model/app/scripts/script_builders.dartlib/data/model/server/proc.dartlib/data/res/github_id.dartlib/view/page/process.darttest/proc_test.dart
Gate the disconnected snackbar so only user-triggered refreshes show it, preventing spam from periodic timer ticks. Use askkill /F /PID for Windows kills since client.run() targets cmd.exe, not PowerShell. Serialize the stop action through the existing _isRefreshing guard via _killAndRefresh so the kill command never races with an in-flight ps fetch and the post-kill refresh is not skipped.
Resolve #1218
Also add issuers of #1218 to participants list
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Bug Fixes
psoutput when theSTARTcolumn is absent.Tests