Skip to content

Full-screen menu for ANSI callers, and modemmenu -setup for sysops - #17

Merged
Neo-Desktop merged 1 commit into
mainfrom
claude/project-thread-npt1td
Nov 9, 2026
Merged

Neo-Desktop merged 1 commit into
mainfrom
claude/project-thread-npt1td

Conversation

@Neo-Desktop

Copy link
Copy Markdown
Collaborator

Requested by Sydney · project thread

What

The caller's menu, full screen. A caller whose terminal can have it (ANSI, or a VT that said what it is, 40x14 at least) gets the menu in a window on a blue desk, in the look of the bbs's new setup screens (D-Modem/bbs#41): a bar moved with the cursor keys or an item's first letter, an item's [key] starting it at once, the welcome at the top of the window, the motd in a box, the user, rate and clock on the top bar and the minutes left on the key bar. Esc asks before hanging up, F1 shows the keys. After a program that comes back to the menu, "Press any key for the menu" keeps its output on screen. Everyone else (VT52, Commodores, terminals that answer nothing) gets the menu of lines as before.

The login stays lines, so AutoPPP's 0x7E sniffing, the AOL client's P3 0x5A and Tymnet/SprintNet scripts, and the AOLnet UQKT1 prompt are untouched.

modemmenu -setup. modemmenu.conf on full screens, as the 1990s BBS setup programs did: pull-down menus (File, Login, Users, Menu, Dial-up, Server, Help; /, F12 or Alt+letter), a window per section cascading over the one it came from, the sample's help for the key under the bar, values typed in a pop-up box or picked from a list (yes/no and every key whose choices the sample names), Del for "back to the default", [item NAME] and [number NAME] lists with add, rename and delete (kept in step with [menu] items), and [groups]. Saving checks the file as -check does first ("Save anyway" if it doesn't), keeps its comments, blank lines and order (only changed keys' lines change), and writes it beside the old one then renames it over, keeping its mode and owner. Covers PPP pool/DNS, AOL network emulation, the Unix-socket server and handoff, authd, terminals, callers, limits and the rest.

On the line, for sysops. An item with mode = setup gives the same screens to a sysop who calls in. It needs users or groups (config error otherwise) and is never a guest's.

Slow lines and terminals

  • Only the cells that change are sent (the bbs's diff renderer, ported). Moving the bar costs 100–250 bytes.
  • Below 9600 bit/s the desk is plain blue and the screen is cleared in its color, so the first screen is about 2 KB in code page 437 at 2400 bit/s, not 5–6 KB.
  • Line sets: UTF-8 when the terminal shows é as one cell (a new CPR probe, only for ANSI terminals and only when full screen is on); code page 437 for SyncTERM and BBS ANSI terminals; the VT line-drawing set (ESC ( 0) for VTs and xterms without UTF-8; ASCII on request. [terminal] charset overrides.
  • A real DEC terminal (by its DA2) gets bold/reverse instead of colors. CP437's control-range glyphs (► ▲ ▼) are never sent, because some terminals take them as controls and the columns slip.

How

  • internal/tui: screen buffer and diff render (from bbs textui/desk.go), charsets, key decoding (VT/xterm/ANSI keys, Alt), list windows, pull-downs, message/confirm/input/choice dialogs
  • internal/confedit: line-preserving edits of the file
  • internal/confdoc: the sample's per-key help, moved out of tools/confref so the setup and the reference share it (reference output unchanged apart from the sample fixes below)
  • cmd/modemmenu/fullscreen.go, setup.go; new keys [menu] fullscreen = auto|no, [terminal] charset, item help; mode = setup
  • Sample: comments added for banner, welcome, goodbye, state_dir, which had been showing a neighbour's help in the reference
  • Docs: new docs/setup.md, a "full-screen menu" section in configuration.md, README, nav

Tests

go vet ./... and go test ./... pass, and -race passes on the new packages and tests.

  • TestFullScreenMenu is a pty call at 2400 bit/s. It checks the desk is cleared in blue, uses CP437 and has no shading. It also covers the motd box, an item by its key and the pause after it, a sysop opening and leaving the setup, and goodbye by key. A non-sysop doesn't see the setup and its key does nothing. A terminal that answers nothing gets the line menu.
  • TestSetup drives the screens with keys: it types a value, picks from a list, adds a section and renames an item (which also updates [menu] items). It then saves and compares the file byte for byte, comments included, and checks the file mode. A value that fails the check is not saved.
  • TestSetupNeedsSysops, internal/tui tests (diff render, plain-desk byte budget, charsets, keys, dialogs, pull-downs), internal/confedit tests.
  • Existing tests read the line menu, so their configs now get fullscreen = no. TestHandoffTimeLimit now waits up to 5 s for the server's "ended" log line. Under the full suite's load it sometimes read the log before that line was written; main has similar timing flakes (TestServeBusy).

I also drove both screens by hand on a pty with a terminal emulator in UTF-8, CP437 and VT modes. The image above comes from those runs.



Generated by Claude Code

The menu comes up full screen on a terminal that can have it (ANSI, or a
VT that said what it is, 40x14 at least): the items in a window on a
blue desk, a bar moved with the cursor keys, an item's key starting it
at once, the welcome at the top of the window, the motd in a box, the
user, rate, clock and minutes left on the bars.  Others get the menu of
lines; the login stays lines, so AutoPPP and the AOL client sniffing
are as they were.  [menu] fullscreen = auto|no, item help =.

modemmenu -setup changes modemmenu.conf on full screens in the style of
the 1990s BBS setup programs (the bbs's setup screens, ported): pull-down
menus, cascading windows, the sample's help of each key, values typed in
a box or picked from a list.  Saving checks the file first and keeps its
comments and order.  An [item] of mode = setup (users or groups needed)
gives it to a sysop who calls in.

- internal/tui: the screen buffer and its diff rendering (from bbs
  textui/desk.go), UTF-8, code page 437, the VT line set and ASCII,
  keys, windows, pull-downs and dialogs
- internal/confedit: changes to the file by line, comments kept
- internal/confdoc: the sample's help, from tools/confref (shared)
- term: a UTF-8 probe for ANSI terminals; [terminal] charset
- below 9600 bit/s the desk is plain blue, cleared in a few bytes
- the sample: comments for keys that took a neighbour's help
- tests: the line menu's tests ask for fullscreen = no; one handoff
  test waits for the server's last log line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRUujUBmci66AZkngmh
@Neo-Desktop Neo-Desktop self-assigned this Nov 9, 2026
@Neo-Desktop
Neo-Desktop merged commit 0c7b3a2 into main Nov 9, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants