Skip to content

Conversation

@schacon
Copy link
Member

@schacon schacon commented Feb 8, 2026

remove the “checked ago…” and “(common base)” strings

Copilot AI review requested due to automatic review settings February 8, 2026 19:50
@vercel
Copy link

vercel bot commented Feb 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
gitbutler-web Ignored Ignored Preview Feb 9, 2026 5:57am

Request Review

@github-actions github-actions bot added rust Pull requests that update Rust code CLI The command-line program `but` labels Feb 8, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the but status output to simplify the merge-base (“status base”) line by removing extra annotations, and refreshes CLI snapshot/test expectations accordingly.

Changes:

  • Removes the (common base) label from the merge-base line in human-readable status output.
  • Stops appending the “(checked …)” suffix to the merge-base line.
  • Adjusts merge-base commit message formatting (first line only, shorter truncation), updating snapshots and JSON test expectations.

Reviewed changes

Copilot reviewed 3 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
crates/but/src/command/legacy/status/mod.rs Removes “(common base)” and the merge-base “checked …” suffix; changes merge-base commit message extraction/truncation.
crates/but/tests/but/command/status.rs Updates expected JSON message value for merge-base commit output.
crates/but/tests/but/journey.rs Updates journey test expected status output to match simplified merge-base line.
crates/but/tests/but/command/absorb.rs Updates expected status output in absorb command snapshots to match simplified merge-base line.
crates/but/tests/but/snapshots/from-workspace/status01-verbose.stdout.term.svg Updates terminal SVG snapshot for simplified merge-base line.
crates/but/tests/but/command/snapshots/status/two-worktrees/status-with-worktrees.stdout.term.svg Updates terminal SVG snapshot for simplified merge-base line.
crates/but/tests/but/command/snapshots/status/two-worktrees/status-with-worktrees-verbose.stdout.term.svg Updates terminal SVG snapshot for simplified merge-base line.
crates/but/tests/but/command/snapshots/status/remote-and-local-files.stdout.term.svg Updates terminal SVG snapshot for simplified merge-base line.
crates/but/tests/but/command/snapshots/status/long-cli-ids.stdout.term.svg Updates terminal SVG snapshot for simplified merge-base line.

Comment on lines 152 to 160
let message = base_commit_decoded
.message
.to_string()
.replace('\n', " ")
.lines()
.next()
.unwrap_or("")
.chars()
.take(50)
.take(40)
.collect::<String>();
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CommonMergeBase.message is used for both human output and the JSON merge_base.message (via build_workspace_status_json). Changing the extraction to lines().next() and truncating to 40 chars alters the JSON output semantics (and reduces information vs the prior 50-char, newline-flattened version). Consider storing an unmodified/full commit message in CommonMergeBase (or at least keep the previous 50-char behavior for JSON) and applying truncation/newline normalization only when rendering the human CLI line.

Copilot uses AI. Check for mistakes.
Comment on lines 367 to 376
writeln!(
out,
"{} {} (common base) [{}] {} {}{}",
"{} {} [{}] {} {}",
if upstream_state.is_some() { "├╯" } else { "┴" },
common_merge_base_data.common_merge_base.dimmed(),
common_merge_base_data.target_name.green().bold(),
common_merge_base_data.commit_date.dimmed(),
common_merge_base_data.message,
if upstream_state.is_none() {
last_checked_text.dimmed().to_string()
} else {
String::new()
}
)?;
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says to remove the "checked …" string, but this change only removes it from the merge-base line. last_checked_text is still appended to upstream output in this module (e.g., upstream summary/detailed sections). Either remove it there as well for consistency with the description, or adjust the PR description/scope to clarify it’s only the merge-base line.

Copilot uses AI. Check for mistakes.
Remove '(common base)' label, truncate commit message to 40 chars
from first line only, and move last-checked timestamp to only appear
on the upstream line when there are upstream commits.
Keep the unmodified commit message in CommonMergeBase so JSON output
(via build_workspace_status_json) retains the original content.
Previously the code normalized and truncated messages before storing
them in CommonMergeBase, which changed JSON semantics and lost
information. This change stores full_message in CommonMergeBase and
applies newline normalization and a 40-char truncation only when
rendering the human CLI line.
@schacon schacon force-pushed the simplify-status-base-line branch from b3deec6 to 9c15875 Compare February 9, 2026 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLI The command-line program `but` rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant