Skip to content

Support local favicon discovery for webapp install#6017

Open
shbernal wants to merge 1 commit into
basecamp:devfrom
shbernal:fix-webapp-local-favicon
Open

Support local favicon discovery for webapp install#6017
shbernal wants to merge 1 commit into
basecamp:devfrom
shbernal:fix-webapp-local-favicon

Conversation

@shbernal
Copy link
Copy Markdown

@shbernal shbernal commented Jun 1, 2026

Summary

  • Allow omarchy webapp install <name> <url> to run non-interactively without an icon argument.
  • Try the web app's advertised favicon first, including relative icon paths, before falling back to Google's favicon service.
  • Keep explicit icon URLs and saved local icon names working as before.

Tests

  • bash test/omarchy-webapp-install-test.sh
  • bash test/omarchy-cli-test.sh
  • git diff --check upstream/dev...HEAD

Copilot AI review requested due to automatic review settings June 1, 2026 18:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR refactors omarchy-webapp-install to discover a web app's declared favicon (via <link rel="icon">) before falling back to Google's favicon service, makes the icon argument optional in the non-interactive form, and adds a shell-based test that exercises the new behavior with a stubbed curl.

Changes:

  • Adds helpers (normalize_url, url_origin, url_directory, absolute_icon_url, discover_icon_url, download_icon, use_default_icon) and makes icon optional in the CLI form.
  • Fails with a clear error if no icon can be discovered/downloaded when none is provided.
  • Adds a new test script covering local favicon discovery, Google fallback, saved local icon names, and missing-URL failure.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
bin/omarchy-webapp-install Extracts URL/icon helpers, auto-discovers site favicon, falls back to Google, and updates arg parsing/usage doc.
test/omarchy-webapp-install-test.sh New shell tests that stub curl and validate desktop/icon outputs across scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +155 to +158
if "$SCRIPT" OnlyName >"$TMPDIR/invalid.out" 2>"$TMPDIR/invalid.err"; then
fail "single-argument install fails"
fi
assert_file_contains "single-argument install explains missing URL" "$TMPDIR/invalid.out" "You must set app name and app URL!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants