Repository navigation
Apps open when they should: one definition of ready, no waiting on dead ports - #11
Merged
Merged
Conversation
…tps is needed appUrl built https://host:<app port> whenever the web app was on https or the app needs a secure page. For an app on the host network that holds its own port (Home Assistant on 8123), that port speaks only the app's plain http, so the address could never load (reproduced: EPROTO). Such apps now open at their view gateway port, which answers https behind the sign-in. Apps behind a gateway are unchanged. appUrl moves to web/src/appUrl.ts (no imports) so it can be tested. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_011b9fuB8ePE7DYtvvqNj1s2
…b ports An app could show Running while Open said "still starting" for three minutes and then landed on a dead page. Running only meant its containers run; the launcher treated every non-answer as "still starting". - omarchyd: readinessOf() gives one answer every screen follows: ready, starting, unreachable, stopped, gateway-down, no-web. "starting" only lasts for a grace period after the app was last started (120 s); after that a running app that doesn't answer is "unreachable", with the reason. - apps.probe asks the app the way its gateway does: over https when the listing says the app speaks https itself (it used to look dead), and reopens a missing gateway. - Web app: Open waits only while "starting". Otherwise it says what is wrong and offers Try again / Open anyway. The app sheet shows the web page's state next to Running. The desktop's slow-load message uses the same wording. Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_011b9fuB8ePE7DYtvvqNj1s2
Co-Authored-By: Claude Fable 5.2 <[email protected]> Claude-Session: https://claude.ai/code/session_011b9fuB8ePE7DYtvvqNj1s2
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.
What this changes
Pressing Open on an installed app now either opens it or says why it can't, instead of waiting three minutes on "Starting…". No features added, no redesign. Not merged: waiting for approval.
Confirmed bugs and root causes
apps.probewas treated as "still starting" for up to 180 s.apps.probereports an app that speaks https itself as unreachableweb.https)web.httpstoday, so this was latentappUrlbuilthttps://host:<that port>when https was neededEPROTO), fixed here. Apps behind a gateway were already correct and are unchangedWhat changed
omarchyd/apps.mjsreadinessOf()is the single definition every screen follows:ready,starting,unreachable,stopped,gateway-down,no-web.unreachable, with the reason.apps.probeasks over https when the app speaks https, reports the container state, and reopens a missing gateway.web/src/openApp.ts,AppSheet.tsx,Store.tsx,Desktop.tsxstarting. Otherwise it explains and offers Try again / Open anyway.web/src/appUrl.ts(moved out ofdata.tsso it can be tested): apps holding their own port open through their view gateway when https is needed.Tests
test/app-launch.test.mjs(12 tests): the readiness table, plusapps.probeagainst a running omarchyd. Covers the AdGuard first-run redirect, a dead port going from starting to unreachable, restart resetting the wait, 401/404/503, stopped, an https upstream, and the page through the gateway over http and https with sign-in.test/app-url.test.mjs(4 tests): the address for each kind of app, on http and https.Results
npm run typecheck: clean.npm run build: builds.npm test: 166 pass, 0 fail, run three times (150 before this branch).Not verified (needs a real server)
Security
127.0.0.1, as the gateway already does for the same apps.Generated by Claude Code