Skip to content

os: the console shows the web app URL first, and says whether it is up - #595

Merged
bong-water-water-bong merged 1 commit into
mainfrom
1bit/os-console-urls
Oct 26, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
1bit/os-console-urls

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Owner, 26 Oct: "you need to also display the url if you have your front end ... so they interact with right away."

Lemonade serves its own web app at the root of the API port (checked on the dev box: GET / → 200 text/html, title "Lemonade App"), so the front end is already in every image. The menu header (os/mini/1bit-menu) now prints, first:

  Web app      http://192.168.50.110:13305/   open it in a browser and chat (up)
  API          http://192.168.50.110:13305/api/v1   OpenAI-compatible; key: grep LEMONADE_API_KEY /data/lemonade/lemond.conf

with up/starting from a local probe of /. The boot log's address line (init.sh, what the serial console and ssh see) says the same.

OpenWebUI as a second front end is a separate decision (issue to follow): it is a Python application of several hundred MB, which does not belong in the RAM live image, but can be an optional service on the installed system.

🤖 Generated with Claude Code

Owner, 26 Oct: display the URL of the front end on the console so people interact right away. Lemonade
serves its own web app at the root of the API port (http://<ip>:13305/, title "Lemonade App"), so the
menu header now prints that URL first, marked up/starting from a local probe, and the OpenAI-compatible
API URL under it with where the key lives; the boot log's address line says the same for the serial and
ssh paths.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Potential Incorrect URL in Menu

The menu header now prints the web app URL with a health check using wget to http://127.0.0.1:$PORT/. However, this assumes that the web server is listening on 127.0.0.1 and the port $PORT is correctly set. If the web server is not running or not accessible on 127.0.0.1, the check will fail and the status will be reported as 'starting', even if the service is actually up and accessible via the external IP address.

if wget -q -O /dev/null -T 2 "http://127.0.0.1:$PORT/" 2>/dev/null; then web=up; else web=starting; fi
Inconsistent IP Address Handling

The script extracts the IP address using awk '{print $4}' and cut -d/ -f1, which may not be robust in all network configurations. If the network interface has multiple IP addresses or if the output format of ip command changes, this could lead to incorrect IP address being used in the printed URLs.

ipaddr=$(ip -4 -o addr show scope global 2>/dev/null | awk '{print $4}' | cut -d/ -f1 | head -1)
echo; echo "Web app (chat in a browser): http://${ipaddr:-<this address>}:$lport/     API (OpenAI-compatible): http://${ipaddr:-<this address>}:$lport/api/v1"

@bong-water-water-bong
bong-water-water-bong merged commit 7127ae6 into main Oct 26, 2026
8 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the 1bit/os-console-urls branch October 26, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant