Repository navigation
Ask AI: say when the browser blocks the docs site from reaching localhost - #16
Merged
Merged
Conversation
…host On GitHub Pages, Chrome asks before a public site may reach this machine (Local Network Access). Once denied, every probe fails exactly as if `codewiki serve` were not running, and the chat said "Chat needs CodeWiki running" while it was. When no server is found and navigator.permissions reports local-network-access as denied, the panel now says the browser is blocking it and how to allow it, keeping the serve command below. Browsers without the permission are unaffected. Browser test with Chromium's --ip-address-space-overrides making the test site a public origin: denied → the blocking message; allowed with no server → the usual one. The old template shows the misleading message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXRqeijND7XPq2srGHndRd
dandydarshan
force-pushed
the
fix/chat-local-network-permission
branch
from
November 7, 2026 01:53
4b09125 to
f1e6d68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On a GitHub Pages site, Chrome asks the user before the page may reach
127.0.0.1(Local Network Access). If that's denied, every probe fails exactly as ifcodewiki serveweren't running, so the chat said "Chat needs CodeWiki running on your machine" even when it was running.Browsers without this permission (Firefox, Safari) make the query throw, so they keep the old message. Safari keeps its existing hint about opening the docs from the local server.
Evidence
loopbackaddress space", and the permission state isdenied;granted.--ip-address-space-overrides=<site>=public: same states, same block.test_chat_says_when_the_browser_blocks_localhost:Merge Danger
Door: two-way
Blast Radius: chat offline message
It only adds a message when no server answered and Chrome reports the permission as denied. The wording names Chrome's Local network access setting; other Chromium browsers may label it differently.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CXRqeijND7XPq2srGHndRd