Skip to content

Enhance Telnet option handling and viewport management#160

Merged
myonara merged 9 commits into
developfrom
experimental/xterm-attach
Dec 22, 2025
Merged

Enhance Telnet option handling and viewport management#160
myonara merged 9 commits into
developfrom
experimental/xterm-attach

Conversation

@mystiker
Copy link
Copy Markdown
Collaborator

Introduce state management for Telnet options, including linemode and echo handling.

Implement viewport size management in the backend and update frontend components to reflect these changes.

Additionally, streamline logging and improve socket message handling.

… listeners

- Updated `TelnetOptionHandler` to include generic state management methods: `getState`, `onStateChange`, and `offStateChange`.
- Refactored `handleEchoOption` to utilize a new `EchoNegotiator` class for managing echo state and event emissions.
- Introduced `LinemodeNegotiator` class in `handle-linemode-option` to manage linemode state and subnegotiation.
- Removed the `log-negotiation` utility and integrated logging directly into the `TelnetSocketWrapper`.
- Added linemode state management in the frontend, allowing for dynamic updates based on server negotiations.
- Created a new `LinemodeState` type to encapsulate linemode properties and updated the socket service to handle linemode events.
- Updated frontend components to reflect changes in local echo behavior based on linemode state.
Comment thread frontend/src/app/features/sockets/types/server-to-client-events.ts Outdated
Comment thread frontend/src/app/features/sockets/types/linemode-state.ts Outdated
Comment thread frontend/src/app/features/sockets/types/client-to-server-events.ts Outdated
Comment thread backend/src/core/sockets/types/client-to-server-events.ts Outdated
Comment thread backend/src/core/sockets/types/server-to-client-events.ts Outdated
myonara
myonara previously approved these changes Dec 21, 2025
Copy link
Copy Markdown
Contributor

@myonara myonara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some doc comments open

- Introduced a new shared package for common types and utilities used across frontend and backend.
- Added ServerConfig interface for backend configuration.
- Defined ClientToServerEvents and ServerToClientEvents interfaces for Socket.IO communication.
- Created LinemodeState interface to represent TELNET LINEMODE capabilities.
- Implemented TypeScript configuration for the shared package.
- Updated root package.json to include the shared workspace and adjusted build scripts.
@myonara myonara merged commit 1336a66 into develop Dec 22, 2025
1 check 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