Skip to content

Refactor/web socket terminal handler levels - #1865

Closed
isc-klu wants to merge 21 commits into
intersystems-community:masterfrom
isc-klu:refactor/webSocketTerminal-handler-levels
Closed

isc-klu wants to merge 21 commits into
intersystems-community:masterfrom
isc-klu:refactor/webSocketTerminal-handler-levels

Conversation

@isc-klu

@isc-klu isc-klu commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

This PR fixes #1862

isc-klu and others added 21 commits April 13, 2026 16:31
Reorganizes handleInput's state machine into clear layers: handleInput
dispatches on (state, char) via nested switches directly to leaf
_handle* methods, which take their state dependencies as explicit
parameters instead of reading `this.*` fields internally. Shared
imperative helpers (_moveCursor, _submit, etc.) are replaced by
side-effect-free module-level functions (computeCursorMove,
computeInsertMove, normalizeTypedChars, etc.) that leaf handlers call
before performing their own field mutations and I/O.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The single-field setter methods added earlier for encapsulating
mutation no longer earn their keep now that leaf handlers already
take their state as explicit parameters; assign fields directly
instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Removes intermediate const bindings that were only referenced once,
substituting their definitions directly at the (single) use site.
Left alone where inlining would change behavior, e.g. wrapForReadMode's
firstLine, which must be captured before charLines[0] is mutated.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ions

Splits input handling into free, pure functions (state -> {state, writes, send})
applied through a single _applyEffect, fixing a bug where pasting multi-line input
with a trailing shell-integration carriage return skipped syntax coloring before
submitting.
@isc-klu isc-klu closed this Sep 9, 2026
@isc-klu
isc-klu deleted the refactor/webSocketTerminal-handler-levels branch September 9, 2026 21:38
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.

Lite Terminal: pasted input that ends with a newline is not syntax colored

2 participants