Include Complete Installation and Development Workflow Guidelines#62
Include Complete Installation and Development Workflow Guidelines#62aniket866 wants to merge 8 commits intoStabilityNexus:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughAdds a contributing guide and reorganizes frontend UI: introduces shared constants and hooks, replaces several local component implementations with data-driven versions, adds a top Navbar and theme toggle UI, moves to absolute imports, and re-exports components via a barrel file. Several components changed export styles. Changes
Sequence Diagram(s)mermaid (Note: colored rectangles not required for this simple sequential flow.) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In `@Contributing.md`:
- Around line 60-183: The markdown linter (MD040) complains about fenced code
blocks without language identifiers in Contributing.md; update every
triple-backtick fence that contains shell/command examples (e.g., the blocks
around the git clone/cd snippet, git remote add upstream, git checkout -b
examples, npm install, npm run prepare, npm run dev/build/start, and the
lint/format/check-format commands) by adding an appropriate language tag such as
bash (```bash) so all code fences include a language identifier and satisfy
MD040.
- Around line 234-273: Several markdown headings in this snippet use two spaces
after the leading '#' (e.g., the headings currently written as "# 7️⃣ Commit
Properly", "# 8️⃣ Sync With Upstream", "# 9️⃣ Push Your Branch", and "# 🔟
Open a Pull Request"); fix them by replacing the double space after '#' with a
single space so each heading starts with "# " followed immediately by the emoji
and title (update the headings in the Contributing.md content where these exact
header texts appear).
- Around line 1-314: Prettier is failing on Contributing.md; run the project's
formatter on that file (e.g. npm run format or npx prettier --write
Contributing.md), stage and commit the updated Contributing.md, then push the
branch so CI can re-run; ensure you only modify formatting (no content changes)
and include the formatted Contributing.md in the PR update.
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (3)
components/HowItWorks.tsx (1)
9-22: Clean data-driven refactor.The move to
STEPS_DATAwith a safe fallback on line 22 is good. One minor note: the logic assumes stepidvalues are sequential1..NmatchingSTEPS_DATA.length. If step IDs ever become non-sequential, the cycling logic on line 15 and the progress bar calculations on lines 68/79 (dividing bytotalSteps - 1) will break. Consider using array index instead ofidfor the active step, or add a comment documenting the assumption.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@components/HowItWorks.tsx` around lines 9 - 22, The carousel currently treats activeStep as a 1..N id tied to STEPS_DATA.length which will break if STEPS_DATA ids are non-sequential; change to an index-based approach: replace activeStep/setActiveStep with activeIndex/setActiveIndex (0..length-1), update the useEffect interval to increment index modulo STEPS_DATA.length, compute currentStepData as STEPS_DATA[activeIndex], and update any progress bar math (previously using totalSteps and id) to use indexes and STEPS_DATA.length consistently; update any references to activeStep, currentStepData lookup, and progress calculations to use activeIndex to avoid assumptions about id sequencing.lib/constants.ts (2)
3-5: EmptyNAV_LINKSexport.This is exported but unused anywhere. If it's a planned placeholder, consider adding a type annotation so future consumers know the expected shape, or remove it until needed to avoid dead code.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/constants.ts` around lines 3 - 5, NAV_LINKS is an exported but empty and unused constant; either remove the export to avoid dead code, or define and export a clear type and annotate NAV_LINKS so future consumers know the shape. To fix, add a type declaration (e.g., export type or interface named NavLink with fields like label: string and href: string, plus any optional props) and change the NAV_LINKS declaration to be typed as NavLink[] = []; or simply delete the NAV_LINKS export if there is no planned usage.
52-57: Consider restructuringSOCIAL_LINKSas an array for easier iteration.The current object shape requires manual key access in consumers (e.g.,
SOCIAL_LINKS.github). An array of{ href, src, alt }objects would allow.map()in CTASection, fully leveraging the data-driven pattern used elsewhere (FEATURES_DATA, STEPS_DATA).Suggested alternative shape
export const SOCIAL_LINKS = [ { href: "https://stability.nexus/", src: "/stability.svg", alt: "Stability Nexus" }, { href: "https://github.com/StabilityNexus", src: "/socials/GitHub.svg", alt: "GitHub" }, { href: "https://discord.gg/YzDKeEfWtS", src: "/socials/Discord.svg", alt: "Discord" }, { href: "https://linkedin.com/company/stability-nexus", src: "/socials/LinkedIn.svg", alt: "LinkedIn" }, ];🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@lib/constants.ts` around lines 52 - 57, Refactor the SOCIAL_LINKS export from an object to an array of link objects (each with href, src, alt) so components can iterate with .map; update any consumers (notably CTASection) to read the new array and render items by mapping over SOCIAL_LINKS instead of accessing keys like SOCIAL_LINKS.github; keep the new shape consistent with other data arrays like FEATURES_DATA/STEPS_DATA and ensure import names remain SOCIAL_LINKS to minimize caller changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/CTASection.tsx`:
- Line 5: The SocialIcon component and SOCIAL_LINKS constant are
defined/imported but not used; replace the hardcoded social link JSX (the blocks
currently rendering individual anchor+svg items) with a map over SOCIAL_LINKS
inside the CTASection render, rendering <SocialIcon key={...} {...link} /> for
each entry so the component uses the centralized data; update CTASection's JSX
where the hardcoded links appear (the large anchor/SVG groups around lines
~51–111 and the similar block ~118–142) to a single mapped list and remove the
unused manual items so lint warnings disappear and SocialIcon/SOCIAL_LINKS are
actually consumed.
In `@components/ui/ToggleButton.tsx`:
- Around line 49-51: The ripple cleanup timeout in ToggleButton uses setTimeout
to call setRipples after 1s but doesn't cancel the timer on unmount; update the
component to store timeout IDs (e.g., a ref like timeoutsRef) whenever you call
setTimeout for a new ripple in the event handler that creates newRipple, and add
a useEffect cleanup that iterates and clears all pending timeouts (clearTimeout)
to prevent calling setRipples on an unmounted component; ensure you also remove
the corresponding timeout ID when you manually filter out a ripple in the
existing setRipples logic so no orphan timers remain.
- Around line 6-15: ToggleButton's current lazy state read uses
window/localStorage during initialization which yields different values on
server vs client and causes a hydration mismatch; replace this with a SSR-safe
approach: either use next-themes by wrapping the app in ThemeProvider and
consume useTheme() inside ToggleButton (use theme and setTheme from useTheme) or
change ToggleButton to initialize isDarkMode to a consistent default (e.g.,
false), add a mounted boolean via useEffect to read
localStorage/window.matchMedia only after mount, and render a placeholder (e.g.,
fixed-size div) while !mounted to avoid mismatched DOM; update references in
ToggleButton to use the new theme setter (setTheme or setIsDarkMode after mount)
accordingly.
In `@hooks/useTypewriter.ts`:
- Around line 7-13: Guard against an empty words array in useTypewriter: inside
the hook (useTypewriter) ensure you handle words.length === 0 before accessing
words[wordIndex] (currentWord). Either return early from the hook/effect (no
timers started and keep displayedText as "") or set a safe default currentWord
(e.g., "") so subsequent uses of currentWord.length or string operations cannot
throw; update references to currentWord, wordIndex and the effect cleanup to
respect this guard.
In `@package.json`:
- Line 32: The package.json lists next-themes but it isn't used; either remove
the dependency or refactor components to use next-themes: remove "next-themes"
from package.json and run install cleanup if you choose deletion, or integrate
ThemeProvider at your app root (wrap the app in ThemeProvider) and replace the
ToggleButton's localStorage/classList logic with useTheme (import useTheme in
ToggleButton and call theme, setTheme to toggle) so theme state is sourced from
next-themes and SSR hydration issues are avoided; update imports and tests
accordingly.
---
Duplicate comments:
In `@Contributing.md`:
- Around line 1-313: Prettier is failing on Contributing.md due to unformatted
content and missing language identifiers on several fenced code blocks; open
Contributing.md, add appropriate language tags (e.g., bash) to each fenced code
block containing shell/command snippets such as the git clone snippet, git
remote add upstream, npm install, npm run prepare, npm run dev, npm run build,
npm run lint/format/check-format, and other code blocks shown in the file, then
run npm run format and npm run lint to auto-fix formatting and verify no lint
errors, commit the updated Contributing.md to resolve the CI failures.
---
Nitpick comments:
In `@components/HowItWorks.tsx`:
- Around line 9-22: The carousel currently treats activeStep as a 1..N id tied
to STEPS_DATA.length which will break if STEPS_DATA ids are non-sequential;
change to an index-based approach: replace activeStep/setActiveStep with
activeIndex/setActiveIndex (0..length-1), update the useEffect interval to
increment index modulo STEPS_DATA.length, compute currentStepData as
STEPS_DATA[activeIndex], and update any progress bar math (previously using
totalSteps and id) to use indexes and STEPS_DATA.length consistently; update any
references to activeStep, currentStepData lookup, and progress calculations to
use activeIndex to avoid assumptions about id sequencing.
In `@lib/constants.ts`:
- Around line 3-5: NAV_LINKS is an exported but empty and unused constant;
either remove the export to avoid dead code, or define and export a clear type
and annotate NAV_LINKS so future consumers know the shape. To fix, add a type
declaration (e.g., export type or interface named NavLink with fields like
label: string and href: string, plus any optional props) and change the
NAV_LINKS declaration to be typed as NavLink[] = []; or simply delete the
NAV_LINKS export if there is no planned usage.
- Around line 52-57: Refactor the SOCIAL_LINKS export from an object to an array
of link objects (each with href, src, alt) so components can iterate with .map;
update any consumers (notably CTASection) to read the new array and render items
by mapping over SOCIAL_LINKS instead of accessing keys like SOCIAL_LINKS.github;
keep the new shape consistent with other data arrays like
FEATURES_DATA/STEPS_DATA and ensure import names remain SOCIAL_LINKS to minimize
caller changes.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
I have fixed Linting-failures Please check |
Addressed Issues:
Closes #52
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit
Documentation
New Features
UI Improvements