Repository navigation
Full-screen menu for ANSI callers, and modemmenu -setup for sysops - #17
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
UQKT1prompt are untouched.modemmenu -setup.modemmenu.confon 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-checkdoes 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 = setupgives the same screens to a sysop who calls in. It needsusersorgroups(config error otherwise) and is never a guest's.Slow lines and terminals
é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] charsetoverrides.How
internal/tui: screen buffer and diff render (from bbstextui/desk.go), charsets, key decoding (VT/xterm/ANSI keys, Alt), list windows, pull-downs, message/confirm/input/choice dialogsinternal/confedit: line-preserving edits of the fileinternal/confdoc: the sample's per-key help, moved out oftools/confrefso 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, itemhelp;mode = setupbanner,welcome,goodbye,state_dir, which had been showing a neighbour's help in the referencedocs/setup.md, a "full-screen menu" section inconfiguration.md, README, navTests
go vet ./...andgo test ./...pass, and-racepasses on the new packages and tests.TestFullScreenMenuis 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.TestSetupdrives 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/tuitests (diff render, plain-desk byte budget, charsets, keys, dialogs, pull-downs),internal/confedittests.fullscreen = no.TestHandoffTimeLimitnow 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