fix(ps): render ps --extended as vertical detail blocks - #3892
Open
halorgium wants to merge 1 commit into
Open
Conversation
The extended (ps -x) output used a wide 14-column hux.table. On any terminal narrower than the full table, cells wrapped down to a few characters each, shredding dyno UUIDs, timestamps, and IPs vertically and making the output unreadable. Render one vertical detail block per dyno via hux.styledObject under a styled header, matching the style of `releases:info` and other detail views. Nothing wraps at any width, the full command is shown rather than truncated, and null fields (e.g. Private Space dynos without an AZ/route) are omitted instead of printing empty columns. The --no-wrap flag existed only to mitigate this table's wrapping and was passed solely to the extended renderer, so it is removed here along with its now-unused truncate helper. The flag remains available on the other commands that use it.
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.
Problem
The extended
ps -xoutput rendered a wide 14-columnhux.table. On any terminal narrower than the full table width — which is nearly always, given it packs dyno UUIDs, timestamps, IPs, routes, and a newFleetcolumn — every cell wrapped down to a few characters, shredding each value vertically:The existing
--no-wrapflag only truncated instead of wrapping, and it was opt-in — so the default experience stayed unreadable.Fix
Render one vertical detail block per dyno using
hux.styledObjectunder a styled header — the same pattern asreleases:infoand other detail views:Benefits:
Removed
--no-wrapfrompsThat flag existed only to mitigate this table's wrapping and was passed solely to the extended renderer. With vertical blocks it's dead code on this command, so it's removed here (along with the now-unused
truncatehelper). The flag remains available on the other commands that use it (addons,domains,pg:credentials,data:pg:credentials).Testing
test/unit/commands/ps/index.unit.test.tsto the block format, and removed the obsolete--no-wrappass-through test. All 18psunit tests pass.npm run build,tsc --noEmit, andeslintare clean (one pre-existing lint warning on unrelatedprintDynoscode).docs/ps.mdviaoclif readme.Note
This targets the
pscommand in this repo.