Skip to content

Plan: chat.justin launcher, reset coding options on launch + dev-slot Open link

URL: https://mkdocs.justinsforge.com/memory/plans/chat-launcher-resets-and-devslot-open-2026-07-06/

Date: 2026-07-06 Approved spec: Two small changes to the chat.justin launcher. (1) After a session launches, clear the Coding-session block (repo, repoOther, scenario, modifiers) and collapse the expanders so the next New Session opens blank. The More-Prompt-Options toggles already reset on the new handler; the Coding-session block was left sticky. (2) Give each CreatorTrack dev slot an "Open" link button next to Teardown that opens the slot's hosted URL (http://<console-tailscale-ip>:<port>) in a new tab. URL is built server-side in _dev_slots() where the tailscale IP is known. Out of scope: teardown logic unchanged; no dev server (deployed static site + running systemd API); no deploy this round.

Task list

Task 1: Add per-slot url to the dev-slots API

  • Files: /home/justinwieb/forge/scripts/forge_session_launcher_api.py
  • What: In _dev_slots(), resolve Console's tailscale IPv4 once (cached module-level, tailscale ip -4) and set s["url"] = f"http://{ts_ip}:{port}" when both ip and port are present, else "". Matches the preview URL the bootstrap advertises.
  • Verification: curl -fsS -H "Authorization: Bearer $(cat ~/.forge-secrets/session_launcher_token 2>/dev/null)" http://127.0.0.1:<api-port>/api/dev-slots | jq '.slots[] | {branch,port,url}' (or restart service and read a slot); confirm url is http://100.x.x.x:PORT.
  • Commit: feat(launcher): dev-slots API returns per-slot preview url
  • Files: /home/justinwieb/forge/sites/justinsforge.com/chat/launcher.js
  • What: In the dev-slots row render (~line 768), add an <a class="fl-btn open" href=... target="_blank" rel="noopener">Open</a> before the Teardown button, guarded on sl.url.
  • Verification: Load chat.justin, expand Dev slots; a running slot shows Open + Teardown; Open navigates to the slot port. (Static file, visual check.)
  • Commit: feat(launcher): add Open link next to dev-slot Teardown

Task 3: Reset Coding-session options after launch

  • Files: /home/justinwieb/forge/sites/justinsforge.com/chat/launcher.js
  • What: In launch(), after the payload is built from state, clear repo, repoOther, scenario, modifiers and collapse codingOpen/moreOpen so the next New Session opens blank.
  • Verification: Load chat.justin, set a repo/scenario/modifiers, launch; open New Session again, the Coding-session block is empty and collapsed.
  • Commit: feat(launcher): clear coding-session options after each launch