Repository: fujiapple852/trippy (language: rust)

Issue:
Document meanings of status colours
I can see from https://github.com/fujiapple852/trippy/blob/a3e53bed5bc41e725e5417077885d770f6534c18/src/frontend/render/table.rs#L212-L219 the names of the conditions needed for each status colour.

The "is target" condition is explained here https://github.com/fujiapple852/trippy/blob/a3e53bed5bc41e725e5417077885d770f6534c18/src/backend/trace.rs#L47-L52

Would be nice to add a short section to the docs explaining these colours.


Discussion / hints:
Hi @tomviner,

Yes I agree this should be documented.  Maybe also shown in the help dialog box of the TUI?

For background; The above was only every intended as a placeholder until some more comprehensive status logic could be written, but alas I haven't attempted that yet.  This came up recently as part of a [HN discussion](https://news.ycombinator.com/item?id=38588858) and I created #860 on the back of that discussion to explore ideas.
That's how life goes, don't stress. There's only 24 hours in each day.

Fix patch:
diff --git a/README.md b/README.md
index 7dbf5d6be..bf6622259 100644
--- a/README.md
+++ b/README.md
@@ -22,6 +22,7 @@ issues.
     * [Usage Examples](#usage-examples)
     * [Command Reference](#command-reference)
     * [Theme Reference](#theme-reference)
+    * [Column Reference](#column-reference)
     * [Key Bindings Reference](#key-bindings-reference)
     * [Configuration Reference](#configuration-reference)
     * [Frequently Asked Questions](#frequently-asked-questions)
@@ -772,6 +773,35 @@ command line option.
 The supported modifiers are: `shift`, `ctrl`, `alt`, `super`, `hyper` & `meta`. Multiple modifiers may be specified, for
 example `ctrl+shift+b`.
 
+## Column Reference
+
+The below table lists the columns that are available for display in the Tui. These can be overridden with the
+`--tui-custom-columns` command line option or in the `tui-custom-columns` attribute in the `tui` section of the
+configuration file.
+
+| Column  | Code | Description                                                                                                                                                                                                                                                                                                                                           |
+|---------|------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `#`     | `h`  | The time-to-live (TTL) for the hop                                                                                                                                                                                                                                                                                                                    |
+| `Host`  | `o`  | The hostname(s) and IP address(s) for the host(s) for the hop<br/>May include AS info, GeoIp and ICMP extensions<br/>Shows full hop details in hop detail navigation mode                                                                                                                                                                             |
+| `Loss%` | `l`  | The packet loss % for the hop                                                                                                                                                                                                                                                                                                                         |
+| `Snd`   | `s`  | The number of probes sent for the hop                                                                                                                                                                                                                                                                                                                 |
+| `Recv`  | `r`  | The number of probe responses received for the hop                                                                                                                                                                                                                                                                                                    |
+| `Last`  | `a`  | The round-trip-time (RTT) of the last probe for the hop                                                                                                                                                                                                                                                                                               |
+| `Avg`   | `v`  | The average RTT of all probes for the hop                                                                                                                                                                                                                                                                                                             |
+| `Best`  | `b`  | The best RTT of all probes for the hop                                                                                                                                                                                                                                                                                                                |
+| `Wrst`  | `w`  | The worst RTT of all probes for the hop                                                                                                                                                                                                                                                                                                               |
+| `StDev` | `d`  | The standard deviation of all probes for the hop                                                                                                                                                                                                                                                                                                      |
+| `Sts`   | `t`  | The status for the hop:<br/>- 🟢 Healthy hop<br/>- 🔵 Non-target hop with packet loss (does not necessarily indicate a problem)<br/>- 🟤 Non-target hop is unresponsive (does not necessarily indicate a problem) <br/>- 🟡 Target hop with packet loss (likely indicates a problem)<br/>- 🔴 Target hop is unresponsive (likely indicates a problem) |
+| `Jttr`  | `j`  | The round-trip-time (RTT) difference between consecutive rounds for the hop                                                                                                                                                                                                                                                                           |
+| `Javg`  | `g`  | The average jitter of all probes for the hop                                                                                                                                                                                                                                                                                                          |
+| `Jmax`  | `x`  | The maximum jitter of all probes for the hop                                                                                                                                                                                                                                                                                                          |
+| `Jint`  | `u`  | The smoothed jitter value of all probes for the hop                                                                                                                                                                                                                                                                                                   |
+
+The default columns are `holsravbwdt`.
+
+> [!NOTE]
+> The columns will be shown in the order specified in the configuration.
+
 ## Configuration Reference
 
 Trippy can be configured with via command line arguments or an optional configuration file. If a given configuration
diff --git a/trippy-config-sample.toml b/trippy-config-sample.toml
index 6b7aec7b7..48e80d936 100644
--- a/trippy-config-sample.toml
+++ b/trippy-config-sample.toml
@@ -244,19 +244,26 @@ tui-as-mode = "asn"
 
 # Custom columns to be displayed in the TUI hops table.
 #
-# Allowed values are:
-#
-#   H - Ttl
-#   O - Hostname
-#   L - Loss %
-#   S - Probes sent
-#   R - Responses received
-#   A - Last RTT
-#   V - Average RTT
-#   B - Best RTT
-#   W - Worst RTT
-#   D - Stddev
-#   T - Status
+# Default values:
+#
+#   h - Ttl
+#   o - Hostname
+#   l - Loss %
+#   s - Probes sent
+#   r - Responses received
+#   a - Last RTT
+#   v - Average RTT
+#   b - Best RTT
+#   w - Worst RTT
+#   d - Stddev
+#   t - Status
+#
+# Also avilable:
+#
+#   j - Jitter
+#   g - Jitter average
+#   x - Jitter max
+#   i - Jitter intra
 #
 # The columns will be shown in the order specified.
 tui-custom-columns = "holsravbwdt"


Test patch: