omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Install > Web App displays Done after validation failure

Open scossar opened this issue 2 months ago • 2 comments

System details

MSI Stealth 15M A11UEK, Intel Core i7-11375H, Intel Iris Xe + NVIDIA RTX 3060 Laptop GPU, Omarchy 4.0.2-1, Hyprland 0.56.2

What's wrong?

Install > Web App displays the green Done! prompt after the installer rejects invalid input and exits with an error.

This was reproduced twice:

  1. Open the Omarchy menu.
  2. Select Install > Web App.
  3. At the Name> prompt, enter http://localhost:1234.

The terminal displays:

Let's create a new web app you can start with the app launcher.

App name cannot contain '/': http://localhost:1234

● Done! Press any key to close...

The validation error is correct: the URL was entered where an app name was requested. The subsequent success message is not.

Expected

When the invoked command exits unsuccessfully, the presentation terminal should preserve/display the failure without showing Done!. Ideally the terminal would remain available long enough to read the error or retry, but the essential issue is that failure must not be reported as success.

Actual

The installer exits with status 1, then the presentation wrapper displays the same Done! prompt used after successful completion.

Cause

omarchy-webapp-install calls require_plain_name, which prints the validation error and exits 1. omarchy-launch-floating-terminal-with-presentation then runs:

omarchy-show-logo; $cmd; if (( $? != 130 )); then omarchy-show-done; fi

This suppresses Done! only for status 130. Every other nonzero exit status is presented as successful completion. This likely affects other commands launched through the same presentation wrapper. Related issue #9526 observes the same wrapper behavior in a different failure path.

Optional UX follow-up

A URL entered as the first response could be recognized and handled more helpfully: either explain that an app name is required and reprompt, or support a URL-first flow that fetches the page title for the app name in the same general way the installer already attempts to fetch the site icon. This enhancement is not required to resolve the misleading-success bug.

scossar avatar Sep 04 '26 03:09 scossar

I checked the diff in #9528 and found that it also changes omarchy-launch-floating-terminal-with-presentation: it captures the command's exit status, shows Done only for status 0, and calls omarchy-show-done --failed for nonzero statuses other than 130. That shared-wrapper change addresses the misleading success prompt described here, although the PR was opened for the Tailscale removal report #9526.

Linking #9528 alongside the already-linked #10164 so the overlapping presentation-wrapper fixes can be coordinated. This is confirmation from the diff; I have not independently run the web-app UI reproduction or either PR's tests.

CompleteDotTech avatar Sep 05 '26 04:09 CompleteDotTech

This is fixed on quattro by bc0753dfcbf723a362060c32b3e36739798fee38 ("Show a failure state when a presented command exits non-zero"), which is not yet in a release: v4.0.4 does not contain it.

Your diagnosis is right. The menu's Web App entry runs omarchy-launch-floating-terminal-with-presentation omarchy-webapp-install, require_plain_name exits 1 on a name containing /, and up to v4.0.4 the wrapper called omarchy-show-done for every exit status but 130, which always printed the green Done prompt. On quattro the wrapper passes the exit status through, and omarchy-show-done prints a red Failed (exit code N)! for anything non-zero.

Checked on a clean Omarchy worker by running the wrapper's presentation script with omarchy-webapp-install 'http://localhost:1234' …: with v4.0.4's wrapper and omarchy-show-done it printed App name cannot contain '/' followed by ● Done! Press any key to close...; with quattro at 3609968a4 it printed the same error followed by ● Failed (exit code 1)! Press any key to close....

#9526 is related but not the same bug: there the Tailscale removal script itself carries on after the cancelled sudo and exits 0, which the wrapper change cannot fix. Open PR #11482 overlaps the wrapper change that landed; it is being reviewed separately.

Reviewed by Claude Opus 5.5, with a second opinion from Codex Medium, which agreed on the mechanism and the fixing commit (its independence is not guaranteed). Your URL-first suggestion is a separate feature and is not covered here. This now waits on the maintainer, to close it as fixed on quattro or once the fix ships in a release.

omarchybot avatar Oct 11 '26 04:10 omarchybot