From e5162afa057861e7d6c059f50a5fb10456d4a299 Mon Sep 17 00:00:00 2001 From: Inferencebot Date: Sun, 8 Nov 2026 20:40:26 +0000 Subject: [PATCH] =?UTF-8?q?Gift=20trail:=20invited=20guest=20reads=20'Invi?= =?UTF-8?q?ted=20=E2=80=94=20awaiting=20setup',=20not=20active?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The portal's trail now carries a derived state per guest entry — 'invited' while the Cloudron invite is un-accepted (the guest cannot log in yet) — rendered as a pale-blue pill; the ledger status stays the fallback for older payloads. Display only. --- app/main.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index 40b5141..4320489 100644 --- a/app/main.py +++ b/app/main.py @@ -647,6 +647,7 @@ PAGE_HTML = """ .gpill.ok { background: #eaf3ea; color: #2f5c30; } .gpill.done { background: #f1e8da; color: #a97a4a; } .gpill.bad { background: #f6e9e5; color: var(--danger); } + .gpill.invited { background: #e7edf5; color: #4a6a8a; } footer { border-top: 1px solid var(--border); @@ -954,6 +955,7 @@ function renderGuestEnded(g) { const GUEST_STATUS_LABELS = { rejected: ['not approved', 'bad'], + invited: ['Invited — awaiting setup', 'invited'], active: ['active guest', 'ok'], converted: ['became a member', 'done'], expired: ['ended — time ran out', 'done'], @@ -1012,10 +1014,13 @@ function renderGuests(d) { $('guest-trail').innerHTML = trail.map(t => { const who = t.name ? escapeHtml(t.name) + ' · ' + escapeHtml(t.recipient) : escapeHtml(t.recipient); const when = t.decided_at ? 'Decided ' + fmtDay(t.decided_at) : 'Sent ' + fmtDay(t.created_at); + // `state` carries the portal's derived display state — 'invited' while the + // guest has not accepted their setup invite (never 'active' before that). + // Older payloads carry status only; fall back to it. return '
' + '
' + who + '
' + '
' + when + '
' + - guestStatusPill(t.status, t.kind) + + guestStatusPill(t.state || t.status, t.kind) + '
'; }).join(''); }