Repository navigation
Engine train 9: scripts see the real window size from their first line - #234
Merged
Merged
Conversation
vadi2
force-pushed
the
ccr-14671218-tf96z6-engine-train-9
branch
5 times, most recently
from
November 21, 2026 19:41
2479a1c to
ed89550
Compare
A profile's scripts now read the main window's size the game screen gives from their first line, not 90 by 25 until the profile has loaded. A Geyser window that wraps to its width and prints as the profile loads, as the starter UI's chat window does, wraps at the width the player sees rather than at about 13 columns. - The engine gives a profile the sizes it was given before it opened as part of its start (Mudlet patch 0043, THeadlessSession's Options::mainWindowSize and screenSize), so they are in place before its first script runs and raise no sysWindowResizeEvent for it. - Protocol 48: the control socket takes setScreenSize and setMainWindowSize, which the engine keeps for each profile opened after them and gives to none open now, as a profile's own socket exists only once it has opened. - The app sends them before openProfile and on each attach. It keeps the last sizes the game screen gave a profile with no windows yet (StartSizes, "startSizes" in the engine preferences) with the window, text size and layout they were measured in, so the first profile opened after the app starts gets them too. Tests: StartSizesTest (JVM); start_sizes in test_mudlet_engine.py; GameSwitcherTest on the emulators. Part of Mudlet/Mudlet#9011 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016ujaeFyaqXXDx8xjoThE6J
The starter UI's chat window opens on its welcome, "Tells, says and channel chat from the game will be collected here." A console keeps the wrap a line had when it was printed, so after the game area widened (a tablet turned, a phone unfolded) the welcome stayed wrapped at the old, narrower width. Now, when the starter UI fits its dock to a new window size and the chat window still holds only the welcome, it prints the welcome again at the new width. Chat the game sent is never touched, and a dock the player dragged to a width of their own is left as it is. The desktop gets the same fix upstream. Carried as Mudlet patch 0044 until Mudlet/Mudlet has it; no protocol change. Tests: starter_ui_welcome in test_mudlet_engine.py; upstream, StarterUiChatWelcome_spec.lua. Part of Mudlet/Mudlet#9011 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016ujaeFyaqXXDx8xjoThE6J
vadi2
force-pushed
the
ccr-14671218-tf96z6-engine-train-9
branch
from
November 21, 2026 21:28
ed89550 to
d391cdc
Compare
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.
Brief overview of PR changes/additions
Car 1: scripts read the game screen's window size from their first line
setScreenSizeandsetMainWindowSizeas the next profile's start sizes.startSizesin theengineprefs) and sends them before each open and on attach.Car 2: the starter UI's chat welcome refits after the window widens
mudlet-base-ui1.9.6,.mpackagerebuilt.Motivation for adding to Mudlet
Packages that size or wrap text when they load (Geyser autoWrap consoles, the starter UI) were laid out for 90 columns and stayed that way on a wider screen.
Other info (issues closed, discussion etc)
libmudletand a Qt front-end Mudlet#9011🤖 Generated with Claude Code
https://claude.ai/code/session_016ujaeFyaqXXDx8xjoThE6J