Original local addition

A snapshot with context.

One reusable notice tells readers what is available, when it was captured, and how to try again. This pattern is an original local addition.

Extension collection

Release reading list

Every supported state

fresh

partial

stale

offline

error

permission

Component contract

Original addition Owner: local reference maintainer. The notice owns status presentation. Its consumer owns rows, request identity, pending state and permission decisions.

createSnapshotNotice({
  state = "fresh", capturedAt = null, visibleCount = 0,
  sourceHref, onRetry = null
}) -> HTMLElement

notice.update(partialProps)
notice.setPending(boolean)

sourceHref is required and accepts a validated sibling page/fragment or recorded official Raycast HTTPS URL. State, count, date, link and callback are checked before mutation; invalid inputs throw TypeError without creating unsafe content.

Parts: region, decorative status glyph, visible status, optional semantic date, source link, optional Retry and a separate polite update node. The root uses 16 px padding and gap, 8 px text spacing, a 1 px border and 8 px radius. Below 720 px, text and actions stack in source order.

Initial content is ordinary reading content. update announces one changed status; links and buttons remain outside the live node. setPending controls the same Retry button. Consumers set aria-busy, ignore repeated activation for 450 ms, then restore focus only if the user has not moved elsewhere. No automatic retry or timeout dismissal occurs.

Fresh is informational. Partial, stale, offline and error may offer Retry. Permission clears the consumer’s rows and count, hides Retry, and only offers official sign-in. A class or label change does not alter the consumer’s access guard.

Migration note

This additive component is proposed for local contract 1.1.0. Existing .feedback consumers and selectors remain valid. Optional future variants require a default and coverage for both current consumers. Removing a state or changing permission semantics requires a major contract version.

About this specimen

This is a local reconstruction of a public Raycast pattern. It demonstrates the interface contract; real accounts, installs and payments remain on the official product.

Icon contract