Skip to content

Conversation

@nhoenderop
Copy link

@nhoenderop nhoenderop commented Jan 20, 2026

Small improvement that provides a human readable timestamp on queue-items directly, removing the need for developers to convert the timestamp themselves to discover when a queue item was handled.

Summary by CodeRabbit

  • New Features
    • Task state transitions now include human-readable timestamps in addition to standard timestamps, providing clearer visibility into when tasks move to in-progress, complete, or error states. This enhancement makes it easier to track and monitor task lifecycle changes and better understand the timing of critical state transitions occurring in your workflow.

✏️ Tip: You can customize this high-level summary in your review settings.

@nhoenderop nhoenderop requested a review from EECOLOR January 20, 2026 10:11
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

Walkthrough

Three code paths in the transaction helper now assign a human-readable ISO timestamp to a new _state_changed_readable field during state transitions: when tasks move to in-progress, finish, or error states. This supplements the existing _state_changed field without modifying underlying state logic or control flow.

Changes

Cohort / File(s) Summary
State transition timestamp enrichment
src/transaction_helper.js
Adds _state_changed_readable = new Date().toISOString() assignments across three state transition paths (in-progress, finished, error states) to provide human-readable timestamps alongside existing state change tracking

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a readable state changed property to queue items. It directly reflects the core functionality added across the three state transition paths.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@EECOLOR
Copy link
Member

EECOLOR commented Jan 20, 2026

I am not sure if this is desirable. The Date.now() is not the same as SERVER_TIMESTAMP. I worry it might cause confusion. I'll check in person to discuss this with you :-D

Tests are missing. Please note that things are outdated, I have upgraded part of the library (and tests) in the pnpm branch. Please rebase there and add tests.

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.

3 participants