Add copy toast feedback#627
Conversation
|
@shreyamittal0622 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
👋 Hey @shreyamittal0622, 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:
A maintainer will review your PR shortly. Hang tight! 🚀 |
|
🚨 Hey @shreyamittal0622, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
Aamod007
left a comment
There was a problem hiding this comment.
{children} rendered twice in app/layout.tsx:75 — line 75 has a duplicate {children} just before . The page content already renders on line 72. This second {children} will cause the entire page to render twice. Remove that line.
|
Please pull the latest changes and resolve the conflicts so we can review it! git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-leaseOnce resolved, the |
1 similar comment
|
Please pull the latest changes and resolve the conflicts so we can review it! git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-leaseOnce resolved, the |
## Description Fixes JhaSourav07#397 ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs) ## Visual Preview N/A - Test only, no visual changes ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [x] I have tested these changes locally. - [x] I have run `npm run format` and `npm run lint` locally and resolved all errors. - [x] My commits follow the Conventional Commits format. - [ ] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have starred the repo. - [x] 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. - [ ] (Recommended) I joined the CommitPulse Discord server.
* refactor(i18n): add Portuguese locale to badge labels * style(readme): format Portuguese locale docs
* test(api): add integration tests for og route * fix(test): resolve og route typecheck issues
…26 ] (JhaSourav07#598) * fix(TTLCache): reset insertion order on key update in set() * ci: retrigger pipeline
* refactor(i18n): add Korean locale to badge labels * style(readme): format after conflict resolution * fix(readme): remove merge artifacts
* docs: add architecture overview * style: format architecture document * style: apply prettier formatting
## Description - exported cacheKey function - added unit tests for cacheKey - tested with and without year - tested lowercase conversion - tested all three kind values - Fixes JhaSourav07#364 ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs) ## Visual Preview N/A ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [x] I have tested these changes locally (`localhost:3000/api/streak?user=YOUR_USERNAME`). - [x] I have run `npm run format` and `npm run lint` locally and resolved all errors (CI will fail otherwise). - [x] 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. - [ ] I have started the repo. - [x] 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.
6dc0c14 to
2fc3259
Compare
a0e33c1 to
d7acce4
Compare
3c81f48 to
104353d
Compare
|
can u please see into it i am fixing thses things again and again |
a8a0890 to
104353d
Compare
|
all issues have been fixed kindly merge it |
Aamod007
left a comment
There was a problem hiding this comment.
- useRecentSearches hydration bug — The original code used useEffect to load from localStorage, ensuring SSR and client first render both returned empty (no mismatch). The new code uses a useState lazy initializer that reads localStorage during the client's hydration render, producing different output than the SSR HTML → hydration mismatch.
- Unused dependency — react-hot-toast is installed with zero usage. Unnecessary bundle bloat.
There was a problem hiding this comment.
Pull request overview
This PR is intended to add toast feedback for copy-to-clipboard actions, but the submitted changes mostly add a toast dependency and include unrelated hook/footer changes without implementing the described copy toast behavior.
Changes:
- Adds
react-hot-toastto dependencies and lockfile. - Refactors
useRecentSearcheslocalStorage hydration logic. - Adjusts footer spacing/alignment styles.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
package.json |
Adds react-hot-toast dependency. |
package-lock.json |
Updates lockfile for the new dependency, with additional metadata churn. |
hooks/useRecentSearches.ts |
Refactors recent-search persistence and hydration behavior. |
app/components/Footer.tsx |
Changes footer layout and spacing classes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "next": "^16.2.3", | ||
| "react": "19.2.4", | ||
| "react-dom": "19.2.4", | ||
| "react-hot-toast": "^2.6.0", |
| const [state, setState] = useState<State>(() => { | ||
| if (typeof window === 'undefined') { | ||
| return { | ||
| searches: [], | ||
| mounted: false, | ||
| }; | ||
| } | ||
|
|
||
| localStorage.setItem(STORAGE_KEY, JSON.stringify(searches)); | ||
| } catch { | ||
| // ignore storage write failures | ||
| } | ||
| } | ||
| try { | ||
| const stored = localStorage.getItem(STORAGE_KEY); | ||
|
|
||
| return { | ||
| searches: stored ? (JSON.parse(stored) as string[]) : [], | ||
| mounted: true, | ||
| }; |
There was a problem hiding this comment.
i have actually done the same only
| <footer className="mt-14 border-t border-black/15 bg-transparent pt-10 pb-4 text-sm transition-colors dark:border-white/10"> | ||
| <div className="mx-auto flex max-w-7xl flex-col items-start justify-between gap-8 px-6 md:flex-row"> |

Description
Added toast notifications for copy-to-clipboard actions to improve user feedback and usability.
Fixes #614
Pillar
##Changes Made
##Why
Previously, users received no clear feedback after clicking the copy button, which could make the action feel unresponsive.
This improves the overall UX by providing immediate visual confirmation for copy actions.
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.