bud page sea-btn cascade: live-invite window + accept-on-GET + glow handoff; my-buds tooltip clamp + row hover/lock — TDD

Fixes the Bill Bud invite cascade so the sea sub-btn actually lights + leads
to the bud's my_sea, and gives the My Buds row tooltip viewport clamping +
hover/lock styling.

SeaInvite.invitee_access_open (gameboard/models.py): new invitee-facing
access window — a non-terminal invite (PENDING/ACCEPTED) within 24h of being
proffered OR within 24h of the invitee's last gate token deposit. Re-arms on
each deposit; DECLINED/LEFT/EXPIRED stay shut. Distinct from is_expired
(which only models the PENDING lapse). 8 UTs.

bud_page (billboard/views.py): sea_btn_active / sea_first_draw_pending now key
on invitee_access_open across PENDING + ACCEPTED, not PENDING-only. Old design
darkened the btn the instant the user accepted, so they could never reach the
bud's sea from here post-accept — that was the red .fa-ban the user saw. ITs
updated: accepted-within-window now lights; added stale-accepted-dark +
recent-deposit-relights cases.

my_sea_visit (gameboard/views.py): accept-on-GET — a still-pending, non-expired
invite from the owner to the visitor is accepted implicitly on arrival (the
sea-btn cascade + @mailman post-attribution anchor both land here, so the click
IS the acceptance). Previously PENDING → 403, so the cascade dead-ended. ITs:
pending-invitee now auto-accepts (200); expired-pending still 403s; stranger
still 403s.

bud.html: burger → sea_btn glow-handoff machine (the my_sea.html cascade minus
the spread-modal stage) so the glow rides the affordance chain to the click
target; active sea click clears glow, preserves .active, navigates.

my-buds-tooltip.js: clamp the position:fixed #id_tooltip_portal to the viewport
on row-lock — same 1rem-inset shape as game-kit.js / sky-wheel.js / wallet.js
(measure after .active, clamp left, prefer above / flip below). Reset on clear.

_billboard.scss: .bud-entry hover + .row-locked highlight (rows aren't
.row-3col so the existing rule missed them) — fill --secUser, flip the
--terUser handle to --quiUser, trailing title to readable --priUser.

520 billboard+gameboard ITs/UTs green; affected sea-btn-cascade FT green.

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-05-29 11:36:25 -04:00
parent d87f26003b
commit f5ee83be0a
9 changed files with 268 additions and 25 deletions

View File

@@ -69,14 +69,26 @@
{% if pending_invite %}
<script>
(function () {
var burger = document.getElementById('id_burger_btn');
var sea = document.getElementById('id_sea_btn');
if (!sea) return;
// Active sub-btn navigation handler — fires BEFORE burger-btn.js's
// delegated fan handler (target-phase before bubble-up) so the click
// routes to the bud's spectator my-sea page. Burger then closes the
// fan as usual.
if (!burger || !sea) return;
// Glow-handoff machine — the bud-page counterpart of my_sea.html's
// burger → sea_btn cascade, minus the spread-modal stage (the active
// sea sub-btn navigates away instead of opening a modal). The burger
// carries .glow-handoff server-side (sea_first_draw_pending); opening
// it hands the glow off to the sea sub-btn so the nudge rides the
// affordance chain to the click target.
burger.addEventListener('click', function () {
if (!burger.classList.contains('glow-handoff')) return;
burger.classList.remove('glow-handoff');
sea.classList.add('glow-handoff');
});
// Active sea sub-btn click → the bud's spectator my-sea (which accepts
// the invite on GET). Clears the glow but PRESERVES .active. Fires in
// the target phase, BEFORE burger-btn.js's delegated fan-close.
sea.addEventListener('click', function () {
if (!sea.classList.contains('active')) return;
sea.classList.remove('glow-handoff');
window.location.href = '/gameboard/my-sea/visit/{{ bud.id }}/';
});
}());