• src/syncterm/scripts/console.wren

    From Deuc¨@VERT to Git commit to main/sbbs/master on Mon Apr 27 16:09:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/03b52204073d523cedd367c7
    Modified Files:
    src/syncterm/scripts/console.wren
    Log Message:
    SyncTERM: Wren console editing Ä cursor + scrollback + line edits

    Three layered REPL improvements that had stacked up uncommitted in console.wren:

    * Line editing. `cursor` byte-index now tracked alongside `input`.
    Left/Right move it (clamped), Home/End jump to ends, Delete
    removes the char at the cursor, Backspace removes the char before
    it, printable insert (and clipboard paste) splice at the cursor,
    Ctrl+W kills the word ending at the cursor (tail past it stays
    put), and history Up/Down snap the cursor to the end of the
    recalled line. drawPrompt_ re-positions the conio cursor to
    prefix.count + cursor + 1 after painting so Left/Right/Home/End
    are visible.

    * Scrollback. PgUp/PgDn move by a viewport, Up/Down by a single
    display row. scrollTop == -1 is "live tail"; any other value
    pins the row at the top of the viewport. renderAllRows_ flattens
    the log into a list of display rows using the same chain-on-same-
    row rule as emitEntry_; paintViewport_ does the full repaint and
    scrollViewportUp1_/Down1_ do incremental single-row scrolls via
    Screen.moveRect. Submitting or typing a printable rejoins live
    mode; Ctrl+L clears scroll state too.

    * Window bounds. Force Screen.window.bounds to the full screen
    for the console's lifetime Ä a BBS may have set a DEC scrolling
    region; the console expects the whole screen. Original bounds
    are restored on exit alongside the saved screen.

    Plus the /? help is regrouped into editing / history / scroll /
    exit so the new keys are discoverable, and the SPDX header was
    stripped (per the project's per-tree license policy).

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Mon Apr 27 16:09:28 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/cdd827cd89b6dc80ce9818cb
    Modified Files:
    src/syncterm/scripts/console.wren
    Log Message:
    SyncTERM: Wren console Ä Enter on blank line is a no-op

    handleLine_ now short-circuits when the input trims to empty: still
    echo the prompt+line for visual feedback (so Enter advances to a
    fresh prompt row, matching shell behavior) but skip the REPL.eval
    call. Without this, Wren's compiler errors on empty source with
    "Expected expression" and the message lands in the log every time
    the user presses Enter on a clean line.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Mon Apr 27 18:20:39 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/66f1da25930ac5eb943fabbd
    Modified Files:
    src/syncterm/scripts/console.wren
    Log Message:
    SyncTERM: wrap Wren console run-loop body in Fiber.try

    A runtime error inside the run loop would skip the screen-bounds
    and screen-contents restore, leaving the user staring at the
    console's painted state with no recovery short of disconnecting.
    Move the body into runBody_ called via Fiber.new {...}.try() so
    the restore path always runs. On error, log the abort + stack
    trace via REPL.printTrace_ and skip Console.markSeen() Ä the
    unread-log indicator surfaces it for the next console session.

    Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net