Skip to content

feat: fall back to extension storage for proxy log directory#827

Open
EhabY wants to merge 3 commits intomainfrom
feat/proxy-log-fallback-storage
Open

feat: fall back to extension storage for proxy log directory#827
EhabY wants to merge 3 commits intomainfrom
feat/proxy-log-fallback-storage

Conversation

@EhabY
Copy link
Collaborator

@EhabY EhabY commented Mar 5, 2026

  • Fall back to extension global storage for the proxy log directory (getProxyLogPath) so logs are always written even when coder.proxyLogDirectory is not explicitly configured, removing the "No logs available" dead-end in the UI
  • Add CODER_SSH_LOG_DIR environment variable support as an intermediate fallback (setting > env var > extension storage)
  • Extract a shared resolveOverride helper in PathResolver that both getBinaryCachePath and getProxyLogPath use, ensuring consistent trim, tilde/${userHome} expansion, and normalization for all path overrides
  • Simplify commands.ts log viewer to always use the resolved log directory instead of branching on whether the setting is configured

Closes #824

@EhabY EhabY self-assigned this Mar 5, 2026
EhabY added 3 commits March 9, 2026 12:52
When coder.proxyLogDirectory is not configured, use the extension's
global storage log path instead of discarding logs. This makes
troubleshooting easier without requiring manual configuration.
Covers configured path, empty/whitespace/unset fallback to default,
and tilde expansion.
…olution

Add CODER_SSH_LOG_DIR env var fallback for proxy log directory, apply
expandPath consistently to both settings and env vars in getBinaryCachePath
and getProxyLogPath, and inline the removed getLogPath method.
@EhabY EhabY force-pushed the feat/proxy-log-fallback-storage branch from e839d13 to c6b015e Compare March 9, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use the VS Code extension storage as a fallback when the proxyLogDirectory is not set

1 participant