Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v7.0.1

- uses: jdx/mise-action@v5.4.0
- uses: jdx/mise-action@v5.5.0

- name: mise run install
run: mise run install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
exit 1
fi

- uses: jdx/mise-action@v5.4.0
- uses: jdx/mise-action@v5.5.0

- name: mise run install
run: mise run install
Expand Down
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ All notable changes to `@standards-lab/web-components` are documented here. The
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the package adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.5.0] - 2026-12-02

This minor release breaks no consumer: the foundation peer stays `^0.5.0`, and every field it adds
is optional, so a stage or an event that leaves them out shows as it did.

### Added

- `sl-stage-timeline`'s stage gains `startedAt`, `attempt`, and `note`. Given a `startedAt`, a
complete or failed stage shows its duration to its `completedAt` or `failedAt`, and an active
stage the time elapsed, ticking each second, by the foundation's `formatDuration` in its digital
style; a start that doesn't parse, or a complete or failed stage's start after its end, shows
none. An `attempt` above 1 shows as "Attempt n". A `note` shows on its own row under the detail
line, above a failed stage's reason, and wraps to the timeline's width without widening it; a
blank note shows nothing. The duration and the attempt each hold a slot in every stage, so a
stage that ticks or reaches a later attempt moves nothing, and the timeline runs one timer, only
while it is connected and an active stage has a valid start.
- `sl-event-log`'s event gains `extensions`, a map of CloudEvents extension attribute names to
their string values. Each shows under the source, subject, and id, in name order, on a line of
its own labelled by its name, the name and the value each cut with an ellipsis when longer than
the line, as the subject and the id are, without widening the log. An extension whose value
isn't a non-empty string shows nothing, nor does an empty map. The event log specimen shows an
event with many long extensions.

### Changed

- The repository's tooling takes claude-plugins 0.26.0 and chrome-headless-shell 158.0.8127.91,
the foundation's development pin is its v0.5.1 tag, and the workflows take jdx/mise-action
v5.5.0.

## [0.4.0] - 2026-12-01

This minor release breaks a consumer on web-foundation 0.4: the foundation peer is `^0.5.0`. It
Expand Down Expand Up @@ -160,6 +189,7 @@ that measured or padded around them checks its layout.
- Releases by tag: each `v<version>` tag marks a pack commit whose tree is the pack, the build
included, and whose one parent is main's merge commit; its GitHub release carries the tarball.

[0.5.0]: https://github.com/standards-lab/web-components/releases/tag/v0.5.0
[0.4.0]: https://github.com/standards-lab/web-components/releases/tag/v0.4.0
[0.3.0]: https://github.com/standards-lab/web-components/releases/tag/v0.3.0
[0.2.0]: https://github.com/standards-lab/web-components/releases/tag/v0.2.0
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ and the components share one copy of each, and a restyle of the foundation's she
name reaches the components' shadow roots too. Install all three by their tags:

```
pnpm add github:standards-lab/web-components#v0.4.0 github:standards-lab/web-foundation#v0.5.0 github:standards-lab/web-icons#v0.1.0
bun add github:standards-lab/web-components#v0.4.0 github:standards-lab/web-foundation#v0.5.0 github:standards-lab/web-icons#v0.1.0
npm install --allow-git=root github:standards-lab/web-components#v0.4.0 github:standards-lab/web-foundation#v0.5.0 github:standards-lab/web-icons#v0.1.0
pnpm add github:standards-lab/web-components#v0.5.0 github:standards-lab/web-foundation#v0.5.1 github:standards-lab/web-icons#v0.1.0
bun add github:standards-lab/web-components#v0.5.0 github:standards-lab/web-foundation#v0.5.1 github:standards-lab/web-icons#v0.1.0
npm install --allow-git=root github:standards-lab/web-components#v0.5.0 github:standards-lab/web-foundation#v0.5.1 github:standards-lab/web-icons#v0.1.0
```

npm 12 refuses git dependencies unless `--allow-git` allows them; `root` allows the ones the
Expand Down
26 changes: 18 additions & 8 deletions docs/components.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,14 @@ the tests measure as they do.
loading note; a text type given a Blob shows as empty, as `""` does.
- `./event-log.js`: `sl-event-log`, events as a log in the order given, each its type, its time by
the foundation's `formatDateTime` when it has one, its source, subject, and id, each labelled on
a line of its own, and its data pretty-printed in a native details, collapsed; events appended
leave those shown in place, and a constrained log scrolls inside, following the newest only from
its end. It exports its event type, a CloudEvents subset, and sends no event.
a line of its own, then its `extensions`, CloudEvents extension attributes given as a map of
names to strings, each on a line of its own labelled by its name, in name order, so every event
lists them alike whatever order its map was written in; a subject, an id, and an extension's
name and value longer than the line are cut with an ellipsis, whole in their titles, and an
extension whose value isn't a non-empty string, or an empty map, shows nothing. Its data shows
pretty-printed in a native details, collapsed; events appended leave those shown in place, and a
constrained log scrolls inside, following the newest only from its end. It exports its event
type, a CloudEvents subset, and sends no event.
- `./search-results.js`: `sl-search-results`, a search's matches under a status line, each a
native button of its document's name, the field it matched in, and its snippet, marked
case-insensitively as text for the query the matches were set with; its count names that query
Expand Down Expand Up @@ -179,11 +184,16 @@ the tests measure as they do.
`upload-cancel` with an upload's id. It exports its upload type and binds no key.
- `./stage-timeline.js`: `sl-stage-timeline`, a run's stages as a connected, ordered list of
steps in their positions' order, each its name, its state's label and marker, and its time by
the foundation's `formatDateTime`, a complete stage's `completedAt` or a failed one's `failedAt`;
a failed stage's `reason` shows under its label, part of its step for assistive technology, and
wraps to the timeline's width without widening it. The active stage is the current step, and a
stage that advances changes in place, moving nothing. It exports its stage type, holds nothing
focusable, and sends no event.
the foundation's `formatDateTime`, a complete stage's `completedAt` or a failed one's `failedAt`.
Given a `startedAt`, a complete or failed stage shows its duration to that time, and an active
one the time elapsed, ticking each second, by the foundation's `formatDuration` in its digital
style; a start that doesn't parse, or that comes after a complete or failed stage's end, shows
none. An `attempt` above 1 shows as "Attempt n". A `note` shows on its own row under the detail
line, and a failed stage's `reason` under that;
both are part of the step for assistive technology and wrap to the timeline's width without
widening it. The active stage is the current step, and a stage that advances or ticks changes in
place, moving nothing. It runs one timer, only while connected and an active stage has a valid
start. It exports its stage type, holds nothing focusable, and sends no event.

## Sheets

Expand Down
12 changes: 12 additions & 0 deletions docs/internals.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ each sheet is laid out as it is.

- The time shows to the second, as the stage timeline's does, since a run's events arrive seconds
apart.
- Extensions sort by name, compared by UTF-16 code unit rather than by locale, so the order is the
same on every page and whichever producer wrote the map.
- A string datum shows as it is, since text data reads as text; a bigint as its digits; and a value
JSON can't write, a circular object or a function, as its `String()`.

Expand Down Expand Up @@ -168,6 +170,16 @@ each sheet is laid out as it is.

- The time slot holds hidden a time as wide as any the format writes in the page's locale, a
two-digit day and hour, so a stage that completes shows its time in space already there.
- The duration slot holds hidden the longest duration under a day, `23:59:59` in the digital
style, and the attempt slot `Attempt 99`; a duration of a day or more, or an attempt past 99,
widens its own slot. Every stage reserves both slots, so a narrow timeline's detail line may
wrap to a second line before either fills.
- An active stage's elapsed time is clamped at zero, so a start a little ahead of the page's clock
shows `0:00:00`; a complete or failed stage whose start comes after its end shows no duration.
- The timer is one `setInterval` of a second that requests an update; `updated` and
`connectedCallback` start it when an active stage has a valid start and it isn't running, and
`updated` and `disconnectedCallback` stop it otherwise. Each render reads the clock once, so every
active stage ticks together.
- The stages sort by position with a stable sort, so equal positions keep the given order, and each
step is keyed by its name.

Expand Down
23 changes: 14 additions & 9 deletions docs/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ layout each one promises.
name's line only when the two don't fit side by side, and a short name never wraps it in a parent
sized to the content.
- A slot that must not change width as its text changes (the composer's action, the stage
timeline's label and time) stacks every text it may show in one grid cell, the ones not shown
`visibility: hidden`, so it is as wide as the widest.
timeline's label, time, duration, and attempt) stacks every text it may show in one grid cell,
the ones not shown `visibility: hidden`, so it is as wide as the widest.
- A visually hidden name (the composer's label, the entry's kind, the drawer's Close label) is a
one-pixel absolute box clipped to nothing, so it takes no row and no gap.
- `field-sizing` is Baseline newly available, as the foundation's `.field-grow` notes. Without it
Expand Down Expand Up @@ -100,9 +100,10 @@ layout each one promises.
value, and the larger step between pairs keeps each label grouped with its own value.
- The step between pairs is each pair's margin, not the metadata's gap, because the metadata is the
container the query reads, and a container query styles only what is inside its container.
- A subject or an id longer than its line is cut with an ellipsis inside its own value, which
neither scrolls nor takes focus; its whole text stays in the DOM for selection, copying, and a
screen reader.
- A subject, an id, or an extension's name or value longer than its line is cut with an ellipsis
inside its own box, which neither scrolls nor takes focus; its whole text stays in the DOM for
selection, copying, and a screen reader. Each label and value is held to the pair's width, so a
label that sits over its value at a narrow width is cut too rather than widen the log.

## Chat thread

Expand Down Expand Up @@ -154,13 +155,17 @@ layout each one promises.
## Stage timeline

- Each step is a grid of the marker's column and the text's, its rows the name, the detail line, a
failed stage's reason, and a gap; the connector spans the last three in the marker's column, so it
runs past a failed step's reason. The last step has no connector and no gap.
note, a failed stage's reason, and a gap; the connector spans the last four in the marker's
column, so it runs past a step's note and reason. The last step has no connector and no gap.
- A pending stage's name recedes by color alone, so it keeps its width.
- The active marker's ring is painted, never laid out, so it moves nothing; under reduced motion the
tinted marker alone reads as in progress.
- A failed stage's reason contains its inline size, so it wraps to the column the names and detail
lines set and never widens the timeline. Its muted color leaves the failure's hue to the label.
- A note and a failed stage's reason each contain their inline size, so they wrap to the column the
names and detail lines set and never widen the timeline. Their muted color leaves the failure's
hue to the label.
- The detail line wraps between its slots, never inside one: every stage reserves the duration and
attempt slots, so at a narrow width the line may take a second row before either fills, and a
stage that ticks or reaches a later attempt moves nothing.

## Entry

Expand Down
17 changes: 16 additions & 1 deletion examples/event-log.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,17 @@
{ ...run[3], id: "kinds.4", type: "emulator.run.chunks", data: [{ index: 0, tokens: 512 }, { index: 1, tokens: 488 }] },
{ ...run[4], id: "kinds.5", type: "emulator.run.ping", subject: null, data: undefined },
];
const extended = run.slice(0, 2).map((event, index) => ({
...event,
extensions: {
layer: "pipeline.stage.ingestion.document-processing.extraction-and-chunking",
correlationid: `${runs[0][0]}.${runs[0][1]}.correlation`,
causationid: index ? run[0].id : `${runs[0][1]}.upload.received.by-the-gateway`,
traceparent: `00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01.${event.id}`,
partitionkeyforthedocumentstore: `tenant-a/collection-b/${runs[0][1]}`,
dataref: "https://storage.example.invalid/runs/0193a5c2-7e4b-7c1d-9f2a-3b4c5d6e7f80/stages/upload/payload.json",
},
}));

const log = (fields, open = () => false) => () => {
const element = make("sl-event-log", fields);
Expand Down Expand Up @@ -80,6 +91,10 @@
label: "Every kind of data, opened: an object, a string, null, an array, and none",
build: log({ events: kinds }, () => true),
},
{
label: "Extensions, many and long: each labelled under the id, in name order, cut on its line",
build: log({ events: extended }),
},
{
label: "Many events: three runs', held to 16rem by the page, scrolling inside the log",
build: log({ events: many, className: "held" }),
Expand All @@ -105,7 +120,7 @@
<h1>Event log</h1>
<p>
<code>sl-event-log</code>, events in order as a log, each its type, time, source, subject,
and id, its data on demand, in each of its states.
id, and extensions, its data on demand, in each of its states.
</p>

<section id="states">
Expand Down
49 changes: 47 additions & 2 deletions examples/stage-timeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,57 @@
: stage,
);

const starts = [
"2026-10-29T15:42:00Z",
"2026-10-29T15:42:07Z",
"2026-10-29T15:42:09Z",
"2026-10-29T15:42:16Z",
"2026-10-29T15:42:31Z",
];
const timed = (stages) =>
stages.map((stage) =>
stage.state === "complete" || stage.state === "failed"
? { ...stage, startedAt: starts[stage.position - 1] }
: stage,
);
const failedNoted = timed(failed).map((stage) =>
stage.state === "failed"
? {
...stage,
attempt: 2,
note:
"Second attempt, after the first stopped when the extractor's worker restarted; the upload at /var/lib/pipeline/uploads/0193a5d2-7c10-7e4f-9a1b-2c3d4e5f6071/fail-at-extraction.txt was read again from the start",
reason:
'emulated failure: the document\'s name matches the fail rule "fail-at-*:extraction"; the extractor gave up after reading /var/lib/pipeline/uploads/0193a5d2-7c10-7e4f-9a1b-2c3d4e5f6071/fail-at-extraction.txt and three retries',
}
: stage,
);
const running = timed(partWay).map((stage) =>
stage.state === "active"
? {
...stage,
startedAt: new Date(Date.now() - 134_000),
attempt: 3,
note: "Retrying after two timeouts",
}
: stage,
);

const timeline = (stages) => () => make("sl-stage-timeline", { stages });
specimens([
{ label: "All pending: the run has not started", build: timeline(pending) },
{ label: "Part way: two complete, extraction in progress", build: timeline(partWay) },
{ label: "Complete: every stage, each with its time", build: timeline(complete) },
{ label: "Failed: extraction failed after two completed, with its time and reason", build: timeline(failed) },
{ label: "Durations: each finished stage with how long it took", build: timeline(timed(complete)) },
{
label: "Failed at attempt 2, with a long note and a long reason",
build: timeline(failedNoted),
},
{
label: "Running: extraction at attempt 3, its clock ticking from a start 2:14 before the page loaded",
build: timeline(running),
},
]);
const fit = (label, parent) => ({
label,
Expand All @@ -79,8 +124,8 @@
<h1>Stage timeline</h1>
<p>
<code>sl-stage-timeline</code>, a run's stages as a connected list of steps, each its name,
its state, and when it completed or failed, a failed stage with why, in each of the run's
states.
its state, when it completed or failed, how long it took or has taken, its attempt past the
first, a note, and a failed stage with why, in each of the run's states.
</p>

<section id="states">
Expand Down
6 changes: 3 additions & 3 deletions mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
task.run_auto_install = false

[tools]
"github:standards-lab/claude-plugins" = { version = "0.25.0", version_prefix = "marathon/v" }
"github:standards-lab/claude-plugins" = { version = "0.26.0", version_prefix = "marathon/v" }
actionlint = "1.7.12"
node = "26.14.0"
pnpm = "12.25.1"
shellcheck = "0.11.0"
"github:microsoft/typescript-go" = { version = "7.0.2", version_prefix = "typescript/v", bin_path = "package/lib" }

[tools."http:chrome-headless-shell"]
version = "158.0.8127.88"
version = "158.0.8127.91"
version_list_url = "https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json"
version_json_path = ".channels.Stable.version"

[tools."http:chrome-headless-shell".platforms]
linux-x64 = { url = "https://storage.googleapis.com/chrome-for-testing-public/{{ version }}/linux64/chrome-headless-shell-linux64.zip", checksum = "sha256:63401333cc587645bfaeea7f0c90958b327d249251e23954a47f30112ca23d5b", size = "132091593" }
linux-x64 = { url = "https://storage.googleapis.com/chrome-for-testing-public/{{ version }}/linux64/chrome-headless-shell-linux64.zip", checksum = "sha256:95fd6e7f5c7244545102abd33ae7a01b58d84e19e646416a5a50f34d13c92a01", size = "132090545" }

[tasks.build]
description = "Build src/ into dist/: tsc's emit, with the .css beside it"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@standards-lab/web-components",
"version": "0.4.0",
"version": "0.5.0",
"license": "Apache-2.0",
"type": "module",
"files": [
Expand All @@ -24,7 +24,7 @@
"devDependencies": {
"@eslint-community/eslint-plugin-eslint-comments": "4.8.1",
"@eslint/js": "10.0.1",
"@standards-lab/web-foundation": "github:standards-lab/web-foundation#v0.5.0",
"@standards-lab/web-foundation": "github:standards-lab/web-foundation#v0.5.1",
"@standards-lab/web-icons": "github:standards-lab/web-icons#v0.1.0",
"@standards-lab/web-tooling": "github:standards-lab/web-tooling#v0.2.1",
"@types/node": "26.6.11",
Expand Down
Loading