Skip to content

Add amend command#1

Merged
okaryo merged 2 commits into
mainfrom
codex/amend-api
Apr 18, 2026
Merged

Add amend command#1
okaryo merged 2 commits into
mainfrom
codex/amend-api

Conversation

@okaryo

@okaryo okaryo commented Apr 18, 2026

Copy link
Copy Markdown
Owner

This pull request introduces a new feature that allows users to amend (replace) the most recent log entry for the current day using a new dlog amend subcommand. The implementation includes both the command-line interface and service logic, along with comprehensive documentation and tests to ensure correct behavior and error handling.

The most important changes are:

Feature: Amend Most Recent Log Entry

  • Added a new amend subcommand to the CLI, allowing users to replace today's most recent log entry while preserving its original timestamp (cmd/root.go, internal/service/service.go). [1] [2] [3]
  • Implemented the AmendTodayLog method in the service layer, which validates input, loads today's log, and amends the most recent entry. Handles errors for empty input and missing logs (internal/service/service.go).

Documentation

  • Updated the README.md with usage instructions and examples for the new dlog amend command, including sample outputs and explanations. [1] [2]

Testing

  • Added unit and integration tests to verify that the amend command correctly replaces the most recent log entry, handles empty input, and fails when there are no logs to amend (cmd/root_test.go, internal/service/service_test.go). [1] [2]

@okaryo okaryo self-assigned this Apr 18, 2026
@okaryo okaryo merged commit 3415cb9 into main Apr 18, 2026
1 check passed
@okaryo okaryo deleted the codex/amend-api branch April 18, 2026 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant