[2.0 / next] An <Errored> recovering after a retry waits for async under a nested <Loading>
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, typescript
Línea de trabajo
The report names a reproduction test under packages/web/test but no existing test file or implementation entry point. Start by locating the Errored recovery logic and related tests, then add the supplied nested Loading reproduction and run it. Done means recovered content shows immediately after the detail request succeeds, while the nested fallback remains until search results arrive.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Found by: the ReactiveScript eval, at next 5e68925c (rc.20). The .rx and Solid TSX apps of one eval task now fail "retry after not found shows the issue". The same apps passed at 6b792a95. The likely cause is the Errored recovery change in #4406 (#4403 to #4405), but I haven't bisected.
Program
detail: an async memo that throws when the answer isnull.- The view:
<Loading>›<Errored>›<h2>{detail().title}</h2>, plus a child component that searches by the title, with its own<Loading>around the hits.
Steps
detailanswersnull, so the fallback shows.refresh(detail).detailanswers{ title: "Crash" }.- The nested search answers.
Text after each step
| step | nested search | no nested search |
|---|---|---|
| not found | err not found |
err not found |
| retry | err not found |
err not found |
| retry landed | err not found |
Crash |
| search landed | Crashab |
— |
Expected at "retry landed": Crashfinding. The recovered content shows, and the nested <Loading> shows its own fallback until the search answers. That nested boundary exists so its content doesn't hold the rest. Instead, the Errored keeps showing the old failure until the nested async lands. If that async is slow or never answers, the retry looks like it did nothing.
Test (packages/web/test)
/**
* @jsxImportSource @solidjs/web
* @vitest-environment jsdom
*/
import { test } from "vitest";
import { Errored, For, Loading, Show, createMemo, flush, refresh } from "solid-js";
import { render } from "../src/index.js";
const tick = async () => { for (let i = 0; i < 4; i++) { await new Promise(r => setTimeout(r, 0)); flush(); } };
for (const nested of [true, false])
test(`nested=${nested}`, async () => {
const asks: { key: string; res: (v: any) => void }[] = [];
const ask = (key: string) => new Promise<any>(res => asks.push({ key, res }));
const land = async (key: string, v: any) => { const i = asks.findIndex(a => a.key === key); if (i < 0) throw new Error(`not asked ${key}: ${asks.map(a => a.key)}`); asks.splice(i, 1)[0].res(v); await tick(); };
const container = document.body.appendChild(document.createElement("div"));
const frames: string[] = [];
const snap = (tag: string) => frames.push(`${tag.padEnd(14)} ${container.textContent}`);
let detail!: () => any;
function Related(props: { title: string }) {
const hits = createMemo(() => ask(`search:${props.title}`));
return <Loading fallback={<i>finding</i>}><For each={hits()}>{(h: any) => <i>{h}</i>}</For></Loading>;
}
render(() => {
detail = createMemo(async () => { const d = await ask("detail"); if (!d) throw new Error("not found"); return d; });
return (
<Loading fallback={<p>loading</p>}>
<Errored fallback={(e: any) => <p>err {e().message}</p>}>
<h2>{detail().title}</h2>
{nested && <Show when={detail()}>{(d: any) => <Related title={d().title} />}</Show>}
</Errored>
</Loading>
);
}, container);
await tick();
await land("detail", null); snap("not found");
refresh(detail); flush(); await tick(); snap("retry");
await land("detail", { title: "Crash" }); snap("retry landed");
if (nested) { await land("search:Crash", ["a", "b"]); snap("search landed"); }
console.log(`nested=${nested}\n ` + frames.join("\n "));
container.remove();
});
- Lenguaje dominante
- TypeScript
- Estrellas
- 36.2k
- Forks
- 1.1k
- Merge medio
- 11 h 28 min
- PR fusionados (30 d)
- 461
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 solidjs/solid
-
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 14/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 8/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 28/100
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
Los mantenedores suelen responder en 1 día
Todos los issues de solidjs/solid
Issues similares
-
docker infra P1 security size:S
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
josephfung/curia#2408 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ehmpathy/rhachet-roles-ehmpathy#1231 ·
Los mantenedores suelen responder en 1 día
-
enhancement good first issue help wanted
Dificultad 2/5 Medio día Aptitud para principiantes 70/100
danielw-sudo/agentuto#32 ·
Los mantenedores suelen responder en 1 día
-
type:docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nightgauge/nightgauge#2836 ·
Los mantenedores suelen responder en 1 día