Add wave:term component with direct SSE output + /api/terminput input path#2974
Open
Add wave:term component with direct SSE output + /api/terminput input path#2974
wave:term component with direct SSE output + /api/terminput input path#2974Conversation
Co-authored-by: sawka <2722291+sawka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add new tsunami component with TermWrite functionality
Add Mar 4, 2026
wave:term component with direct SSE output + /api/terminput input path
| } | ||
| } | ||
|
|
||
| const TsunamiTerm = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(function TsunamiTerm( |
Contributor
There was a problem hiding this comment.
CRITICAL: Missing displayName for React.forwardRef component
According to the project's coding guidelines, when using React.memo() or React.forwardRef(), you must add a displayName for the component. This helps with debugging and React DevTools.
Add after the component definition:
TsunamiTerm.displayName = "TsunamiTerm";
Contributor
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
Files Reviewed (7 files)
|
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.
This PR introduces a standalone Tsunami terminal element (
wave:term) and routes terminal IO outside the normal render/event loop for lower-latency streaming. It adds imperative terminal output (TermWrite) over SSE and terminal input/resize delivery over a dedicated/api/terminputendpoint.Frontend: new
wave:termelementtsunami/frontend/src/element/tsunamiterm.tsx.@xterm/xtermwith@xterm/addon-fit.<div>(style/class/ref target), with xterm auto-fit to that container.Frontend: terminal transport wiring
wave:termintsunami/frontend/src/vdom.tsx.termwriteintsunami/frontend/src/model/tsunami-model.tsx, dispatched to the terminal component via a local custom event.onDataandonResizenow POST directly to/api/terminputas JSON payloads:iddata64(base64 terminal input)termsize(rows,cols) for resize updatesBackend: new terminal IO APIs
/api/terminputhandler intsunami/engine/serverhandlers.go.tsunami/rpctypes/protocoltypes.go:TermInputPacket,TermWritePacket,TermSizetsunami/engine/clientimpl.go:SendTermWrite(id, data64)-> emits SSE eventtermwriteSetTermInputHandler(...)andHandleTermInput(...)tsunami/app/defaultclient.go:TermWrite(id, data64) errorSetTermInputHandler(func(TermInputPacket))Example usage
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.