feat(cli): expose available_statuses in robot mode and hide status_category
(Supersedes empty commit f3788eb — jj auto-snapshot race.)
Three related refinements to how work item status is presented:
1. available_statuses in meta (list.rs, main.rs):
Robot-mode issue list responses now include meta.available_statuses —
a sorted array of all distinct status_name values in the database.
Agents can use this to validate --status filter values or display
valid options without a separate query.
2. Hide status_category from JSON (list.rs, show.rs):
status_category is a GitLab internal classification that duplicates
the state field. Switched to skip_serializing so it never appears
in JSON output while remaining available internally.
3. Simplify human-readable status display (show.rs):
Removed the "(category)" parenthetical from the Status line.
4. robot-docs schema updates (main.rs):
Documented --status filter semantics and meta.available_statuses.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -628,13 +628,9 @@ pub fn print_show_issue(issue: &IssueDetail) {
|
||||
println!("State: {}", state_styled);
|
||||
|
||||
if let Some(status) = &issue.status_name {
|
||||
let display = match &issue.status_category {
|
||||
Some(cat) => format!("{status} ({})", cat.to_ascii_lowercase()),
|
||||
None => status.clone(),
|
||||
};
|
||||
println!(
|
||||
"Status: {}",
|
||||
style_with_hex(&display, issue.status_color.as_deref())
|
||||
style_with_hex(status, issue.status_color.as_deref())
|
||||
);
|
||||
}
|
||||
|
||||
@@ -944,6 +940,7 @@ pub struct IssueDetailJson {
|
||||
pub closing_merge_requests: Vec<ClosingMrRefJson>,
|
||||
pub discussions: Vec<DiscussionDetailJson>,
|
||||
pub status_name: Option<String>,
|
||||
#[serde(skip_serializing)]
|
||||
pub status_category: Option<String>,
|
||||
pub status_color: Option<String>,
|
||||
pub status_icon_name: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user