feat: truncate --fields body uniformly (task 0021)
All checks were successful
CI / test (pull_request) Successful in 49s
CI / test (push) Successful in 49s

Rule that the `body` extra field truncates at 500 chars like `issue view`,
resolving the spec's Principle 3 / Command Surface contradiction. Route the
`body` extractor through a new `truncatedBody()` FieldDef so `issue list`,
`issue create`, `pr list`, and `search` all present it exactly as the detail
views do, and add a `--full` flag to each to suppress truncation, keeping the
inline hint's "use --full" promise honest.
This commit was merged in pull request #21.
This commit is contained in:
2026-07-14 12:23:24 -04:00
parent ed87f023cb
commit b5955cd7b8
13 changed files with 277 additions and 23 deletions

View File

@@ -124,7 +124,9 @@ async function labelList(deps: CliDeps, args: string[]): Promise<string> {
}
const now = new Date();
const rows = labels.map((label) => extractRow(label, LABEL_LIST_FIELDS, { now }));
const rows = labels.map((label) =>
extractRow(label, LABEL_LIST_FIELDS, { now, host: context.host, full: false }),
);
return renderList({
noun: "labels",
rows,