mirror of
https://github.com/NanmiCoder/claude-code-haha.git
synced 2026-10-10 20:03:13 +08:00
a4cd0306fa
PUBLIC_ACCESS_CONSENT_VERSION moved to 2 when remote provider management landed, but the Electron IPC validator still accepted only the literal 1. The renderer sends the constant, so publicAccessStart was rejected as an invalid payload in the preload guard and again in the main-process handler, before PublicAccessManager saw the request at all. That rejection bypasses the manager's error classification, so the settings page could only show the generic "operation failed" line while the state stayed disabled: public access could not be enabled, and autoStart could never become eligible because consent v2 was never persisted. Validate against the shared constant instead of a copy of its value, and stop pinning the stale literal in the tests that let this drift through: capabilities.test.ts and electronHost.test.ts now send the constant and reject the previous, next and non-numeric versions.