File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,9 +99,9 @@ gatherAndClearHealthCheckThread someNode@(SomeNode node) = do
9999 _ -> return " Unknown"
100100
101101healthCheckIndicatorWidget :: Maybe (Async () , Int ) -> Widget n
102- healthCheckIndicatorWidget healthCheckThreadData =
103- case healthCheckThreadData of
104- Just (_, periodMicroseconds) ->
105- let diffTime = fromIntegral periodMicroseconds / 1_000_000 :: NominalDiffTime
106- in str ( " ⭮[ " <> show diffTime <> " ] " )
107- Nothing -> str " "
102+ healthCheckIndicatorWidget Nothing = str " "
103+ healthCheckIndicatorWidget ( Just (_, periodMicroseconds)) =
104+ -- Reserve a fixed 2-cell slot for the refresh glyph. Common terminal fonts
105+ -- draw ↻ wider than 1 cell (not reflected in our Unicode width table).
106+ hBox [ str " " , hLimit 2 (padRight Max (str " ↻ " )), str [ i |[#{diffTime}]|]]
107+ where diffTime = fromIntegral periodMicroseconds / 1_000_000 :: NominalDiffTime
You can’t perform that action at this time.
0 commit comments