feat(render): gauge strip and checked line in the default inspect view - #43
Merged
Merged
Conversation
Four vital signs right under the header — cache hit, lock wait (naming the culprit query when sessions are blocked), rollbacks, and idle index bytes as a share of the database — each a 20-cell bar, a value and a one-word status driven by the finding that grades the same signal. Unmeasurable signals render dim with — and say why (thin sample, window < 15m, not measurable). The GOOD bullet list becomes a compact 'checked · queries · vacuum · …' line of the subsystems that were collected and produced no finding, wrapped with a hanging indent. Both are skipped under the schema profile, like GOOD was. Score, severity bullets, --full, --json, MCP, SARIF and the HTML report are unchanged. Footer ask hint now reads: pgbot ask "why is it slow?".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The default `pgbot inspect` view gets a four-row gauge strip right under the header, and the GOOD bullet list becomes a compact `checked · …` line. Score, CRITICAL/WARNING/NOTE bullets and the footer stay. `--full`, `--json`, MCP, SARIF and the HTML report are untouched.
```
connected · prod-eu-1 · postgres 16.3 · read-only · 6h window
cache hit [████████████████████] 99.2% ok
lock wait [████████████░░░░░░░░] 61.0% query 4f2a
rollbacks [██░░░░░░░░░░░░░░░░░░] 12.0% watch
idle idx [██████░░░░░░░░░░░░░░] 43.0 GiB review
checked · queries · vacuum · replication · checkpoints
· connections · settings · deadlocks
Database health: 82/100
```
The four gauges
Each row is a label, a 20-cell bar (rounded to the nearest cell, one-cell minimum for any non-zero value), a value, and a status word driven by the finding that grades the same signal — never a threshold of its own.
The checked line
Subsystems that were collected and produced no finding, fixed order: queries, indexes, vacuum, replication, checkpoints, connections, settings, wraparound, deadlocks. A subsystem whose gauge is already orange/red is left out so the line never contradicts the strip. Wraps whole items with an eight-space hanging indent. Skipped under the schema profile, like GOOD was.
Files