Merged
Conversation
tty環境でも生 JSON が出力されて読みづらかったため、 他サブコマンドと同じ --output / --jq 規約に合わせ、 TTY では書類メタ情報 (DOCID/TITLE/FORM/ROUTE/STATUS/STEP/ WRITER/LASTAPRV) を newList で、承認フローを newTable で 整形表示するよう変更。--output json または非 TTY 時は従来 通りサーバ応答 JSON をそのまま出力する。 承認フロー表示は次の工夫を含む: - 現在ステップは "*2"、その他は " 2" と空白パディングで 列幅を揃え、カレント位置を視認しやすくする - STEP/TITLE が直前行と同じ場合は両セルを空欄にして 承認者行をグルーピング表示する - 最終行に "承認完了" 行 (STEP = 最終+1) を追加。status.code が 6 のときは LASTAPRV 情報を表示し "*" を付与する - サーバが整数フィールドを文字列で返すケース (status.code など) に対応する flexInt 型でデコードする Closes #30 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Summary
xp document statusが TTY でも生 JSON を出力して読みづらかった問題を解消--output table|json/--jq規約に合わせ、TTY では書類メタ情報 (DOCID/TITLE/FORM/ROUTE/STATUS/STEP/WRITER/LASTAPRV) をnewListで、承認フローをnewTableで整形表示*2、その他は2と空白パディングで列幅を揃える承認完了行 (STEP = 最終+1) を追加。status.code == 6のとき LASTAPRV を表示し*を付与status.codeなど) に対応するflexInt型でデコード--output jsonもしくは非 TTY 時は従来通りサーバ応答 JSON をそのまま出力Test plan
go test ./...go vet ./.../gofmt -l ./cmdxp document status <docid>の見た目を確認済み (承認完了・承認中の両ケース)--history付き実行の見た目を確認Closes #30
🤖 Generated with Claude Code