Skip to content

Turn the extended data stream off when Extended is unchecked (#200) - #201

Merged
coffeemuse merged 3 commits into
mainfrom
claude/issue-200-211f82
Oct 2, 2026
Merged

coffeemuse merged 3 commits into
mainfrom
claude/issue-200-211f82

Conversation

@coffeemuse

Copy link
Copy Markdown
Owner

Closes #200.

The profile editor's Extended data stream box only added or dropped the -E on b3270's -model. b3270 4.5
ignores that suffix: common_model_init reads only the model number and colour from the name, and the stream is the
separate extendedDataStream resource, on by default. So a profile with the box unchecked still told the host
IBM-3279-2-E.

What changes

  • The backend turns the stream off by name. BuildArguments sends -set extendedDataStream=false when the
    profile runs without it, and nothing otherwise, since on is b3270's default.
  • A custom size keeps the stream on. b3270 drops -oversize without the stream (oversize_init), so
    TerminalType.IsExtended(profile) (Core) is the profile's Extended, or true for any oversize, even one the engine
    would refuse (the command line refuses that by name). This differs from the plan in the issue, which had
    OversizeGeometry.TryFor answer "no oversize" without the stream. The editor before this let Other be saved
    with Extended unchecked, and those sessions always ran with the stream on. Under the issue's plan they would drop
    to 24x80 after the upgrade; with this rule they keep their size, and TryFor is unchanged. TerminalType.For, the
    status bar's spelling, follows IsExtended too.
  • The editor locks the box on under Other. It shows checked and greyed out, with "A custom size needs it."
    under it. Choosing a model again brings back the user's own choice. ExtendedDisplay follows the
    ColumnsDisplay pattern, and Save writes what the box shows.
  • Docs: the user guide's row is reworded (HTML regenerated), there is an Unreleased changelog entry, and the backend
    and test notes are updated.

Engine behaviour

Measured with the bundled 4.5ga6 and Homebrew's, which agree:

Arguments TerminalName extendedDataStream screen-mode
-model 3279-2 IBM-3279-2-E true 24x80
-model 3279-2 -set extendedDataStream=false IBM-3279-2 false 24x80
-model 3279-2 -oversize 132x60 IBM-DYNAMIC true 60x132
-model 3279-2 -set extendedDataStream=false -oversize 132x60 IBM-3279-2 false 24x80, oversize dropped

In the x3270 source, extended_data_stream is read in only two places: the -E on the terminal name and the
oversize.

Tests

  • New: EngineExtendedDataStreamTests (integration) starts the bundled engine for three profiles, asks it for
    TerminalName and extendedDataStream, and checks its starting screen against ScreenSize.AlternateFor. Before
    the fix the unchecked case failed with IBM-3279-2-E.
  • New or changed: TerminalTypeTests, ScreenSizeTests, the BuildArguments cases in
    B3270SessionLifecycleTests, two ProfileViewModelsTests and ProfileEditorWindowTests.The_extended_box_is_locked_on_under_other.
  • Full suite green locally (the live-host tests skip); dotnet build LizTerm.slnx --no-incremental reports 0
    warnings.

Hands-on

  • The bundled engine against MVS/CE: the logon screen arrives the same with the stream off (IBM-3279-2) as with
    it on. Not signed on.
  • Still owed: a look at the greyed box and its hint in the real editor.

Not in this PR

b3270 names a colour model 4 or 5 IBM-3278-n to the host (create_3270_termtype uses 3279 only for models 2
and 3), so the status bar's 3279-4-E is not what the host sees. That was already true before this change, and it
is not filed.

🤖 Generated with Claude Code

coffeemuse and others added 2 commits October 2, 2026 13:56
The profile's Extended box only dropped the -E from b3270's -model, which
b3270 4.5 ignores: common_model_init reads the model number and colour and
nothing else, so an unchecked box still told the host IBM-3279-2-E. The
stream is the extendedDataStream resource, and BuildArguments now sends
-set extendedDataStream=false for it.

b3270 drops -oversize without the stream, so a custom size keeps it on
whatever the box says (TerminalType.IsExtended). The editor before this
let Other be saved with Extended unchecked, and those profiles keep their
custom size. Under Other the editor shows the box checked and greyed out,
with the reason under it, and choosing a model brings the user's choice
back. A new engine test asks the bundled engine what it will tell the host.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Save writes the user's own Extended rather than what the greyed box shows
under Other. TerminalType.IsExtended already keeps the stream on for any
custom size, so the session is unchanged, and an unchecked choice now
survives a save and comes back when the profile returns to a model.

The user guide's row said the host is always told an -E terminal type; a
custom size is told IBM-DYNAMIC, which the row now says.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coffeemuse

Copy link
Copy Markdown
Owner Author

Review fixes (db26db4)

A high review found six things; two are fixed here, four skipped by choice.

Fixed

  1. Save keeps the user's Extended choice under Other. TryBuild wrote ExtendedDisplay, so saving under Other stored Extended = true and an unchecked choice was lost for good; going back to a model later quietly turned the stream on again. It now writes Extended. Nothing changes for the session, since TerminalType.IsExtended keeps the stream on for any custom size. This replaces the description's "Save writes what the box shows". Tests: Other_locks_extended_on_and_leaving_it_brings_the_choice_back now expects the unchecked choice to be saved (and IsExtended true), and A_custom_size_saved_with_extended_unchecked_opens_checked_and_keeps_the_choice reopens the saved profile and goes back to model 2.
  2. The user guide names IBM-DYNAMIC. The Extended row said the host is told an -E type such as IBM-3279-2-E; with Model on Other the host is told IBM-DYNAMIC, and the row now says so. HTML regenerated.

Skipped

  • The status-bar tooltip still derives the terminal type in Core rather than reading the engine's own answer (it shows 3279-2-E for a custom size that is IBM-DYNAMIC).
  • The editor's IsCustomSize || Extended repeats the IsExtended rule.
  • -model still carries an -E that b3270 ignores.
  • The oversize is parsed three times when the command line is built.

Full suite green (integration lane skipped here, no bundled engine); --no-incremental build: 0 warnings.

🤖 Generated with Claude Code

The review had Save write the user's hidden Extended choice under Other, so
it came back when the profile returned to a model. Robert prefers the rule
he chose for the editor: like the size boxes, nothing the editor is not
showing survives a save, so a custom size saves Extended on. The session is
the same either way, since TerminalType.IsExtended keeps the stream on for
any custom size.

docs/development.md now says the bundled engine is the one LizTerm chose,
and that an override older than 4.4 has no extendedDataStream resource, so
an unchecked box does nothing with one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coffeemuse

Copy link
Copy Markdown
Owner Author

Review follow-up (87bd911)

Robert went through the review's fixes and skips (comment above) with me.

Fix 1 reverted. Save writes what the Extended box shows again: under Other, Extended on. That is the rule
Robert chose for the editor, and it matches the size boxes, where nothing the editor is not showing survives a save.
The session is the same either way, since TerminalType.IsExtended keeps the stream on for any custom size. The
description's "Save writes what the box shows" holds again. Tests:
Other_locks_extended_on_and_leaving_it_brings_the_choice_back expects Extended saved on under Other, and
A_custom_size_saved_with_extended_unchecked_opens_and_saves_checked reopens the saved profile and finds the box
checked on model 2.

Fix 2 kept. With any oversize the engine reports IBM-DYNAMIC (measured with Query TerminalName), so the user
guide's row is right to name it.

The four skips stand.

  • Status-bar terminal type: filed as Status bar names the profile's terminal type, not the one the host is told #202, with the model 4/5 naming from the description's "Not in this PR".
    b3270 already reports its own name in a terminal-name indication.
  • IsCustomSize || Extended is not quite IsExtended. Under Other with the boxes still empty there is no oversize
    yet, so IsExtended would say off while the box has to stay locked.
  • The -E on -model is ignored by every engine LizTerm accepts. 4.3's model parser says "-E is allowed, but
    ignored", and extendedDataStream arrived in 4.4alpha1. It stays because it is also the status bar's spelling.
  • The oversize parsed three times: once per engine start, microseconds.

Added: docs/development.md. It now says that LizTerm ships the engine version it pins, so what users run is
always one LizTerm chose, and that LIZTERM_B3270_PATH is for quick work and troubleshooting. An override older
than 4.4 has no extendedDataStream resource (4.3 warns "Unknown resource name" and keeps the stream on), so an
unchecked box does nothing with one. The bundled 4.5ga6 is not affected.

Full suite green locally (the live-host tests skip); --no-incremental build: 0 warnings.

🤖 Generated with Claude Code

@coffeemuse
coffeemuse merged commit d0ebc65 into main Oct 2, 2026
6 checks passed
@coffeemuse
coffeemuse deleted the claude/issue-200-211f82 branch October 2, 2026 20:52
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.

Profile editor: the Extended data stream checkbox has no effect

1 participant