rueder frontend
    Preparing search index...

    Type Alias ServerEvent

    ServerEvent:
        | { data: Record<symbol, never>; event: "hello" }
        | { data: Record<symbol, never>; event: "resync" }
        | {
            data: { feed_id: number; last_seq: number; new: number };
            event: "articles";
        }
        | { data: { count: number; feed_id: number }; event: "updated" }
        | { data: { error: string | null; feed_id: number }; event: "feed" }
        | {
            data: {
                by: string | null;
                feed: FeedUnread | null;
                seq: number | null;
            };
            event: "reading";
        }
        | { data: { by: string
        | null }; event: "tree" }
        | { data: { by: string | null }; event: "labels" }
        | { data: { by: string | null }; event: "settings" }
        | { data: { by: string | null }; event: "rules" }
        | { data: { by: string | null }; event: "session" }
        | { data: { by: string | null }; event: "apps" }

    An event of GET /api/events as it goes over the connection: event is its name there and data what it carries, as JSON.

    Events are notices: one says what changed, and the browser loads what it shows of that anew.

    • hello: the connection is up, and what is loaded from now on misses nothing.
    • resync: the connection fell behind and missed events; load everything anew.
    • articles: a feed got new articles.
    • updated: articles of a feed were changed by their publisher and have a new version.
    • feed: a feed cannot be fetched any more (error says why) or can again (error is null).
    • reading: what the account has read or starred changed.
    • tree: folders or subscriptions changed.
    • labels, settings: they changed.
    • rules: filter rules changed. They hide articles and mark them as read, so the unread counts may have changed with them.
    • session: a session of the account ended.
    • apps: app passwords were made or revoked, or an app logged in with one for the first time.

    by is the name the tab that made the change gave itself in the header X-Rueder-Tab, if it did, so that a tab knows its own change when it comes back.