Skip to content

fix: ippon serve の /cmd は JSON を 1 行に書き直してから配信する - #27

Merged
tanahiro2010 merged 2 commits into
under18dev:mainfrom
tanahiro2010:fix/serve-cmd-reserialize
Nov 21, 2026
Merged

tanahiro2010 merged 2 commits into
under18dev:mainfrom
tanahiro2010:fix/serve-cmd-reserialize

Conversation

@tanahiro2010

Copy link
Copy Markdown
Collaborator

POST /cmd は受け取った本文をそのまま SSE の data: に書いていました。本文の JSON に改行がある(整形されている)と、SSE では最初の行しか data にならず、受け手には壊れた JSON が届いていました。JSON.parse した後に JSON.stringify で 1 行に書き直してから配信・保持します。

デッキとリモコンは 1 行の JSON しか送らないので、普段の動きは変わりません。

確認:test/serve.test.ts にテストを足しました。npm test が通ります(ハイライトの処理時間を測るテストは main でも落ちることがあり、別に直します)。

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T08:12:35.729690Z e0b572f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

…o fix/serve-cmd-reserialize

# Conflicts:
#	test/serve.test.ts
@tanahiro2010
tanahiro2010 merged commit 6f451be into under18dev:main Nov 21, 2026
3 checks 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.

1 participant