fix: polish CLI table output - #39
Closed
N283T wants to merge 1 commit into
Closed
Conversation
- extractSnippet normalizes embedded whitespace (no more raw \n/\t in search) - table.Column.max_width caps per-column width (applied to Kind at 10) - renderBoxed shrink switched from proportional to greedy (largest-first)
Owner
Author
|
Closing unmerged. The tabular output approach doesn't fit mmCIF identifier data (20-40 char IDs don't pack into 80-col terminals without destructive truncation). Rolling back PR #38 entirely in a follow-up revert PR. |
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.
Summary
Three visual polish fixes found during live testing of #38:
extractSnippetnormalizes embedded whitespace — search result snippets no longer contain literal\n/\tor double spacesColumn.max_widthcaps per-column width; applied to the Kind column (category/item) at 10 so it stops getting squeezed tocat…when the Match column is longrenderBoxedshrink switched from proportional to greedy (largest-first) — narrow columns are preserved, excess is absorbed by whichever column is widestBefore / After
mmcif-dict search "electron density"(140 cols, fake tty):Before:
After:
Test plan
zig build test— 55 pass (52 prior + 3 new: whitespace normalization,max_widthcap, greedy shrink)uv run --script tests/test_smoke.py— 25 pass (unchanged)search "electron density"andrelations atom_sitein a fake tty — visible improvement, no regressionsOut of scope
Descriptiondedent sometimes fails when the source.dichas outlier lines (e.g. last line at col 0); median-indent heuristic is a separate follow-up