Skip to content

Python Processes empty state: pointless Refresh button, non-reactive list, and a false "No Python processes running" #147

Description

@MelbourneDeveloper

Summary

The Python Processes panel's empty state has three coupled defects:

  1. It shows a Refresh button in the empty welcome view, where it makes no
    sense.
  2. The list should be reactive (Signals-driven, centralised state) so a manual
    Refresh button is unnecessary at all; while it isn't, the refresh affordance
    should sit next to the process list, not float in the empty state.
  3. The message "No Python processes running" is a lie — the list is empty
    because processes are being hidden / the fetch didn't populate, not because
    zero Python processes exist. (Note the status bar in the repro: TMC:
    Disconnected
    .)
Image

1 — Hide the Refresh button in the empty state (do this now)

The welcome view renders a [Refresh] action
(package.json:84-87,
basilisk.refreshProcesses registered at
process-explorer.ts:406). But the
panel already auto-refreshes on a timer and the welcome copy itself says "The
list refreshes automatically"
— so a manual Refresh in the empty state is
redundant and self-contradictory. Hide it here for now; it only makes sense
once there are processes to refresh.

2 — The list isn't reactive; it's timer-polled

The panel is refreshed by a 2-second setInterval, not by the centralised store
signals:

  • process-explorer.ts:442-468
    wireVisibilityRefresh() runs setInterval(() => provider.refresh(), 2000)
    while visible (DEFAULT_REFRESH_MS = 2000).

This is the opposite of the Modules panel, which refreshes off the store's
analysisRevision signal via an effect ([EXTACT-REACTIVE-STATE], #58). Per the
project principle (panels must be reactive via Signals; all state centralised),
the process list should update without a manual button. Until it is genuinely
reactive, the refresh control belongs inline next to the process list (a
view-title or item action on the populated state), never as a lone button in the
empty view.

3 — "No Python processes running" is misleading

fetchProcesses() swallows any LSP error into an empty list and marks the fetch
done, so an errored or not-yet-loaded state renders identically to a genuinely
empty one:

So when the LSP is disconnected / still starting / the feature is gated, the panel
claims there are no processes rather than admitting it couldn't load them.
This is the same trust-breaking false-negative as #144 ("No Python files found"
during startup): the empty message must distinguish loading / couldn't load /
unavailable
from genuinely zero processes, and only assert the latter once a
fetch has actually succeeded.

A static viewsWelcome can't express those states — drive the empty/loading/error
copy from centralised store state (a basilisk.processesState context key gating
multiple viewsWelcome entries, or a Signals-driven treeView.message / leading
tree item), so it's never stale and never lies.

Notes

Spec / cross-references

Acceptance criteria

  • No standalone Refresh button in the empty/welcome state; refresh (if kept at
    all) lives next to the populated process list.
  • The process list updates without manual refresh, driven by centralised store
    state rather than an ad-hoc panel-local timer.
  • "No Python processes running" appears only after a fetch has actually
    succeeded and the count is truly zero; loading / disconnected / unavailable
    states say so honestly.
  • The committed viewsWelcome matches the running entry point; an e2e test
    cross-references the spec ID.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcriticalCritical severity — fix immediately

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions