• docs/superpowers/specs/2026-07-21-door-idle-detection-design.md

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Tue Jul 21 21:53:26 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/15780517d5df4349c3e29f17
    Added Files:
    docs/superpowers/specs/2026-07-21-door-idle-detection-design.md
    Log Message:
    doors: design spec for graphical-door idle-user detection

    Synchronet's per-program "Maximum Inactivity" cannot detect an idle user in
    any of the termgfx graphical doors. xtrn_sec.cpp does apply the setting for
    the door's duration, but enforcement in input_thread() tests a counter that
    is reset on any successful socket read -- and every termgfx door paces its frame loop with DSR acks, so the terminal answers ~10x/sec with no human involved. The counter never approaches the threshold. The failure is silent
    and points the safe-looking way: the setting reads as configured, and does nothing.

    Observed on node 11 this afternoon: a SyncRetro NES session 236 minutes in,
    TCP healthy and the door rendering at ~10fps, where every inbound segment
    was exactly 6 bytes (ESC[1;1R, the pace-ack) across 1,759 consecutive
    segments -- not one keystroke. The user had walked away and nothing at any layer was positioned to notice.

    The design puts the clock in the door, where real key events can be told
    apart from terminal auto-replies: a shared termgfx/idle.{h,c} state machine
    fed from the door's key dispatch, a sysop-configurable [idle] section with
    an exempt ARS defaulting to EXEMPT H, and warn-then-exit-to-lobby so a silent-but-engaged user watching a cutscene gets a chance to stay. The door exits rather than hanging up, which lets the BBS's own session inactivity timeout take over once pacing stops.

    Also records a parsing hazard the implementation has to close: the JS parse_duration() in game_lobby.js treats a bare number as days while
    xpdev's C parse_duration() treats it as seconds, and both will read the
    same ini key.

    SyncRetro adopts it first; the other five doors are tracked as follow-on
    work so the divergence stays visible.
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)