Skip to content

Responsive table output (CR-0038) + profile/installer fixes - #25

Merged
jbrazda merged 5 commits into
devfrom
feature/cr-0038-responsive-tables
Sep 11, 2026
Merged

jbrazda merged 5 commits into
devfrom
feature/cr-0038-responsive-tables

Conversation

@jbrazda

@jbrazda jbrazda commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • CR-0038: Responsive table output - table columns now carry a priority (1 essential .. 5 reference) and a shrink mode (truncate, left-truncate, wrap, never). When a table is wider than the terminal, opaque ID columns are dropped first, free-text columns wrap, secondary columns truncate as a last resort, and output falls back to a vertical PROPERTY: VALUE layout if even the essential columns don't fit. New --width/--wide flags, IICS_WIDTH env var, and config style.responsiveTables. Never applies to non-TTY output, --output csv|json|yaml, or the markdown/gh themes. See docs/adr/0001-responsive-table-column-dropping.md and docs/documentation/output.md.
  • fix(profile): profile list column order was being disrupted by the new responsive-table heuristic (columns without an explicit Width were reordered as wrap-priority). Pinned explicit column priorities and reordered to NAME, USERNAME, ENDPOINT, POD, DEFAULT, KEYCHAIN. KEYCHAIN now shows yes/no instead of blank for plaintext-password profiles.
  • feat(agent): --progress flag on agent installer-download prints a live, throttled download progress line to stderr (bytes transferred, percentage when known, transfer rate).
  • feat(agent): --os prompt in installer-info/installer-download is now a numbered selection menu instead of free text; cancel via 0, Enter, or q.

Testing

  • go build ./..., go vet ./..., gofmt -s -w ., golangci-lint run ./... all clean
  • go test ./... passing, new tests added in internal/output and internal/client
  • Manually verified via real pty sessions: responsive table drop/wrap/truncate behavior, profile list column order/keychain display, installer-download --progress against a local file server, and the --os selection menu (including q cancel)

Docs

  • docs/documentation/output.md (new), docs/documentation/profile.md, docs/documentation/agent.md, README.md, docs/adr/0001-responsive-table-column-dropping.md
  • docs/ChangeRequests/pending/CR-0038-responsive-table-output.md
  • completions/ regenerated

jbrazda and others added 5 commits September 11, 2026 15:17
Table columns now carry a Priority (1 essential .. 5 reference) and a
Shrink mode (truncate, left-truncate, wrap, never). When a table is
wider than the terminal, planColumns() drops priority-5 opaque ID
columns first, wraps/truncates priority-4/3 columns, drops priority-4
if that still isn't enough, truncates priority-2 as a last resort, and
falls back to a vertical PROPERTY: VALUE layout if priority-1 columns
alone overflow. Wrapped columns are display-reordered to the right so
their extra lines never misalign columns after them. A stderr hint
names any dropped columns.

Adaptation only applies on a TTY table render; --output csv/json/yaml,
non-TTY output, and the markdown/gh themes always render in full. New
--width/--wide flags, IICS_WIDTH env var, and config
style.responsiveTables control it (see docs/documentation/output.md).

Un-annotated columns get inferred defaults; agent, activitylog, user,
connection, objects, and package get explicit Priority/Shrink
annotations. ADR-0001 records the column-dropping decision.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmS8X3rkRwN5D6nNfiGpXK
CR-0038's responsive-table heuristic infers priority 4 (wrap, reordered
last) for any column with no Width set. profile list's NAME, DEFAULT,
REGION, ENDPOINT, and USERNAME columns had no Width, so on a TTY they
were all reordered to the end (widest first) behind KEYCHAIN, which
looked like a column-order regression and made KEYCHAIN easy to miss
as "not printing".

Annotate all profile list columns explicitly and reorder to
NAME, USERNAME, ENDPOINT, POD (region), DEFAULT, KEYCHAIN - matches
what was requested and keeps the order stable regardless of terminal
width. Docs updated to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmS8X3rkRwN5D6nNfiGpXK
profile list left KEYCHAIN blank for profiles storing the password
plainly in the config file, indistinguishable at a glance from a
column that failed to render. Show "no" explicitly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmS8X3rkRwN5D6nNfiGpXK
DownloadFile now accepts an optional DownloadProgressFunc callback,
invoked after each chunk with cumulative bytes written and the
server-reported content length (-1 when unknown, e.g. chunked
encoding). agent installer-download's new --progress flag wires this
to a throttled (5/sec) carriage-return-updated stderr line showing
bytes transferred, percentage when known, and transfer rate.

Default behavior (no --progress) is unchanged; the callback is nil.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmS8X3rkRwN5D6nNfiGpXK
Replace the free-text "win64/linux64" prompt in installer-info and
installer-download with promptSelect's numbered menu, consistent with
the rest of the interactive UI. Cancel via 0, Enter, or 'q' (promptSelect
now accepts 'q'/'Q' as a cancel key alongside the existing 0/Enter).
Both commands print "Canceled." and exit 0 when the prompt is
canceled, matching the convention used elsewhere (e.g. pickAgent).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmS8X3rkRwN5D6nNfiGpXK
@jbrazda
jbrazda merged commit 5ab67bb into dev Sep 11, 2026
8 checks passed
@jbrazda
jbrazda deleted the feature/cr-0038-responsive-tables branch September 11, 2026 20:44
jbrazda added a commit that referenced this pull request Sep 11, 2026
Confirmed complete by the developer after merge (PR #25) and green CI.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NmS8X3rkRwN5D6nNfiGpXK
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