Repository navigation
v0.6.8 — a failure says why, a silent request gives up, and a save is never lost to a closing sheet
A request that fails now says why, from one closed set — and so whether a write went
through. failure is rejected when the server said no (nothing was done),
unreadable when it said yes but its reply couldn't be read (it was done), and timedOut,
networkError, offline or serverError when no answer came (unknown — check before
sending it again). onError reads it to choose: try a read again, report a refusal.
feed: DataSource [ url = "/api/feed", timeout = 20,
onError() { if (this.failure == "timedOut" || this.failure == "networkError") afterDelay(5000, () => this.fetch()) } ]
A request that goes silent — no connection, no reply, a gap in a reply that is arriving —
for timeout seconds is given up, so nothing waits forever and a form's pending
always ends. A Form says what a failure means for what it sent: "may or may not have been
saved" when no answer came, "that went through" when the reply couldn't be read. And while
a form inside a sheet, a dialog or a window is sending, the overlay's own ways of closing —
Escape, a press outside, a swipe — wait for the answer, which would otherwise land nowhere.
Live connections get the same vocabulary, and a retry that behaves: a Socket or
EventStream gives up a connection that never opens (connectTimeout) or has gone
silent (idleTimeout), names a WebSocket's closeCode, doesn't ask again after a
refusal, waits longer after each failure in a row, and dials at once when the network
comes back.
The flagship calendar is 171.0 KB gzipped at this tag.
Breaking: 3 changes to make — npx declare-changes app.declare lists the ones in your program.
Breaking changes
a request that goes silent waits forever → it gives up after timeout seconds
A DataSource request with nothing arriving for 60 seconds now fails with failure = timedOut. A long poll, a large upload or an endpoint that thinks for minutes says how long
it may take.
report: DataSource [ url = "/api/report", method = "POST", body = { { year: 2026 } } ]
report: DataSource [ url = "/api/report", method = "POST", body = { { year: 2026 } }, timeout = 300 ]
Docs: DataSource.timeout · DataSource.failure
Watch for: a request that used to succeed after more than a minute of silence now fails;
timeout = 0 waits without limit. A page cannot see an upload's progress, so a write's
wait includes sending its body.
a Form's failedMessage for every failure → a message for what the failure means
A form whose send got no answer says uncertainMessage ("may or may not have been
saved"), one sent while offline offlineMessage, and one the server took but whose reply
couldn't be read unreadableMessage. failedMessage is said when nothing was sent, or the
server refused without saying why.
f: Form [ failedMessage = "Couldn't save the entry." ]
f: Form [ failedMessage = "Couldn't save the entry.",
uncertainMessage = "No answer came back — check the list before saving again." ]
Docs: Form.uncertainMessage
Watch for: a form that set its own failedMessage shows the library's wording when the
network fails or a request times out; set the new messages in the program's words too.
a stream's retry waits the same each time → the wait grows, and a refusal isn't retried
retry is now the first wait: it doubles after each failure in a row, to a minute, and
starts over once a connection has stayed open. A refusal — a WebSocket's policy close, an
event stream's 4xx, a reply that is not an event stream — is not retried. A connection that
doesn't open in 30 seconds is given up.
live: Socket [ url = "wss://api.example.com/feed", retry = 2 ]
live: Socket [ url = "wss://api.example.com/feed", retry = 2, connectTimeout = 10, idleTimeout = 45 ]
Docs: Stream.retry · Stream.failure
Watch for: a stream that relied on retrying every few seconds through a long outage now
retries less often; one whose server refuses it now rests at failed. Read closeCode in
onClose for an application's own codes (4000–4999), and turn active off there to stop.
Smaller changes
- A
Controltakes its Space, Enter and arrows only while it has the focus. Since 0.6.7
they were bindings, and a key from a view inside a clickable control — Enter in a field in
a row — pressed the control. - Escape in an editor entered inside a list or grid reaches what the row holds, then the
list's own Escape, before it leaves the row; it left the row first. - A DOM focus on a view first shown after it was built — a screen reader's, a test
script's — reaches the focus service; the view's keys never reached it. - Only
layout = nullturns an inherited layout off: any other class-typed attribute set
at a use site (restoresFocusTo, a program's owneditor: Editor?) did, silently. - An override written at a use site inside another class may read through its own
classroot; it was refused (DECLARE7001) with a message pointing into the library. - A
DataGridrow with no record builds no cell over a null record: a cell class
reading its record crashed when filters left no rows. - A
DataSourceremoved while its write is in flight says so in development: the write
may be carried out, but its answer is lost. A read is stopped; a write superseded by a newer
fetch()is no longer stopped (stopping it would not un-send it). - A 304 keeps the value a source had; an empty 2xx is a
nullvalue, not a failure. - Docs: a
DataGrid's header stands above its box; a field'sonKeyDownhears Return only
afteronEnterhas run.