widget: session renewal ordering and refresh-margin follow-ups after 0.4.0
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
Start with plans/reports/code-reviewer-261026-2104-webchat-pr6-merge-review.md, then read packages/dewee-webchat/src/widget/api-client.ts around ensureSession, renewSession and loadSession for items 1-3 and 5. For item 4, read handler.ts and its fixed Access-Control-Allow-Headers list. Done means each follow-up is fixed or explicitly justified, with renewal no longer joining a request that began before sign-in and the CORS header list extensible.
索引モデルが issue の本文から書いたものです。
説明
Problem
Follow-ups from the isolated review of the merge of main into #6 (custom headers/fetch plus identity sessions, 0.4.0). None of these blocks a release, and none can send another user's token.
- M2:
renewSession()can return an anonymous session. Inpackages/dewee-webchat/src/widget/api-client.ts(aroundensureSession/renewSession),renewSession()reuses a/sessionrequest that is already in flight. If that request started before the host signed the user in, the widget keeps the anonymous session after sign-in. Fix: add a generation counter so that a renewal ignores, and does not join, an older in-flight load. - L6:
headers(true)can send the stored anonymous token while a renewal is loading.loadSessionsetsthis.sessionto the stored anonymous visitor before it creates the new session. Ahistoryorlinkcall that is waiting on host headers can therefore send that anonymous token instead of waiting for the signed-in one. The impact is limited to the same browser's own visitor, andrenewSession()reloads the conversation. Fix: also wait for an in-progress load, or correct the comment, which currently promises "never none or a stale one". - L1: the anonymous refresh margin mixes clocks. Anonymous sessions have no
expiresIn, so freshness compares the server'sexpiresAtwith the browser clock. With a short anonymous TTL and a browser clock that runs ahead, every request mints a new/session(and a Turnstile challenge). Fix: sendexpiresInfor anonymous sessions too. - L3: CORS cannot be extended. The built-in handler's
Access-Control-Allow-Headerslist is fixed (handler.ts), so a cross-origin endpoint cannot accept the extraheadersthe widget now supports. - L4: stale entries stay in storage. A signed-in entry stored by a 0.3.0 widget is ignored but never deleted from localStorage.
Review report (dewee repo): plans/reports/code-reviewer-261026-2104-webchat-pr6-merge-review.md. Part of nextlevelbuilder/dewee#1450.
- 主要言語
- TypeScript
- スター
- 7
- フォーク
- 1
- 平均マージ
- 1日 6時間
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextlevelbuilder/dewee-webchat のほかの issue
-
PHP backend: fixed file names in the shared temp dir対応中かも @dannyward630 が今日担当しました。 オープンai-handle
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
ai-handle
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
-
ai-handle enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
-
ai-handle enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
ai-handle bug
難易度 4/5 3〜5日 初心者へのやさしさ 53/100
nextlevelbuilder/dewee-webchat の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
better-auth/better-auth#12132 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
o8 next debug build aborts on Glass to Dark appearance switch (nil identifier messaged before check)オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hurttlocker/o8#5112 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
webrecorder/wabac.js#386 ·
-
needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 92/100
agent-of-empires/agent-of-empires#5098 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信