Skip to content

Add HTTP/SSE action examples and browser demos - #1614

Open
minggangw wants to merge 6 commits into
RobotWebTools:developfrom
minggangw:add-sse-action-example
Open

minggangw wants to merge 6 commits into
RobotWebTools:developfrom
minggangw:add-sse-action-example

Conversation

@minggangw

@minggangw minggangw commented Sep 20, 2026

Copy link
Copy Markdown
Member
  • Add Fibonacci action servers to both web demos with goal validation, periodic feedback, cancellation and shutdown guards.
  • Add browser controls for goal submission, feedback, terminal status, results, WebSocket cancellation and HTTP stream detachment.
  • Isolate action clients and ignore stale callbacks when switching transports or starting another goal.
  • Clean up connections on page exit and restore cached-page connections and active EventSource streams without replaying goals.
  • Expose action capabilities in demo configurations, enable TypeScript demo CORS and support custom runtime ports.
  • Improve responsive layouts, input sizing and action controls.
  • Update root, npm, SDK and demo guides with typed action examples, transport semantics, curl recipes and OpenAPI export.

Copilot AI lite review requested due to automatic review settings September 20, 2026 07:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The documented walkthrough references a missing http-action-client-example.mjs file, so the advertised client step cannot run.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds HTTP/SSE action documentation and Fibonacci browser demos for JavaScript and TypeScript.

Changes:

  • Documents action APIs, SSE, cancellation, and OpenAPI support.
  • Adds Fibonacci action servers and browser controls.
  • Updates demo configuration, styling, and README guidance.
File Summary
web/​README.md Documents browser actions and HTTP/SSE usage
scripts/​npmjs-readme.md Updates package README action guidance
README.md Updates the web SDK overview
example/​actions/​README.md Adds an HTTP/SSE action walkthrough
demo/​web/​typescript/​web.json Exposes the Fibonacci action and CORS
demo/​web/​typescript/​src/​style.css Adds responsive action styling
demo/​web/​typescript/​src/​main.ts Implements typed action controls
demo/​web/​typescript/​server.ts Adds the TypeScript Fibonacci action server
demo/​web/​typescript/​README.md Documents the TypeScript action demo
demo/​web/​typescript/​index.html Adds the Fibonacci action panel
demo/​web/​javascript/​web.json Exposes the Fibonacci action
demo/​web/​javascript/​runtime.mjs Adds the JavaScript Fibonacci action server
demo/​web/​javascript/​README.md Documents the JavaScript action demo
demo/​web/​javascript/​index.html Adds the JavaScript action panel and controls

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread example/actions/README.md Outdated
Comment on lines +86 to +90
#### 4. HTTP Action Client (`http-action-client-example.mjs`)

Uses the `rclnodejs/web` SDK to send a Fibonacci goal over HTTP, receive SSE feedback, and print the result and terminal status. The client does not create a ROS node and always closes its HTTP stream. It exits with a nonzero status for request/stream errors or a goal that does not succeed.

See [HTTP Actions over SSE](#http-actions-over-sse) for the server, runtime, and client commands.
@coveralls

coveralls commented Sep 20, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 91.136%. remained the same — minggangw:add-sse-action-example into RobotWebTools:develop

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The walkthrough references a missing client file, and both browser demos remain disconnected after a back-forward-cache restore.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 3 Medium severity

Open (3)

Comment thread demo/web/javascript/index.html Outdated
Comment thread demo/web/typescript/src/main.ts

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The TypeScript demo passes null to a parameter that only accepts a callback or undefined, causing strict type-checking to fail.

Get a fresh assessment by requesting another Copilot review.

Review effort: Balanced
Findings: 1 High severity · 3 Medium severity

Open (4)

Comment thread demo/web/typescript/server.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🔵 Needs a closer look

Cross-transport action cancellation, streaming, and browser lifecycle behavior warrant final human validation.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
Resolved since last review (3)

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.

3 participants