Skip to content

Add commit --amend support with UI toggle and refresh product roadmap#7

Open
tspython wants to merge 1 commit into
masterfrom
codex/design-product-roadmap-based-on-master
Open

Add commit --amend support with UI toggle and refresh product roadmap#7
tspython wants to merge 1 commit into
masterfrom
codex/design-product-roadmap-based-on-master

Conversation

@tspython
Copy link
Copy Markdown
Owner

@tspython tspython commented Apr 1, 2026

Motivation

  • Enable amending the last commit from the UI with an explicit, discoverable toggle and keyboard shortcut to make the commit workflow more complete and safer.
  • Surface the current product baseline and roadmap in PRODUCT_ROADMAP.md so planning and priorities are aligned with the repository audit.

Description

  • Add commit_amend: bool to State and update the commit modal to display amend state and hint text, with Ctrl+A as a toggle in the commit prompt; input handling now passes the control modifier to the commit handler via handle_commit_input(&Key, ctrl: bool).
  • Add amend: bool to GitCommand::Commit and include --amend in both the description() string and the actual command arguments when amend is true, plus introduce commit_with_options(...) on GitModel and preserve the old commit(...) API.
  • Wire the UI toggle to call git.commit_with_options(&message, false, amend) and update status messages to indicate when commits are amended.
  • Replace PRODUCT_ROADMAP.md with an expanded, baseline-grounded roadmap and audit summary to document implemented capabilities, gaps, principles, phases, and an immediate backlog; add one unit test commit_command_description_includes_amend_when_requested to verify the command description includes --amend.

Testing

  • Ran cargo test, which executed unit tests including the new commit_command_description_includes_amend_when_requested and all tests completed successfully.
  • Verified the commit modal text updates and keyboard Ctrl+A toggling logic by exercising the commit input state in unit/interactive checks (automated unit tests cover the command description change).

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant