Test the live updates stream (/api/events)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
apps/api/src/routes.tsでbroadcast()と/api/eventsルートを確認し、続いてClientクラスとtests/api.test.mjsにある既存のAPIテストパターンを調べてください。未認証アクセス、incidentの更新、playbookの保存をカバーするテストを追加してください。各ストリームをreaderで読み取り、キャンセルしてnpm testが終了するようにしてください。期待されるイベント型とincident idが検証され、npm testが成功すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
The task
When someone changes a playbook or an incident, everyone sees it live: the browser keeps GET /api/events open, a Server-Sent Events stream, and the server pushes an event on every change. Nothing tests this stream. Add a test, so that a change to the server cannot silently stop live updates.
Where to look
apps/api/src/routes.ts:broadcast()near the top writesevent: changewith{ type, id }as data; the/api/eventsroute needs a signed-in user (roleviewer)tests/api.test.mjs: theClientclass keeps the session cookie.fetchcan read a stream: readres.bodywith a reader and split the text on blank lines (\n\n), each block is one event
Cancel the reader at the end of the test, or the test run will not exit.
Done when
- Opening
/api/eventswithout a session gets401 - With a session, after an analyst changes an incident (for example its name,
POST /api/incidents/:id/meta), anevent: changearrives withtypeincidentand the incident'sid - After an editor saves a playbook draft, an event arrives with
typeplaybook -
npm testpasses, and exits on its own
Mentor
@0b3l1X-SolidGeeks
- 主要言語
- TypeScript
- スター
- 0
- フォーク
- 1
- 平均マージ
- 9分
- マージ済み PR(30日)
- 10
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SolidGeeks/muster のほかの issue
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
SolidGeeks/muster#15 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
SolidGeeks/muster#14 ·
メンテナーはふだん 1 日以内に返信
SolidGeeks/muster の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
outline/outline#14348 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Agent import retains quotes in .env API keys followed by inline comments対応中かも @yxr-2025 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
elie222/rakazo#2322 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
awslabs/visual-asset-management-system#804 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
dsh-market/dsh-market#1027 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信