Skip to content

fix: replace NodeJS.Timeout with environment-agnostic ReturnType to unblock CI#650

Open
AdityaM-IITH wants to merge 1 commit into
magic-peach:mainfrom
AdityaM-IITH:fix/ci-pipeline-hotfix
Open

fix: replace NodeJS.Timeout with environment-agnostic ReturnType to unblock CI#650
AdityaM-IITH wants to merge 1 commit into
magic-peach:mainfrom
AdityaM-IITH:fix/ci-pipeline-hotfix

Conversation

@AdityaM-IITH
Copy link
Copy Markdown
Contributor

Overview

Resolves a TypeScript compilation vulnerability caused by environment-specific typing leaking into a frontend React component.

TipCarousel.tsx was previously relying on NodeJS.Timeout for its interval and timeout refs. In strict browser-targeted CI build steps (or when @types/node is not explicitly loaded into the frontend context), this causes the tsc compiler to throw a namespace resolution error, breaking the pipeline.

Changes Executed

  • Refactored timeoutRef to use the environment-agnostic ReturnType<typeof setTimeout>
  • Refactored intervalRef to use the environment-agnostic ReturnType<typeof setInterval>

This ensures the component typing is strictly inferred from the execution environment without relying on Node-specific globals, allowing npm run type-check to pass flawlessly across all environments.

Type of Change

  • Bug fix (pipeline/type resolution)
  • New feature
  • Breaking change

Checklist

  • Local type-check (tsc --noEmit) passes cleanly
  • Zero runtime logic altered; strictly a type safety patch

@vercel
Copy link
Copy Markdown

vercel Bot commented May 18, 2026

@AdityaM-IITH is attempting to deploy a commit to the magic-peach1's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

⚠️ PR Format Issues — @AdityaM-IITH

Please fix the following before your PR can be reviewed:

  • ⚠️ No linked issue found. Add Closes #<issue-number> to your PR description.

Push new commits after fixing — this comment will update automatically.

📖 CONTRIBUTING.md

@github-actions
Copy link
Copy Markdown
Contributor

👋 Thanks for your PR, @AdityaM-IITH!

Welcome to Reframe — a browser-based video editor built for everyone 🎬

What happens next

  1. 🤖 Automated checks — build & TypeScript typecheck will run automatically
  2. Vercel preview — a preview deployment will be created (requires maintainer authorization for fork PRs)
  3. 👀 Code review — a maintainer will review your changes
  4. 🚀 Merge — once approved, your PR will be merged!

Quick checklist

  • PR title follows Conventional Commits (e.g. feat: add dark mode)
  • Linked the issue this PR closes (e.g. Closes #123)
  • Tested the changes locally (bun run dev)
  • Build passes (bun run build)

Useful links

Happy coding! 🎉

@github-actions github-actions Bot added level:beginner Beginner level - 20 pts type:bug Bug fix type:feature New feature type:security Security labels May 18, 2026
@magic-peach
Copy link
Copy Markdown
Owner

@AdityaM-IITH please create a screen recording of the changes made and tests passing

@magic-peach
Copy link
Copy Markdown
Owner

Hey @AdityaM-IITH! 👋

We've added a new requirement for all PRs: a screen recording showing your changes working on your local machine must be attached before a PR can be merged.

Please add a recording to this PR that shows:

  1. bun run dev running at http://localhost:3000
  2. The full working flow of your change (demonstrate the feature/fix end-to-end)
  3. Any tests passing — if your change touches logic with tests, show bun run lint and bunx tsc --noEmit completing without errors in the terminal

How to record:

  • macOS: Cmd + Shift + 5 → Record Selected Portion, or QuickTime Player
  • Windows: Win + G → Xbox Game Bar → Capture
  • Linux: OBS Studio, GNOME Screenshot, or kazam
  • Any OS: Loom (free, easy to share)

Once you have the recording, drag the file directly into a comment on this PR, or paste a Loom link. This is now a hard requirement — see CONTRIBUTING.md for full details.

Thanks for contributing to Reframe! 🎬

@AdityaM-IITH
Copy link
Copy Markdown
Contributor Author

Here is the required local pipeline verification recording using OBS:

🎥 Local Verification Proof

  • Interactive Tour Execution: bun run dev verified locally at localhost:3000, confirming the tour modal initializes and steps through without regressions.
  • Type Compiler Security: bunx tsc --noEmit executes completely blank (0 errors), verifying the environment-agnostic ReturnType successfully patches the cross-environment compilation pipeline.
  • Linter Status: bun run lint passes cleanly with zero errors.
PR.650.reframe.mp4

The type boundaries are fully unified now. Ready for maintainer merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

level:beginner Beginner level - 20 pts type:bug Bug fix type:feature New feature type:security Security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants