Conversation
* Improve quota notification and blocking logic Refactored the quota check to ensure workspaces are blocked and notified only when appropriate. Added logging for both blocking and approaching quota limits, and clarified notification task handling. * Suppress magic number lint warning in logger Added an ESLint directive to ignore the magic number warning for the percentage calculation in the workspace events limit log message.
* pull new hawk types * Track blocked date for workspaces in LimiterWorker Adds a 'blockedDate' property to workspaces when blocking and unblocking them. This allows tracking when a workspace was blocked or cleared, improving auditability and state management. * Add and populate blockedDate for blocked workspaces Introduces the blockedDate field to workspace updates in dbHelper and ensures it is set for all blocked workspaces, including a temporary fix for existing records missing this field. This change supports better tracking of when a workspace was blocked and prepares for future removal of the migration code. * Add tests for blockedDate handling in workspaces Extended tests to cover setting and clearing the blockedDate field when blocking and unblocking workspaces. Added scenarios for updating blockedDate when missing and verifying correct behavior during workspace state transitions. * Update index.ts * Refactor blocked workspace reminder to use days after block Renamed variables and template placeholders from 'daysAfterPayday' to 'daysAfterBlock' to more accurately reflect the time since a workspace was blocked. Updated related logic, types, and templates to use the new naming and calculation. Added a utility function to compute days after block in payday.ts. * Update yarn.lock to deduplicate and reorder entries This commit cleans up the yarn.lock file by removing duplicate entries, consolidating package references, and reordering dependencies for consistency. No package versions were changed; this improves maintainability and reduces lockfile bloat. * Rename daysAfterPayday to daysAfterBlock in payload Updated variable and property names from daysAfterPayday to daysAfterBlock in SenderWorker to reflect the correct payload structure and improve clarity. * Handle undefined daysAfterBlock in reminders logic Updated countDaysAfterBlock to return undefined instead of null when blockedDate is missing. Adjusted paymaster worker logic to check for undefined, ensuring reminders are sent only when daysAfterBlock is valid. * Adjust blockedDate calculation in PaymasterWorker test Updates the blockedDate assignment to subtract days based on expectedDaysAfterBlock in the PaymasterWorker test, improving test accuracy for blocked subscriptions. * Update workers/paymaster/tests/index.test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update workers/paymaster/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update lib/utils/payday.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update dbHelper.test.ts * Remove obsolete test and update blocked workspace logic Deleted a test for setting blockedDate on already blocked workspaces in limiter tests, as the scenario is no longer relevant. Updated workspace mock to include blockedDate as undefined. Simplified reminder logic in PaymasterWorker by removing unnecessary undefined check for daysAfterBlock. * Refactor blockedDate handling in workspace mocks Removed redundant logic for setting blockedDate when workspace is already blocked in LimiterWorker. Standardized blockedDate type to Date (not Date | null/undefined) in test mocks and updated test cases to use null instead of undefined where appropriate. * Update index.test.ts * Update dbHelper.test.ts * Update index.test.ts * Update index.test.ts * Update workers/paymaster/tests/index.test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update index.test.ts * Update workers/paymaster/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update lib/utils/payday.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update workers/paymaster/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update emailOverview.ts * Update workers/limiter/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update lib/utils/payday.ts Co-authored-by: Peter <specc.dev@gmail.com> * Update index.test.ts * Update index.test.ts * Update index.ts --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Peter <specc.dev@gmail.com>
…orks (#492) * feat(): arrange babel plugins respectfully to vue and svetle frameworks * chore(): add context to hawk errors and cover utils with tests * chore(): clean up * Update workers/javascript/src/utils.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore(): fix tests description * imp(): move getFunctionContext to utils * chore(): lint fix * chore(): improve jsdoc --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
e11sy
approved these changes
Dec 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Auto-generated prod update suggestion