Skip to content

Align history and logs terminal tables through the shared output renderer #1709

Description

@codeforester

Goal

Keep basectl history and basectl logs terminal tables aligned when command, project, run ID, or path values exceed the legacy fixed widths, using the shared base_cli.output renderer.

Background

Issue #1682 and PR #1683 completed the one-run/one-log ownership work. The unmerged follow-up commit 4f927e4 demonstrated a real terminal alignment gap, but it predates the canonical output renderer introduced by #1692 / PR #1696 and the report migration in #1694 / PR #1700.

Current terminal paths still call the legacy print_history_table and print_log_table functions. Values longer than their fixed widths shift later columns away from the header positions.

Scope

  • Route interactive history and recent-logs table output through base_cli.output.
  • Preserve history's explicit TIME (UTC) and TIME (LOCAL) terminal labels.
  • Keep the logs column labeled TIME and preserve its current timestamp and ordering semantics for canonical and legacy entries.
  • Preserve the existing compact minimum widths through the shared renderer.
  • Add regression coverage for long command, project, and run-ID values.
  • Update observability documentation for the shared terminal-table behavior.
  • Supersede the useful behavior and tests from 4f927e4 without adding a second table-rendering module.

Acceptance Criteria

  • Long values do not shift later cells away from their header columns.
  • History and logs use the canonical shared output renderer; no new base_cli.table abstraction is introduced.
  • Terminal text remains a readable table with the existing short-value spacing.
  • Redirected/default text remains headerless TSV.
  • CSV, TSV, YAML, JSON, empty-result, timestamp ordering, and history-report behavior remain unchanged.
  • History's UTC/local-time labels remain accurate; the logs terminal header remains TIME.
  • Focused tests and the full Base validation suite pass.

Validation

  • Focused base_cli.output, base_history, and base_logs tests.
  • Lint the touched Python files.
  • Run git diff --check.
  • Run the full ./bin/base-test suite.
  • Smoke-test terminal history/log table output with long values.

Non-Goals

Project Fields

  • Status: Backlog
  • Priority: P2
  • Area: CLI
  • Initiative: Adoption Polish
  • Size: S
  • Milestone: v1.8.0

Agent Assignment

Ready for implementation. Start from current main, reuse base_cli.output, and salvage the regression intent from 4f927e4 rather than cherry-picking its duplicate renderer.

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

No type

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions