Align report tables, format timestamps, and fix help typos - #2169
Open
ArturWieczorek wants to merge 3 commits into
Open
Align report tables, format timestamps, and fix help typos#2169ArturWieczorek wants to merge 3 commits into
ArturWieczorek wants to merge 3 commits into
Conversation
ArturWieczorek
force-pushed
the
artur/fix-dbtool-report-cosmetics
branch
from
July 16, 2026 17:04
add3ff7 to
0762536
Compare
ArturWieczorek
marked this pull request as ready for review
July 16, 2026 18:45
Report timestamps are rendered with the default Show of UTCTime, which keeps sub-second noise and is not a fixed width. Add a tool test suite and assert formatReportTime yields a uniform, second-precision string; the placeholder implementation added here fails it, and the fix follows in the next commit.
Report tables used hardcoded header/underline literals and printed the address column unpadded, so any value wider than the header shifted every later column; one underline literal also had a stray space. Timestamps were rendered with the default Show of UTCTime, keeping sub-second noise. Add a renderTable helper that sizes each column to the widest of its header and cells, and a formatReportTime that renders a uniform second-precision timestamp; route the balance, latest, history and transaction reports through them. Fix the help-text typos (histiory/fof/gievn), the utxo-set 'paritioning' typo, and rename the misspelled coaleseTxs. leftPad/rightPad now pad via Text.replicate so an over-wide value no longer silently drops its padding.
Complete the misspelled-identifier rename missed on the first pass (coaleseInputs/coalese -> coalesceInputs/coalesce), and set the balance report's total row off with a divider again, reusing the header underline so it stays aligned with the data-driven column widths.
ArturWieczorek
force-pushed
the
artur/fix-dbtool-report-cosmetics
branch
from
July 29, 2026 09:12
0762536 to
7c7e537
Compare
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.
Closes #2164.
The
reporttables were built from hardcoded header and underline string literals, and the address column was printed unpadded. Any value wider than the header - a 59-to-63 character bech32 stake address is the usual culprit - pushed every following column out of line, and one underline literal even carried a stray space. Timestamps were rendered with the defaultShowofUTCTime, so a row with sub-second precision was wider than one without, shifting the date column too.This adds a small
renderTablehelper that sizes each column to the widest of its header and its cells, and aformatReportTimethat renders a uniform second-precision timestamp. The balance, latest, history, and transaction reports all go through them, so the tables stay aligned regardless of address length or timestamp fractions. As a side effectleftPad/rightPadnow pad withText.replicateinstead of slicing a fixed 56-character literal, which quietly removes an old truncation limit. While here I also fixed the user-facing help typos (histiory,fof the gievn), theutxo-setparitioningtypo, and the misspelledcoaleseTxshelper.The first commit stands up the first
cardano-db-tooltest suite and adds a failing test; the rest implement the fix. The suite coversformatReportTime(uniform, second-precision) andrenderTable(every line the same width, no stray spaces in the underline). All three report tables were also checked end to end against a live local db-sync database - balance, rewards history, and transactions all line up with clean timestamps.Marked WIP/draft pending review of the same author's related db-tool fixes (#2166, #2168) and any Address-variant test coverage.