bug(proxy): proxy.noProxy is ignored on cold start and UI runtime env
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4k
- Forks
- 453
- Avg merge
- 12h 30m
- Merged PRs (30d)
- 46
Description
Summary
proxy.noProxy is supported by the proxy helper and hot-reload path, but it is not passed during CLI cold start or into the UI runtime environment.
Why it matters
A user can configure proxy.noProxy to bypass a proxy for localhost, internal services, or specific domains. After hot reload, that value can be respected, but on cold start and in the UI runtime env the same config is ignored. This makes proxy behavior depend on how PilotDeck was started or reloaded.
Evidence
ui/src/components/settings/view/tabs/PilotDeckConfigTab.tsx:690exposes and writesproxy.noProxy.src/cli/proxy.ts:46definesinstallGlobalProxy(explicitUrl?: string, extraNoProxy?: string), so the helper accepts a no-proxy value.src/cli/proxy.ts:150tosrc/cli/proxy.ts:154builds the effective no-proxy list from process env,extraNoProxy,127.0.0.1, andlocalhost.src/cli/pilotdeck.ts:37callsinstallGlobalProxy(snapshot.config.proxy.url)during initial startup and does not passsnapshot.config.proxy.noProxy.src/cli/pilotdeck.ts:151callsreinstallGlobalProxy(proxyConfig?.url, proxyConfig?.noProxy)on hot reload, so the reload path has the value that cold start omits.ui/server/services/pilotdeckConfig.js:306definesbuildRuntimeEnv(config).ui/server/services/pilotdeckConfig.js:321toui/server/services/pilotdeckConfig.js:327sets onlyHTTPS_PROXYandhttps_proxy; it does not setNO_PROXYorno_proxy.
Validation
Validation level: dynamic plus source control-flow confirmation.
Reproduction called buildRuntimeEnv({ proxy: { url, noProxy } }).
Key output: the returned env included HTTPS_PROXY, but NO_PROXY was absent/null. Source control flow confirms the CLI startup path also drops noProxy, while the hot-reload path passes it.
Boundary: this did not perform a live network request through a real proxy. The failure is at config propagation: the configured field is present, the helper supports it, but two runtime entry points do not pass it.
Expected behavior
proxy.noProxy should be applied consistently across cold start, hot reload, and the UI runtime environment.
Existing coverage checked
Partially covered by adjacent work only. PR #239 improved proxy/no-proxy support in the helper and dispatcher layer, and PR #158 brought top-level proxy/noProxy config into the Settings area. However, current main still omits proxy.noProxy at src/cli/pilotdeck.ts:37 and does not export it from buildRuntimeEnv(...).
Coverage checked by searching for proxy.noProxy, installGlobalProxy, reinstallGlobalProxy, NO_PROXY, and buildRuntimeEnv proxy.
Suggested fix
Pass snapshot.config.proxy.noProxy into the initial startup call:
installGlobalProxy(snapshot.config.proxy.url, snapshot.config.proxy.noProxy)
Also update buildRuntimeEnv(...) to set both NO_PROXY and no_proxy when normalized.proxy?.noProxy is configured.
Suggested tests
- Cold start passes configured
proxy.noProxytoinstallGlobalProxy(...). - Hot reload continues to pass updated
proxy.noProxy. buildRuntimeEnv(...)returnsHTTPS_PROXY,https_proxy,NO_PROXY, andno_proxywhen both proxy URL and no-proxy list are configured.- Existing behavior remains unchanged when only proxy URL is configured.
- Existing behavior remains unchanged when proxy config is absent.
Submitted with Codex.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at src/cli/pilotdeck.ts:37 and compare its cold-start call with the hot-reload call at lines 151-154, then inspect buildRuntimeEnv(config) in ui/server/services/pilotdeckConfig.js:306. Trace the existing proxy helper in src/cli/proxy.ts and add or update focused tests for cold start and runtime environment propagation. Done means configured noProxy is applied consistently while behavior without proxy settings remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100