Pull the four session-scoped UI resets (toolCallState / getPromptState /
readResourceState panels + optimistic currentLogLevel) out of the
disconnect listener into a colocated `resetSessionScopedUiState`
useCallback, so there's a single named place to extend as App.tsx accrues
more per-session state. The disconnect listener keeps its activeServerId +
modal-flag bookkeeping inline and calls the helper. Pure refactor — no
behavior change; the existing App.test.tsx disconnect test (asserts all
four pieces reset) is unchanged and still passes.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>