Skip to content

Conversation

@mfcollins3
Copy link
Member

@mfcollins3 mfcollins3 commented Oct 1, 2025

I created a one-to-many relationship between Activity and Pomodoro. I updated the pomorodo start command to accept an activity ID either as a positional argument or by reading the activity ID from stdin. Reading from stdin allows for command line chaining where a previous command can output an activity ID and it can be piped into the pomodoro start command.

Closes #39

I created a one-to-many relationship between Activity and Pomodoro. I
updated the `pomorodo start` command to accept an activity ID either as
a positional argument or by reading the activity ID from stdin. Reading
from stdin allows for command line chaining where a previous command can
output an activity ID and it can be piped into the `pomodoro start`
command.
@mfcollins3 mfcollins3 self-assigned this Oct 1, 2025
@mfcollins3 mfcollins3 linked an issue Oct 1, 2025 that may be closed by this pull request
@mfcollins3 mfcollins3 added the enhancement New feature or request label Oct 1, 2025
@mfcollins3 mfcollins3 requested a review from Copilot October 1, 2025 04:37
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 establishes a one-to-many relationship between Activity and Pomodoro entities, allowing pomodoros to be linked to specific activities. The changes enable the pomodoro start command to accept an activity ID either as a command-line argument or via stdin for command chaining scenarios.

  • Added ActivityID field to Pomodoro model with database indexing
  • Updated pomodoro start command to accept activity ID parameter with stdin fallback
  • Modified activity add command to output the created activity ID for chaining

Reviewed Changes

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

File Description
internal/database/pomodoro.go Added ActivityID field to establish relationship with Activity
internal/database/activity.go Added Pomodoros slice to complete the bidirectional relationship
internal/cli/pomodoro/start_command.go Enhanced start command to accept activity ID and read from stdin
internal/cli/activity/add_command.go Modified to output activity ID for command chaining

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

🐳 Container Image Built

Your PR container image has been built and published:

ghcr.io/nakedsoftware/time:pr-46

Supported architectures: linux/amd64, linux/arm64

Usage:

docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help

🗑️ This image will be automatically deleted when the PR is closed.

mfcollins3 and others added 2 commits September 30, 2025 21:40
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Based on feedback from the Copilot code review, I increased the
timeout for waiting for the activity ID on stdin to 1 second.
@mfcollins3 mfcollins3 requested a review from Copilot October 1, 2025 04:42
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

🐳 Container Image Built

Your PR container image has been built and published:

ghcr.io/nakedsoftware/time:pr-46

Supported architectures: linux/amd64, linux/arm64

Usage:

docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help

🗑️ This image will be automatically deleted when the PR is closed.

1 similar comment
@github-actions
Copy link

github-actions bot commented Oct 1, 2025

🐳 Container Image Built

Your PR container image has been built and published:

ghcr.io/nakedsoftware/time:pr-46

Supported architectures: linux/amd64, linux/arm64

Usage:

docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help

🗑️ This image will be automatically deleted when the PR is closed.

@mfcollins3 mfcollins3 requested a review from Copilot October 1, 2025 04:44
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

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


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

🐳 Container Image Built

Your PR container image has been built and published:

ghcr.io/nakedsoftware/time:pr-46

Supported architectures: linux/amd64, linux/arm64

Usage:

docker run --rm ghcr.io/nakedsoftware/time:pr-46 --help

🗑️ This image will be automatically deleted when the PR is closed.

@mfcollins3 mfcollins3 merged commit afb4da4 into main Oct 1, 2025
3 checks passed
@mfcollins3 mfcollins3 deleted the 39-specify-activity-for-pomodoro branch October 1, 2025 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specify Activity for Pomodoro

2 participants