Skip to content

fix(ps): render ps --extended as vertical detail blocks - #3892

Open
halorgium wants to merge 1 commit into
mainfrom
fix-ps-extended-vertical
Open

fix(ps): render ps --extended as vertical detail blocks#3892
halorgium wants to merge 1 commit into
mainfrom
fix-ps-extended-vertical

Conversation

@halorgium

@halorgium halorgium commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Problem

The extended ps -x output rendered a wide 14-column hux.table. On any terminal narrower than the full table width — which is nearly always, given it packs dyno UUIDs, timestamps, IPs, routes, and a new Fleet column — every cell wrapped down to a few characters, shredding each value vertically:

  ID   Process   State   Region   Execution     Fleet   Instance   IP   Port   AZ   Release   Command   Route   Size
                                  Plane
 ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  00   web.1     up      us       ex01          exam    0000000    10   0000   us   1         example   0000a   Stan
  00             0000/                          ple-1              .0   0      -e             -comman   000-0   dard
  ...

The existing --no-wrap flag 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.styledObject under a styled header — the same pattern as releases:info and other detail views:

=== web.1 (Standard-1X)
ID:              00000000-0000-0000-0000-000000000000
State:           up 0000/00/00 00:00 (~00m ago)
Release:         1
Command:         example-command as t-0000
Region:          us
Execution Plane: example-plane
Fleet:           standard-1x
Instance:        0000000.0.0.00
IP:              10.0.0.0
Port:            00000
AZ:              us-example-0a
Route:           00000000-0000-...

Benefits:

  • Never wraps at any terminal width.
  • Full command shown rather than truncated to 35 chars.
  • Null fields omitted — Private Space dynos without an AZ/route/port no longer print empty columns; those keys simply don't appear.

Removed --no-wrap from ps

That 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 truncate helper). The flag remains available on the other commands that use it (addons, domains, pg:credentials, data:pg:credentials).

Testing

  • Updated the three extended-output assertions in test/unit/commands/ps/index.unit.test.ts to the block format, and removed the obsolete --no-wrap pass-through test. All 18 ps unit tests pass.
  • npm run build, tsc --noEmit, and eslint are clean (one pre-existing lint warning on unrelated printDynos code).
  • Regenerated docs/ps.md via oclif readme.

Note

This targets the ps command in this repo.

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.
@halorgium
halorgium requested a review from a team as a code owner August 27, 2026 23:12
@halorgium
halorgium deployed to AcceptanceTests August 27, 2026 23:12 — with GitHub Actions Active
@halorgium
halorgium deployed to AcceptanceTests August 27, 2026 23:12 — with GitHub Actions Active
@halorgium
halorgium deployed to AcceptanceTests August 27, 2026 23:12 — with GitHub Actions Active
@halorgium
halorgium deployed to AcceptanceTests August 27, 2026 23:12 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant