Skip to content

feat(time): add helper function convertMinutesToMilliseconds and tests (#236) - #245

Merged
TheVicky1 merged 2 commits into
TheVicky1:mainfrom
SRGGSS:minutes-to-milliseconds
Oct 4, 2026
Merged

TheVicky1 merged 2 commits into
TheVicky1:mainfrom
SRGGSS:minutes-to-milliseconds

Conversation

@SRGGSS

@SRGGSS SRGGSS commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

🏛️ PACT Pull Request

💡 Submitting a Micro-Contribution / Good First Issue?
If you are working on a single-file micro-task (Good First Issue), you only need to fill out Sections 1, 2, and 5 (and check the Micro-Contribution Fast-Path in Section 9). You can skip or leave optional sections blank!


1. Related Issue

Closes #236


2. Summary of Changes

-Converts minute durations to milliseconds (minutes * 60 * 1000).

  • Returns 0 for non-positive or negative input values.
  • Adds JSDoc documentation with examples.
  • Adds test cases in temporal-engine.test.ts.

3. Motivation & Context (Optional for Micro-PRs)


4. Implementation Details (Optional for Micro-PRs)


5. Testing & Local Validation

  • npm run lint — ESLint passed with 0 errors
  • npx tsc --noEmit — TypeScript strict check passed with 0 errors
  • npm test (or node scratch/run-tests.mjs) — 56-suite authoritative test matrix passed
  • npm run test:temporal-engine-- <file> — targeted single test suite passed (for micro-contributions)
  • node scratch/secret-scan.mjs — Zero secrets or sensitive credentials detected
  • npm run build — Production build succeeded without errors

If this is a documentation-only or micro PR, specify which verification was performed:


6. UI & Visual Changes (Optional)

  • No UI changes (This PR does not alter visual styling, layout, or components)
  • UI modifications included:
    • Tested responsive scaling on mobile (375px), tablet (768px), and desktop (1280px+)
    • Adhered to the luxury Obsidian & Gold palette (docs/DESIGN_SYSTEM.md)
    • Verified visible focus states and contrast ratios (WCAG AA)
Before After
(attach before screenshot/recording) (attach after screenshot/recording)

7. Database & Security Impact (Optional)

  • No database or security-sensitive changes
  • Database modifications included:
    • Sequential migration added in supabase/migrations/
    • Row Level Security (RLS) policies verified with auth.uid()
    • No destructive schema changes on active columns
  • Security modifications included:
    • Server Action input validated with Zod
    • User identity verified with supabase.auth.getUser()

8. Documentation Impact (Optional)

  • Documentation updated to reflect changes (e.g., in docs/ or README.md)
  • Documentation updates not required for this change

9. Contributor Quality Checklist

Please verify the following before requesting a maintainer review:

  • 🌱 Micro-Contribution Fast-Path: This is a targeted Good First Issue / 5–30 minute micro-change (single file, verified locally).
  • My PR has a single, focused scope (avoiding unrelated formatting or refactoring).
  • I have read and followed PACT's Contributing Guide.
  • I confirm that zero secrets, API keys, private tokens, or .env.local files are included in this PR.
  • My branch was created from the latest upstream/main with an appropriate prefix (e.g., feat/, fix/, docs/, ui/).
  • My commits follow the Conventional Commits format (type(scope): description).
  • I have linked the target issue in Section 1 above.
  • I have reviewed my own git diff to ensure no stray files or debugging artifacts were committed.

10. Reviewer Notes (Optional)

@SRGGSS
SRGGSS requested a review from TheVicky1 as a code owner October 1, 2026 10:25
@vercel

vercel Bot commented Oct 1, 2026

Copy link
Copy Markdown

@SRGGSS is attempting to deploy a commit to the Vicky's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

👋 Welcome to PACT OS, @SRGGSS! 🚀

Thank you for taking the time to open your first pull request on PACT! We are thrilled to have you here in our open-source community.


🔍 What Happens Next?

  1. Automated Verification: Our Continuous Integration (CI) workflow is currently verifying:
    • 🔒 Zero-Secret Security Scan
    • 🔗 Markdown Link Integrity
    • 🧹 ESLint Code Quality
    • 🏷️ TypeScript Strict Typecheck
    • 🧪 56-Suite Automated Domain & Security Test Matrix
    • 🏗️ Next.js Production Build
  2. Maintainer Review: A maintainer (@TheVicky1) will review your pull request shortly.
  3. Friendly Iteration: If any adjustments or feedback are needed, we will provide clear, actionable suggestions to help get your PR merged smoothly.

📚 Helpful Quick Links

Thank you for helping make PACT better! Plan. Track. Improve. Repeat. 🏛️✨

@SRGGSS SRGGSS changed the title feat(time): add helper function convertMinutesToMilliseconds and tests feat(time): add helper function convertMinutesToMilliseconds and tests (#236) Oct 1, 2026
TheVicky1
TheVicky1 previously approved these changes Oct 4, 2026
@vercel

vercel Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pact-os Ready Ready Preview Oct 4, 2026 11:00am UTC

@TheVicky1 TheVicky1 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has few merge conflicts in time conversion, kindly fix it before raising a new PR.

@TheVicky1
TheVicky1 merged commit 5ee1890 into TheVicky1:main Oct 4, 2026
3 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — db42cbb9 Deployed Oct 4, 2026 by vercel[bot]
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.

[Utils] Add Helper Function to Convert Minutes to Milliseconds in src/lib/time.ts

2 participants