Skip to content

ServerConnection.DotStatus is a fourth copy of the four-word status ladder #2458

Description

@erikdarlingdata

Split out of #2452 so it does not close with part 1 (#2457, which bands the Overview card's Last Collect row).

The mechanism

Lite/Models/ServerConnection.cs:199 computes "Unknown" | "Online" | "Warning" | "Offline" from its own (IsOnline, HasCollectorErrors) pair, for the sidebar row's dot:

public string DotStatus
{
    get
    {
        if (IsOnline == true)
            return HasCollectorErrors == true ? "Warning" : "Online";
        if (IsOnline == false)
            return "Offline";
        return "Unknown"; // null — not yet checked
    }
}

That is the same four-word ladder the Overview card derives, on a different type, on a different surface, from a different instance of the same flag pair — so the sidebar and the card can say different things about the same server and nothing would notice. It also has no tooltip, which is the #2422 complaint one surface over.

Why it was not done alongside part 1

#2452 argued the two belonged together because "a freshness band would otherwise need writing twice." That reason did not survive the implementation. #2457 writes the band once, on ServerSummaryItem, and does not touch the sidebar dot — so nothing is duplicated by leaving this alone, and nothing about landing part 1 first makes this harder.

The reason that does argue for a separate change: the type DotStatus should collapse onto is Lite's ServerCardStatus, and that type arrives in #2451, which is open. Doing it inside #2457 would have meant either a second copy of that enum or stacking on an unmerged branch — and a stacked PR triggers only check-pr-branch and reports a meaningless green.

So this is blocked on #2451 merging, not on #2457.

What settling it looks like

  1. DotStatus renders ServerCardStatus rather than deriving its own ladder, the way Say why Lite's card is amber, and which axis the word is about (#2437) #2451 made the card's word, colour and border all render one discriminant. The whole point of that collapse, per Say why the card is amber, and give "+52 more" somewhere to go (#2424) #2429: with a single discriminant there is no flag combination left for the renderings to disagree about.
  2. The dot gets the tooltip the card's dot got in Say why Lite's card is amber, and which axis the word is about (#2437) #2451 — same signal, same vocabulary, and the sidebar dot is the thing a reader points at first.
  3. A pin that the pair has one reader, in the shape Say why Lite's card is amber, and which axis the word is about (#2437) #2451 already established: Assert.Equal(1, CountOccurrences(source, "IsOnline switch")). That assertion is what would have caught Say why Lite's card is amber, and which axis the word is about (#2437) #2451's own overclaim when it was written.

The open question

ServerConnection carries no LastCollectionTime, so the sidebar dot cannot band freshness the way the card now does without a new data path into RefreshServerList / CheckConnectionsAndNotify. Two honest answers:

  • Unify the ladder only, and accept that the sidebar dot answers the connection question while the card answers all three. Cheap, and it removes the drift that is the actual defect here.
  • Plumb LastCollectionTime to the sidebar too, so the two surfaces answer the same set of questions. Larger, and it wants a measurement first: whether anyone triages from the sidebar dot rather than opening the Overview.

The first is what this issue is asking for. The second should be its own issue if the first one lands and the gap still bites.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions