Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Beta]: In the Authored Changes example, after deleting the only media block in Suggest, typing throws "Cannot find a descendant at path [0]" and inserts nothing

Abierto
#5,276 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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
55/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
react, typescript
Área
frontend, testing

Línea de trabajo

Start with the Authored Changes example at /examples/plite/authored-changes and reproduce the failure using the One media block sample in Suggest. Read the node lookup at packages/plitejs/src/interfaces/node.ts:885-889, then trace the key handling that requests path [0]; the issue does not identify that caller. Done means typing after deleting the only media block creates a paragraph without throwing, both before and after accepting the deletion.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

bug target:beta

Testing lane

  • Repository: udecode/plate
  • Branch: next
  • Release channel: Beta
  • Exact commit/package version: NOT_ENOUGH_INFO

Summary

On /examples/plite/authored-changes, with the One media block sample, deleting the media block in Suggest records a deletion. After that, typing throws an uncaught Cannot find a descendant at path [0] and inserts nothing, and Enter does nothing. Accepting the deletion leaves a document with no blocks, where typing throws again. The two samples where the media block has a paragraph beside it take typing after the same deletion.

Reproduction

The page has a Sample document menu and two views of one shared document: Accepted content on the left and Proposed content on the right. The right view starts in Suggest, editing as Alice. Pending changes show as cards under Pending proposals, each with Accept and Reject.

Repro 1: /examples/plite/authored-changes, Chromium

An agent ran this with Playwright on 2026-10-24.

  1. Open https://beta.platejs.org/examples/plite/authored-changes with the browser console open.
  2. Choose One media block in Sample document. Each view shows one gray block labeled Preview.
  3. In Proposed content, click the Preview block. It turns blue.
  4. Press Backspace. A card Alice · delete appears.
  5. Type x.
  6. Press Enter.
  7. Click Accept on the Alice · delete card. Both views are now empty.
  8. Click in the empty Proposed content box and type q.

In headless Chromium, step 5 throws Uncaught Error: Cannot find a descendant at path [0] in node: {"api":{},"id":"editor-3"} and inserts nothing. Step 6 does nothing and throws nothing. Step 8 throws Cannot get the start point in the node at path [] because it has no start text node., then the same path [0] error, and inserts nothing. The editor-<n> number in the message varies between runs. Playwright WebKit gives the same result.

Further replay results from the same session, in both engines:

  • Reject instead of Accept in step 7 brings the media block back. A click on it, then the right arrow key and z, inserts nothing and throws nothing. A fresh copy of the sample behaves the same way, so the media block alone gives no place to type.
  • After Accept, switching the right view to Edit and typing q throws again. Chromium throws the same two errors, and WebKit only the path [0] error.
  • Media at document end: select the media block, press Delete, type x, press Enter. The card Alice · delete appears, x goes to the end of AB, Enter adds a new line, and nothing throws.

Expected

After the media block is deleted, typing starts a new paragraph beside it and is recorded as a proposed insertion, or at least throws nothing. This is the expectation in the agent's notes from the first run. After the deletion is accepted, typing in the empty document starts a new paragraph. The same page takes typing after a media deletion when a paragraph sits beside the media block: Media at document end above, and Media at document start in the agent's first run, where the typed text went to the start of the next paragraph.

Actual

  • After the deletion, each typed letter throws Cannot find a descendant at path [0] in node: ... and nothing is inserted. Enter does nothing.
  • After Accept, a typed letter in Suggest throws Cannot get the start point in the node at path [] because it has no start text node. and the same path [0] error. In Edit it throws too. Nothing is inserted.
  • After Reject, the media block is back and typing beside it does nothing, as on a fresh copy of the sample.

Environment

  • Exact next commit/Beta package version: NOT_ENOUGH_INFO. The page does not show its build. The first run used Beta built from next 87b29efbfa, as the agent's notes say.
  • On 2026-10-24 an agent replayed Repro 1 on the live Beta in headless Chromium 149.0.7827.55 and in Playwright WebKit 26.5 (not Safari), driven by Playwright 1.61.0 on macOS with real mouse and key input. The sample was chosen with Playwright's selectOption. Both engines still throw.
  • An agent first found this on 2026-10-21 (PT), at natamox's request, in the Claude desktop app's built-in Chromium 152 on a desktop, with the same steps through Enter. That run did not record what happens after Accept or Reject; those results come from the 2026-10-24 replay.
  • On 2026-10-22 (PT) natamox retested the page by hand on top of these finds and reported no further problems.
  • Nobody has tried Safari itself, Firefox or a phone on this sample.

Caveat

From a reading of the code on next (a76732c3be), not checked with a debugger:

  • Cannot find a descendant at path ... comes from NodeApi.get in packages/plitejs/src/interfaces/node.ts:885-889, which throws when no node sits at the path. Which caller asks for [0] on a key press is not traced. The source of Cannot get the start point ... was not located.
  • The readout in the recording shows the stored document as media{delete}[""{delete}] after the deletion and as no blocks after Accept. An inference from this is that typing needs a text block to land in, this document has none, and nothing creates one.

Evidence

  • Repro 1: headless Chromium recording, 30 seconds, with an English step panel beside the page. A readout box at the bottom left, drawn by the test script, shows the count of uncaught page errors, each view's mode, the stored document and the pending cards. A red box above it, also drawn by the script, shows the last uncaught error. At 0:02 the sample switches to One media block, and the readout shows media[""]. At 0:05.2 the click selects the Preview block. At 0:07.6 Backspace adds the card Alice · delete, and the readout shows media{delete}[""{delete}]. At 0:10.2 x throws, and the count goes to 1. At 0:12.8 Enter changes nothing, and the count stays 1. At 0:15.4 Accept empties both views, the page shows Accepted 1 proposal., and the readout shows (no blocks). From 0:17.8 the click in the empty box and q throw two more errors, and the count reaches 3. The result shows from 0:21 to the end.
Repro 1 — Chromium, /examples/plite/authored-changes

https://github.com/user-attachments/assets/ca1cf941-4c83-4f40-a9d3-98e627f6481b

Related

  • #5274: Typing in a preview view of the Authored Changes example throws on every key.
  • #5275: In Preview proposed, a click past the end of a line with a pending insertion throws and the caret stays.
  • #5277: In Suggest, typing or deleting in a code block throws a schema error and records nothing.
  • #5282: Pending deletions of a mention or a media block, and pending splits and joins, show no mark in the text.
Lenguaje dominante
TypeScript
Estrellas
16.6k
Forks
993
Merge medio
20 h 21 min
PR fusionados (30 d)
60

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

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de udecode/plate

Todos los issues de udecode/plate

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.