diff --git a/.braid/issues/brd-pdno.md b/.braid/issues/brd-pdno.md index 183fa2e..c82ef19 100644 --- a/.braid/issues/brd-pdno.md +++ b/.braid/issues/brd-pdno.md @@ -3,13 +3,13 @@ schema_version: 4 id: brd-pdno title: visually distinguish meta and design issues in TUI priority: P2 -status: doing +status: done deps: [] tags: - tui -owner: agent-three +owner: null created_at: 2025-12-28T08:44:05.329879Z -updated_at: 2025-12-28T18:11:33.492273Z +updated_at: 2025-12-28T23:20:14.053918Z acceptance: - style meta issues like brd ls does - style design issues like brd ls does diff --git a/docs/agent-workflow.md b/docs/agent-workflow.md index ac46b8d..4656fca 100644 --- a/docs/agent-workflow.md +++ b/docs/agent-workflow.md @@ -151,14 +151,14 @@ for teams that want CI gates and human review before merging, braid supports a P ### new commands ```bash -brd agent branch # create feature branch / from main +brd agent branch # create feature branch pr// from main brd agent pr # create PR from current branch to main ``` ### simple PR workflow (no sync branch) ```bash -brd agent branch brd-xyz # create branch agent-one/brd-xyz from main +brd agent branch brd-xyz # create branch pr/agent-one/brd-xyz from main brd start brd-xyz # claim issue (committed in branch) # ... do work, commit as usual ... brd done brd-xyz # mark done (committed in branch) diff --git a/src/commands/agent.rs b/src/commands/agent.rs index 75de2ce..a72313b 100644 --- a/src/commands/agent.rs +++ b/src/commands/agent.rs @@ -162,8 +162,8 @@ pub fn cmd_agent_branch(cli: &Cli, paths: &RepoPaths, issue_id: &str) -> Result< let mut issues = load_all_issues(paths, &config)?; let full_id = resolve_issue_id(issue_id, &issues)?; - // Create branch name: feature/ - let branch_name = format!("feature/{}", full_id); + // create branch name: pr// + let branch_name = format!("pr/{}/{}", agent_id, full_id); // Check if branch already exists if git( @@ -317,9 +317,16 @@ fn get_current_branch(cwd: &std::path::Path) -> Result { } } -/// extract issue ID from branch name (format: /). +/// extract issue ID from branch name. +/// supports both formats: +/// - "pr//" (new format) +/// - "/" (legacy format for backwards compatibility) fn extract_issue_id_from_branch(branch: &str) -> Option<&str> { - branch.split('/').nth(1) + if branch.starts_with("pr/") { + branch.split('/').nth(2) + } else { + branch.split('/').nth(1) + } } /// create a PR from the current branch using gh cli. @@ -332,7 +339,7 @@ pub fn cmd_agent_pr(cli: &Cli, paths: &RepoPaths) -> Result<()> { // extract issue ID from branch name let issue_id = extract_issue_id_from_branch(&branch).ok_or_else(|| { BrdError::Other(format!( - "branch '{}' doesn't match expected format '/'", + "branch '{}' doesn't match expected format 'pr//'", branch )) })?; diff --git a/src/tui/ui.rs b/src/tui/ui.rs index e9298f8..8abd51d 100644 --- a/src/tui/ui.rs +++ b/src/tui/ui.rs @@ -240,7 +240,7 @@ fn draw_ready_list(f: &mut Frame, area: Rect, app: &mut App) { issue.priority(), truncate(issue.title(), title_width) ); - let style = if is_active && i == app.ready_selected { + let mut style = if is_active && i == app.ready_selected { Style::default() .bg(Color::Yellow) .fg(Color::Black) @@ -248,6 +248,16 @@ fn draw_ready_list(f: &mut Frame, area: Rect, app: &mut App) { } else { Style::default() }; + // add type-based styling (italic for design, bold for meta) + match issue.issue_type() { + Some(crate::issue::IssueType::Design) => { + style = style.add_modifier(Modifier::ITALIC); + } + Some(crate::issue::IssueType::Meta) => { + style = style.add_modifier(Modifier::BOLD); + } + None => {} + } ListItem::new(text).style(style) }) .collect(); @@ -310,7 +320,7 @@ fn draw_all_list(f: &mut Frame, area: Rect, app: &mut App) { issue.priority(), truncate(issue.title(), title_width) ); - let style = if is_active && i == app.all_selected { + let mut style = if is_active && i == app.all_selected { Style::default() .bg(Color::Yellow) .fg(Color::Black) @@ -324,6 +334,16 @@ fn draw_all_list(f: &mut Frame, area: Rect, app: &mut App) { crate::issue::Status::Todo => Style::default(), } }; + // add type-based styling (italic for design, bold for meta) + match issue.issue_type() { + Some(crate::issue::IssueType::Design) => { + style = style.add_modifier(Modifier::ITALIC); + } + Some(crate::issue::IssueType::Meta) => { + style = style.add_modifier(Modifier::BOLD); + } + None => {} + } ListItem::new(text).style(style) }) .collect();