Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Oct 12, 2025

  • Analyze the current behavior of changeDelay method
  • Update TSDoc comment in src/classes/job.ts to clarify behavior
  • Update user documentation in docs/gitbook/guide/jobs/delayed.md
  • Verify the change improves clarity
  • Run linter to ensure no style issues
  • Build TypeScript to ensure no compilation errors
  • Revert yarn.lock changes as requested
Original prompt

This section details on the original issue you should resolve

<issue_title>Wording of changeDelay(…) is confusing</issue_title>
<issue_description>Is your feature request related to a problem? Please describe.
The purpose of changeDelay(delay: number) is confusing: the method name implies "replace old delay with the new one", while the JSDoc says "milliseconds to be added to current time".

Describe the solution you'd like
An argument named delta or difference or something similar (instead of delay) would be helpful. delay implies "new delay".

Describe alternatives you've considered
Introduce a method that takes in a new timestamp (i.e., "add five seconds" = resetDelay(Date.now() + 5000)).

Additional context
n/a
</issue_description>

<agent_instructions>Modify tsdoc description of changeDelay to be more accurate</agent_instructions>

Comments on the Issue (you are @copilot in this section)

Fixes #3494


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@Copilot Copilot AI changed the title [WIP] Fix confusing wording in changeDelay method docs: clarify changeDelay method behavior in TSDoc and user documentation Oct 12, 2025
@Copilot Copilot AI requested a review from roggervalf October 12, 2025 02:49
Copilot finished work on behalf of roggervalf October 12, 2025 02:49
@roggervalf
Copy link
Collaborator

@copilot do not change yarn.lock

Copy link
Author

Copilot AI commented Oct 14, 2025

@copilot do not change yarn.lock

Reverted yarn.lock to its original state in commit 0d98d9c.

@roggervalf roggervalf marked this pull request as ready for review October 14, 2025 02:02
@Copilot Copilot AI review requested due to automatic review settings October 14, 2025 02:02
Copy link

@Copilot 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

Improves clarity of the changeDelay method's behavior by updating its TSDoc documentation and user guide. The documentation now clearly explains that the method reschedules a job to execute after a specified delay from the current time, rather than adding time to the original delay.

  • Updated TSDoc comment in job.ts to clarify that changeDelay sets a new delay from current time
  • Enhanced user documentation in delayed.md with clearer explanation and example comment
  • Added practical example showing the method reschedules jobs relative to current time

Reviewed Changes

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

File Description
src/classes/job.ts Updated TSDoc comment to clarify changeDelay behavior with detailed explanation and parameter description
docs/gitbook/guide/jobs/delayed.md Enhanced user documentation with clearer wording and added explanatory comment to code example

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

Copilot finished work on behalf of roggervalf October 14, 2025 02:03
@roggervalf roggervalf force-pushed the copilot/fix-changedelay-argument-name branch from 6b49e33 to 7851e26 Compare October 16, 2025 00:02
@roggervalf roggervalf closed this Oct 17, 2025
@roggervalf roggervalf deleted the copilot/fix-changedelay-argument-name branch October 17, 2025 02:50
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.

Wording of changeDelay(…) is confusing

3 participants