speced / speced/respec

respec pill (error)

Open
#5,355 2 comments 1 reaction 2 assignees View on GitHub

@marcoscaceres is already working on this.

Since Aug 11, 2026.

  • #5390 by @copilot-swe-agent — open
bug
Dominant language
JavaScript
Stars
806
Forks
434
Avg merge
1d 21h
Merged PRs (30d)
32

Description

Description of problem

Clicking on the error pill does not show a list. This goes wrong when the error is a string.

When the error is a string then firstElementChild and lastElementChild are both null, firstChild and lastChild contain text.
The part in ui.js that wants to show the list expects html (from objects) and should have an additional check.

  if (fragment.firstElementChild === fragment.lastElementChild) {

    li.append(
      .../** @type {Element} */ (fragment.firstElementChild).childNodes
    );

An alternative approach could be to get rid of string errors/warnings.

URL to affected spec or repo: https://geonovum.github.io/dso-cim-ow/

What happened (e.g., it crashed)?: Code crashes (developer console)

Expected behavior (e.g., it shouldn't crash): When clicking on the pill it should show a list (even for string messages).

Optional, steps to reproduce:

  1. leave out the mandatory sotd section (SotD paragraph).
  2. open the document and click on the red pill
  3. no list is shown

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.