widget: session renewal ordering and refresh-margin follow-ups after 0.4.0
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- authentication, frontend
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 7
- Forks
- 1
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 5
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nextlevelbuilder/dewee-webchat
-
PHP backend: fixed file names in the shared temp dirPosiblemente ocupada @dannyward630 la tomó hace 1 día. Abiertoai-handle
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
ai-handle
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
-
ai-handle enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
-
ai-handle enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
ai-handle bug
Dificultad 4/5 3-5 días Aptitud para principiantes 53/100
Todos los issues de nextlevelbuilder/dewee-webchat
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Automattic/data-liberation-agent#1115 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
Enhance blog readabilityAbiertoCSS enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
pychess/pychess-variants#2448 ·
Los mantenedores suelen responder en 1 día
-
[architect] Stale planning/scratch files at repo root (COMPONENT_SPLIT_SUMMARY.md etc.) describe already-completed workPosiblemente ocupada @hivecommons-hive la tomó hoy. Abiertoagent/architect architecture help wanted stage/040-covered-by-pr tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
kubestellar/console#24716 ·
Los mantenedores suelen responder en 1 día
-
helm-knative-apply.sh fails with Helm 4Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoarea: triage theme: undefined
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
jhipster/generator-jhipster#35895 ·
Los mantenedores suelen responder en 1 día