@metreeca/tile
    Preparing search index...

    Status board.

    The public place posts are put up on and taken down from: any source posts one, and any reader sees it.

    Posts, raises and clears the posts of the enclosing Board context, rendering again every component reading them through usePosts.

    interface Board {
        post(post: Partial<Post> & Pick<Post, "message">): Post;
        raise(issue: unknown): Post;
        clear(posts?: Some<Post>): void;
    }
    Index

    post

    • post(post: Partial<Post> & Pick<Post, "message">): Post

      Puts up a post.

      A post sharing the instance of one standing replaces it where it stands, so a source moving its operation on updates its post without moving it ahead of the others; any other post is put up last, dropping the oldest beyond the limit. A post standing as given changes nothing.

      Parameters

      • post: Partial<Post> & Pick<Post, "message">

        The post to put up, whose identity and status may be left out: a post with no instance is put up anew as a urn:uuid: URI, and one with no status has nothing to report beyond its message

      Returns Post

      The post as put up, identity included, so a source posts it again to tell how its operation moved on and clears it once it has nothing more to tell

    • Raises an unexpected issue.

      Puts up an issue nothing in the interface was prepared for, such as a broken script, a component failing to render or a rejection nobody attended, as a new post carrying it as problem details.

      An operation failing as operations may, such as an exchange the server rejected, is never raised: the source running it catches the failure and tells how its operation went with post, as a failure post carrying the problem details it caught, so the reader sees it as the outcome of that operation.

      The post tells from the shape of the issue what went wrong:

      • problem details, that is an object carrying at least one of type, title, status, detail, instance or report, are kept as they are, so an issue reported by success keeps the status and the explanation its source gave it, and make the post a failure: an operation that did not complete
      • an Error becomes status 0, with its name as title and its message as detail, the stack left out as a post is expected to travel beyond the page that raised it, and makes the post a defect
      • anything else becomes status 0, carried as report if it is JSON data and as detail otherwise, and makes the post a defect as well, being a value the interface threw rather than one it reported on purpose

      Every failed exchange reaches the board as problem details through success, transport failures included, so a rejection nobody attended is still told as the failure it was, and defect is left to whatever the interface threw on its own account; a client lacking that middleware has its transport failures stated as defects, since they reach the board as plain errors rather than as problem details.

      The post carries the explanation of the problem as its message, or failing that its summary, and a standing English wording where the problem states neither.

      Every issue counts as a new one: raising the same issue twice leaves two posts, each with an instance of its own, because two failed attempts are not one.

      Parameters

      • issue: unknown

        The issue as it was caught

      Returns Post

      The post as raised, identity included, so a source clears it once the issue is settled

    • Clears posts.

      Clears the given posts alone, by their identity whatever they last carried, leaving those other sources put up, and ignores any already cleared.

      Parameters

      • Optionalposts: Some<Post>

        The posts to clear; every post standing if omitted

      Returns void