agent page: link to the agent's forge profile

Add a '⬡ forge ↗' link to the per-agent page's meta row, next to
the stats + screen links. It opens the agent's Forgejo profile
(http://<host>:3000/<label> — the per-agent forge user is named
after the agent) in a new tab.

- web_ui.rs: StateSnapshot gains forge_present, true when the
  agent's forge-token file exists in the state dir (same signal
  that tells the agent it has a forge account).
- index.html / app.js: hidden link, shown + href-filled when
  forge_present, mirroring the existing gui_enabled/screen-link
  pattern. Host comes from window.location so it works off
  whatever host the page is served from.

closes #185
This commit is contained in:
iris 2026-05-21 20:13:30 +02:00 committed by Mara
parent 310fd0b481
commit 6ab667901d
4 changed files with 24 additions and 0 deletions

View file

@ -16,6 +16,9 @@
<a href="/stats" style="color: var(--cyan); text-decoration: none;">📊 stats →</a>
<a id="screen-link" href="/screen" target="_blank" rel="noopener"
style="display:none; color: var(--cyan); text-decoration: none; margin-left: 1em;">🖥 screen →</a>
<a id="forge-link" href="#" target="_blank" rel="noopener"
title="this agent's profile on the hive forge"
style="display:none; color: var(--cyan); text-decoration: none; margin-left: 1em;">⬡ forge ↗</a>
</p>
<div id="status">