“Works on my machine” — why remote devices couldn't reach my tools
Test from the user's environment, not the build environment.
The problem
My dashboard worked perfectly on the server. From my phone or another computer, parts of it failed: “isn't reachable,” “failed to fetch,” frozen panels.
What I found
The page built links to its sister tools as “this host + a port number.” On the server, “this host” is the server itself, so it worked. From anywhere else, those ports weren't reachable. That's why the bug was invisible where it was built.
The fix
- The dashboard now serves its sister tools from the same address under fixed paths, using a short, fixed list of allowed services — a path can never point it at another host or port.
- Added a regression test that fails if the old pattern ever comes back.
- Verified live: both sister tools returned healthy through the new paths.
Takeaway
Test from the user's environment, not the build environment.