Conversation
…indow.status), use let/const, constrain container width on wide screens
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.
fix examples: http-server and websocket
Summary
c.json()object literals; serve an embedded HTML homepage with clickable routes and inline POST formswsBroadcastcall on connect), iMessage-style chat UI (white/blue bubbles, sender names, arrow button), client-generated IDs, structuredsender|textmessage protocol, fixed status var shadowingwindow.status, constrained container width on wide screenshasHeaders=truewhen handler returnsHttpResponsefrom.d.ts; useembedDirnotembedFileforgetEmbeddedFilelookupChanges
examples/http-server.ts
c.json()calls now pass object literals instead of raw JSON stringsindex.html(HTML homepage with all routes)examples/http-server-public/index.htmlwith clickable GET links and inline POST formsexamples/websocket/
app.ts: removewsBroadcaston open (caused crash), structuredsender|textprotocol, removed redundant interface definitions (use.d.ts)public/chat.js: client-generated UUID, parse structured messages, distinguish sent/received sidespublic/style.css: iMessage-style bubbles, full-screen layout, constrained widthsrc/codegen/llvm-generator.ts
embedDirfor embedded file lookup (fixes blank page on redirect)Test plan
node dist/chad-node.js run examples/http-server.ts— homepage loads, all routes return JSONnode dist/chad-node.js run examples/websocket/app.ts— chat UI loads, messages appear with correct sender/receiver styling, user count updates on leavebash scripts/run-examples.sh— all 9 example tests pass