web: shared chat stars, pipeline mini graphs and agent questions

- Persist chat stars in the operator-session registry (chat_star) so every
  browser/device shows the same Starred group; migrate old local stars once.
- Add a compact pipeline graph shape to list responses and draw a lightweight
  list miniature; replace the cryptic id/version line with the stage count.
- Surface OpenCode form questions as a chat card (chat_answer), replay a
  pending form to late subscribers, and notify for background questions.
- Make the mobile dock's Search cell equal to every destination, keep the
  tab row visible with 100svh, and let Source use the full pane height.
- Let a fresh sign-in auto-connect to its own origin; use a Lax session cookie
  with Expires so Remember me survives app/link launches.
- Keep shipped starters and the skill agnostic: no repository paths, project
  areas or personal device commands; add Diagnose/Fix and Research starters.
- Refresh the installed skill and document the new browser conventions.
This commit is contained in:
2026-10-20 03:11:37 +01:00
parent caae8a8038
commit 526c19fc21
46 changed files with 1547 additions and 611 deletions
+9 -2
View File
@@ -114,10 +114,17 @@ function passwordOk(candidate) {
}
function sessionCookie(req, remember = false) {
const bits = [`${SESSION_COOKIE}=${sessionToken(remember)}`, "Path=/", "HttpOnly", "SameSite=Strict"];
// Lax, not Strict: launching the installed app or a link from another app is
// a top-level navigation, and a Strict cookie is withheld on that first
// request, which made a remembered session look forgotten. Lax still keeps
// the cookie off cross-site subresource and POST requests.
const bits = [`${SESSION_COOKIE}=${sessionToken(remember)}`, "Path=/", "HttpOnly", "SameSite=Lax"];
// Remember me persists the cookie; otherwise it is a browser-session cookie
// (and the signed token itself expires after 12 hours).
if (remember) bits.push(`Max-Age=${SESSION_LONG_SECONDS}`);
if (remember) {
const expires = new Date(Date.now() + SESSION_LONG_SECONDS * 1000).toUTCString();
bits.push(`Max-Age=${SESSION_LONG_SECONDS}`, `Expires=${expires}`);
}
// Tailscale terminates TLS and usually forwards the scheme; when it does, the
// cookie is Secure. A direct plain-http LAN visit still works without it.
const forwarded = String(req.headers["x-forwarded-proto"] ?? "").split(",")[0].trim();