Apply "defer state reads to usage point" principle to fix real
anti-patterns where state properties were subscribed but only used
in callbacks, not in JSX render:
- env-panel/variable-modal.tsx: envList, envSecrets -> getState()
- chat-variable-panel/variable-modal.tsx: varList -> getState()
- publish-as-knowledge-pipeline-modal.tsx: knowledgeName, knowledgeIcon
-> lazy useState initialization with getState()
- rag-pipeline-header/index.tsx: remove unused showDebugAndPreviewPanel
subscription and dead code cleanup