Skip to content

Doc Changes made#3309

Merged
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
Aryan-Agarwal-creator:doc
Jun 3, 2026
Merged

Doc Changes made#3309
JhaSourav07 merged 2 commits into
JhaSourav07:mainfrom
Aryan-Agarwal-creator:doc

Conversation

@Aryan-Agarwal-creator
Copy link
Copy Markdown
Contributor

Description

Fixes #3308

This PR improves project documentation by adding missing JSDoc comments to exported utility functions and updating middleware documentation to accurately reflect protected routes.

Changes Made (Documentation Only — No Logic Changes)

utils/urls.ts

  • Added JSDoc for getOrigin()

    • Documents origin resolution priority chain:

      • window.location.origin
      • Environment variable
      • Local fallback
  • Added JSDoc for getDashboardUrl()

    • Includes @param and @returns

utils/tracking.ts

  • Added JSDoc for trackUser()

    • Documents beacon-first / fetch-fallback tracking strategy
    • Explains no-op conditions
    • Includes parameter and return documentation

utils/dashboardPeriod.ts

  • Added JSDoc for resolveDashboardPeriod()

    • Documents period resolution priority chain
  • Added JSDoc for shiftDashboardPeriod()

    • Documents period shifting behavior for each period type
  • Added JSDoc for dashboardPeriodToSearchParams()

    • Documents query parameter serialization behavior

middleware.ts

  • Updated existing JSDoc header
  • Added /api/compare to the protected routes list to match the middleware matcher configuration

Impact

  • Improves code readability and maintainability
  • Enhances IDE autocomplete and hover documentation
  • Makes onboarding easier for new contributors
  • Ensures documentation remains consistent with implementation
  • No functional or behavioral changes

Pillar

  • 🎨 Pillar 1 — New Theme Design
  • 📐 Pillar 2 — Geometric SVG Improvement
  • 🕐 Pillar 3 — Timezone Logic Optimization
  • 🛠️ Other (Bug fix, refactoring, docs)

Visual Preview

N/A – Documentation-only changes with no UI or SVG modifications.


Checklist before requesting a review:

  • I have read the CONTRIBUTING.md file.
  • I have tested these changes locally (localhost:3000/api/streak?user=YOUR_USERNAME).
  • I have run npm run format and npm run lint locally and resolved all errors (CI will fail otherwise).
  • My commits follow the Conventional Commits format (e.g., feat(themes): ..., fix(calculate): ...).
  • I have updated README.md if I added a new theme or URL parameter. (Not applicable)
  • I have starred the repo.
  • I have made sure that I have only one commit to merge in this PR.
  • The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts).
  • (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 2, 2026

@Aryan-Agarwal-creator is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

👋 Hey @Aryan-Agarwal-creator, welcome to CommitPulse! 🎉

Thanks for opening your first pull request — this is a big deal and we appreciate the effort!

While you wait for a review, please double-check:

  • ✅ You've read the CONTRIBUTING.md checklist
  • npm run lint, npm run format, and npm run test all pass locally
  • ✅ Your PR has a visual preview if it touches any SVG output
  • 💬 You've joined our Discord for faster PR feedback

A maintainer will review your PR shortly. Hang tight! 🚀

@Karanjot786
Copy link
Copy Markdown

Hey @Aryan-Agarwal-creator! Saw your work on GSSoC 2026.

We are building TermUI, a TypeScript terminal UI framework with React-style hooks and JSX, rendered entirely in the terminal.

We have 99 unassigned GSSoC issues open, including well-scoped bug fixes with clear repro steps. Your TypeScript background transfers directly.

Karanjot, TermUI maintainer

@github-actions github-actions Bot added the type:docs Documentation changes, wikis, or README updates label Jun 3, 2026
@Aamod007 Aamod007 added GSSoC 2026 mentor:Aamod007 level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 3, 2026
@JhaSourav07 JhaSourav07 added level:beginner Small changes Usually isolated fixes or simple UI/text updates. quality:exceptional Outstanding contribution with exceptional implementation quality, testing. gssoc:approved PR has been reviewed and accepted for valid contribution points and removed level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. labels Jun 3, 2026
@JhaSourav07 JhaSourav07 merged commit 7624de5 into JhaSourav07:main Jun 3, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved PR has been reviewed and accepted for valid contribution points GSSoC 2026 level:beginner Small changes Usually isolated fixes or simple UI/text updates. mentor:Aamod007 quality:exceptional Outstanding contribution with exceptional implementation quality, testing. type:docs Documentation changes, wikis, or README updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Multiple exported utility functions across 3 files are completely missing JSDoc comments

4 participants