• src/syncterm/Wren.adoc src/syncterm/scripts/auto/connected/keys_defaul

    From Deuc¿@VERT to Git commit to main/sbbs/master on Sun May 3 21:44:11 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/76a3f347979081df508310b6
    Modified Files:
    src/syncterm/Wren.adoc src/syncterm/scripts/auto/connected/keys_default.wren src/syncterm/scripts/syncterm.wren ui_list.wren ui_list_test.wren ui_pane.wren ui_widget.wren src/syncterm/term.c wren_bind.c wren_bind_conn.c wren_bind_conn.h
    Log Message:
    SyncTERM: move Alt-M to Wren; add ListView padding + Pane auto-sizing

    The Alt-M music-mode picker is now a Wren Hook.onKey handler in keys_default.wren that opens a Pane + ListView modal. The C
    case-block in term.c is gone; music_control() itself stays for
    the Alt-Z popup-menu's SM_MUSIC entry.

    C primitives added so the script can do its job:
    * CTerm.music = i (setter; clamps to legal range)
    * Host.musicNames (List<String> built from music_names[])
    * Host.musicHelp (returns music_helpbuf)

    UI library changes the picker exposed:
    * ListView always reserves a 1-cell padding between the frame and
    the items on the side that doesn't have a scrollbar (both sides
    when no scrollbar is shown at all). The previous behaviour let
    long items butt against the frame.
    * Widget.preferredWidth / preferredHeight -- new base getters
    returning null ("no preference, fill what's given"). ListView
    overrides them with the smallest cell budget that displays every
    item without truncation.
    * Pane.fitContent() sizes the pane around its single child's
    preferred size, including the title bar's required width and
    the corner-button cluster. titleAsBar mode reserves a 1-cell
    padding around the title (`title + 4`); frameTitle mode uses
    the existing `title + 6` (corners + brackets + spaces).
    * Pane.centerOnScreen() repositions the pane after fitContent.

    The Alt-M handler is now ~15 lines: build the list, add to pane,
    fit + center, run. No hardcoded widths, no manual inner-bounds
    math.

    Wren.adoc updated with the new accessors, the Widget / Pane /
    ListView additions, the title-mode geometry rules, and a small
    auto-sized list-in-pane example mirroring the music picker.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Mon May 4 13:07:23 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/9480df8001d2548b3d9bbf0b
    Modified Files:
    src/syncterm/Wren.adoc src/syncterm/scripts/auto/connected/keys_default.wren src/syncterm/scripts/syncterm.wren ui_popup.wren src/syncterm/syncterm.c term.c wren_bind.c wren_bind_conn.c wren_bind_conn.h wren_host.c wren_host.h wren_host_internal.h
    Log Message:
    SyncTERM: move disconnect cluster (Alt-X / Alt-H / Ctrl-Q / [X]) to Wren

    The four hangup-and-quit keys are now driven from
    keys_default.wren via a new DisconnectFlow helper that raises a
    Confirm popup ("Disconnect... Are you sure?") and, on yes, calls Conn.endSession(exitApp). doterm() picks the request up at the
    top of its next iteration, runs the (UI-free) C cleanup, and
    either returns to the bbslist (Alt-H / Ctrl-Q) or exits
    syncterm (Alt-X / window-close).

    Ctrl-Q is gated to text-mode terminals (curses / ANSI) at module-
    load time via the new Host.textTerminal predicate; graphical
    backends keep Ctrl-Q as a normal control byte.

    C-side check_hangup is now pure cleanup Ä the confirm popup and
    screen save/restore moved to Wren, the only caller was doterm,
    and the syncmenu's SM_DISCONNECT / SM_EXIT cases are now
    deduped onto the same primitive. check_exit keeps its UIFC
    "Are you sure you want to exit?" popup because bbslist + menu.c
    ESC handlers reach it from outside the disconnect-cluster path
    where Wren has already asked.

    Wren bindings: Conn.endSession(exitApp), Host.textTerminal, Key.ctrlA..Key.ctrlZ (full set; not just the two I happened
    to need), Popup.onDismiss=(fn) so a fresh App can drive a
    standalone Confirm without an enclosing run loop.

    Pending-disconnect drain runs at the top of the doterm outer
    loop after wren_result_drain Ä the parked DisconnectFlow fiber
    resumes during the result drain and calls Conn.endSession from
    there, not from a wren_host_dispatch_key frame, so a single
    post-drain check is what makes the hangup land in the same
    iteration as the user's Yes click.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net