Skip to content

Conversation

@naheel0
Copy link
Contributor

@naheel0 naheel0 commented Feb 10, 2026

🚀 BΞYTΞFLʘW | Pull Request Protocol

PR Type: (Choose one: feat | fix | refactor | docs | perf)
Issue Link: Fixes #


📝 System Summary

Provide a concise brief of the changes introduced to the stream.

🛠️ Technical Changes

  • Logic change in ...
  • New UI component added: ...
  • Database schema updated: ...

🧪 Quality Assurance (QA)

  • Linting: Code style matches the BeyteFlow grid.
  • Build: npm run build executed without errors.
  • Testing: New logic has been verified and tested.
  • Dark Mode: UI is high-contrast and neon-optimized.

🖼️ Visual Evidence

If this PR affects the UI, drop a screenshot or GIF below:


📡 Developer Authorization

  • I have performed a self-review of my code.
  • My changes generate no new warnings in the console.
  • I have updated the documentation (if applicable).

Authorized by: @naheel0
Timestamp: {{ 10/2/2026 }}


Co-Authored-By: Shemin-jr <224712958+shemin-jr@users.noreply.github.com>
@naheel0 naheel0 requested a review from adithyanmkd as a code owner February 10, 2026 08:49
@vercel
Copy link

vercel bot commented Feb 10, 2026

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

Project Deployment Actions Updated (UTC)
readme-gen-ai Ready Ready Preview, Comment Feb 10, 2026 9:19am

@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Warning

Rate limit exceeded

@naheel0 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 59 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📝 Walkthrough

Walkthrough

Centralizes navigation into src/constants/navLinks.ts, adds Radix Slot support to the Button, introduces three new docs components (QuickStart, DocSections, FAQ), enhances the Examples page with a preview modal and copy workflow, updates several pages to import navLinks, and updates app metadata and a dependency.

Changes

Cohort / File(s) Summary
Dependencies
package.json
Added @radix-ui/react-slot ^1.2.4.
Metadata & Layout
src/app/layout.tsx
Updated metadata title to "REadmeGenAI" and added icons (paths to /ReadmeGenAI.png).
Navigation Constants
src/constants/navLinks.ts
Added exported navLinks array with Home, Features, Examples, Docs for centralized navigation.
Pages Refactoring
src/app/.../page.tsx
src/app/page.tsx, src/app/docs/page.tsx, src/app/examples/page.tsx, src/app/features/page.tsx, src/app/generate/page.tsx
Pages now import navLinks instead of local arrays; docs page replaced inline layout with component composition; examples page adds preview modal, copy feedback and per-example markdown; generate page improved error handling; minor styling/text adjustments across pages.
New Documentation Components
src/components/docs/{QuickStart.tsx,DocSections.tsx,FAQ.tsx}
Added three client components: QuickStart, DocSections, and FAQ (static content, responsive layouts).
UI & Generator Components
src/components/ui/Button.tsx, src/components/Generator/{SearchInput.tsx,MarkdownPreview.tsx}, src/components/sections/Hero.tsx
Button gains asChild?: boolean and uses @radix-ui/react-slot Slot when asChild is true; SearchInput adds GitHub URL validation and inline error UI; MarkdownPreview uses async clipboard handling with try/catch; minor Hero formatting and badge change.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant ExamplesPage as Examples Page
    participant Modal as Preview Modal
    participant Clipboard as Clipboard API

    User->>ExamplesPage: Click "View Sample"
    ExamplesPage->>Modal: open with example markdown
    Modal-->>User: render preview + Copy button
    User->>Modal: Click Copy
    Modal->>Clipboard: writeText(previewContent)
    Clipboard-->>Modal: Success
    Modal-->>User: show success indicator (Check) then revert
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • update frontend #17 — Overlapping changes to frontend pages and components (docs, examples, features, generate, home).
  • update home page #16 — Related to Button component changes; previously introduced the Button implementation that is now extended with asChild/Slot.
  • add nextjs #2 — Related package/layout edits and dependency changes across the app.

Suggested labels

area: frontend

Suggested reviewers

  • adithyanmkd

Poem

🐰 A hop into code, components align,

NavLinks gathered, docs now shine!
Modals that preview, copy with a cheer,
Buttons that slot, icons appear—
REadmeGenAI leaps forward, clear. 🥕

🚥 Pre-merge checks | ❌ 3
❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is a template with placeholders and checkboxes but contains no concrete information about the actual code changes, making it completely unrelated to the actual changeset. Replace the template with a meaningful description of the actual changes made, including details about the refactored docs page, new components, navigation centralization, and other modifications.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'update docs page' is vague and does not specifically convey the actual scope of changes, which include refactoring the docs page layout, adding new documentation components (QuickStart, DocSections, FAQ), centralizing navigation links, and updating branding across multiple pages. Provide a more descriptive title that reflects the main changes, such as 'Refactor docs page with new component-based layout and centralize navigation links' or similar.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch frontend

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 9

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/features/page.tsx (1)

41-46: 🛠️ Refactor suggestion | 🟠 Major

Use the shared navLinks constant instead of a local definition.

Other pages in this PR (page.tsx, docs/page.tsx, generate/page.tsx) import from @/constants/navLinks. This page still defines navLinks locally, which defeats the purpose of centralizing navigation data.

♻️ Suggested fix
+"use client";
+import React from 'react';
+import { navLinks } from '@/constants/navLinks';
 import { Navbar } from '@/components/layout/Navbar';

Then remove the local definition:

 export default function FeaturesPage() {
-  const navLinks = [
-    { name: 'Home', href: '/' },
-    { name: 'Features', href: '/features' },
-    { name: 'Examples', href: '/examples' },
-    { name: 'Docs', href: '/docs' },
-  ];
-
   return (
🤖 Fix all issues with AI agents
In `@src/app/docs/page.tsx`:
- Around line 23-26: The paragraph element in the Docs page component currently
uses the product name "ReadmeArchitect" — update the string inside the <p>
element in src/app/docs/page.tsx to "ReadmeGenAI" so it matches the rest of the
app (Navbar, Footer, other pages); ensure the exact phrasing and punctuation
remain consistent with surrounding copy.
- Line 11: The Tailwind class in the JSX div's className uses the wrong
background-size token `bg-size[40px_40px]`; update the class to use the v4
bracketed utility syntax `bg-size-[40px_40px]` inside the same className string
(the div with className containing the linear-gradient and mask utilities) so
Tailwind will recognize and generate the background-size rule.

In `@src/app/examples/page.tsx`:
- Around line 56-60: The handleCopy function currently awaits
navigator.clipboard.writeText without handling rejection; wrap the writeText
call in a try/catch inside handleCopy (referencing handleCopy and setCopied) so
that on success you call setCopied(true) and schedule the reset, and on failure
you catch the error, log it (e.g., console.error or processLogger) and
optionally surface UI feedback instead of setting copied; keep the timeout reset
logic only for the success path and avoid unhandled promise rejections.
- Around line 131-166: The modal rendered when previewContent is truthy (the
overlay div and inner panel) lacks keyboard accessibility and body scroll
handling; add an Escape key handler to close the modal (listen for 'Escape'
either via an onKeyDown on the overlay or a useEffect that calls
setPreviewContent(null)), implement focus trapping so keyboard focus is
contained within the modal (ensure initial focus goes to the close button or
first focusable and prevent tabbing out while previewContent exists), lock body
scroll while the modal is open (add/remove document.body.style.overflow =
'hidden' in the same effect that watches previewContent), and replace the
non-descriptive aria-label on the close button (currently aria-label="button")
with a meaningful label like "Close preview" so assistive tech users understand
the action; reference previewContent, setPreviewContent, handleCopy, and the
close button/X icon when making these changes.

In `@src/app/generate/page.tsx`:
- Around line 23-26: The error-path uses response.json() directly and can throw
if the server returns non-JSON (e.g., HTML 502), masking the real HTTP error;
update the error handling around the fetch response (the block that checks
response.ok and calls response.json()) to first read response.text(), then
attempt JSON.parse/text→JSON inside a try/catch, and when parsing fails fall
back to the raw text; finally throw an Error containing the HTTP status
(response.status / statusText) and either the parsed error.message or the raw
response text so the real HTTP error is preserved (look for the response.ok
check and the code that builds errorData/error message in page.tsx).

In `@src/app/layout.tsx`:
- Line 17: Update the scaffold placeholder description string in the exported
metadata (the description field in the metadata object in layout.tsx) to a
concise, product-accurate description replacing "Generated by create next app";
locate the metadata export (export const metadata = { ... }) and change
description to a meaningful sentence that summarizes the app's purpose and
audience.
- Line 16: Update the site title string from "REadmeGenAI" to "ReadmeGenAI"
where it's defined (the title property in src/app/layout.tsx) to correct the
capitalization; search for the title key and ensure any identical occurrences
(e.g., in exported metadata or head configuration) are consistently changed to
"ReadmeGenAI".

In `@src/app/page.tsx`:
- Around line 36-38: The page.tsx currently wraps the Features component with a
div that duplicates id="features", causing invalid HTML; update src/app/page.tsx
to remove the outer wrapper or at least remove its id attribute so only the
Features component's <section id="features"> (from Features component) provides
that id—locate the div containing <Features items={featureList} /> and delete
the div or its id="features" to avoid duplicate IDs.

In `@src/components/sections/Hero.tsx`:
- Line 35: The Link in Hero.tsx uses a relative href ("generate") which causes
incorrect routing; change the href on the Link component (the element with
href="generate" in src/components/sections/Hero.tsx) to an absolute path
"/generate" so Next.js Link resolves to the intended top-level route (mirror how
the other Link uses "/examples").
🧹 Nitpick comments (9)
src/components/Generator/SearchInput.tsx (2)

19-26: Consider hoisting the regex constant outside the component.

The regex is re-created on every form submission. Moving it to module scope avoids unnecessary re-compilation and makes it easier to reuse or test independently.

♻️ Suggested refactor
+const GITHUB_URL_PATTERN = /^https?:\/\/(www\.)?github\.com\/[\w.-]+\/[\w.-]+\/?$/;
+
 export const SearchInput = ({ onGenerate, isLoading }: SearchInputProps) => {

Then inside handleSubmit:

-    const githubUrlPattern = /^https?:\/\/(www\.)?github\.com\/[\w.-]+\/[\w.-]+\/?$/;
-    
-    if (githubUrlPattern.test(url.trim())) {
+    if (GITHUB_URL_PATTERN.test(url.trim())) {

20-22: Regex accepts http:// — consider restricting to https:// only.

GitHub enforces HTTPS. Accepting plain http:// could pass validation for a URL that will fail or redirect downstream. If your backend handles this gracefully, this is a non-issue, but tightening the regex to ^https:// would be more accurate.

src/components/docs/FAQ.tsx (2)

1-1: "use client" may be unnecessary here.

This component has no state, effects, or event handlers. It could be a server component, which would reduce the client bundle size. If the parent page is already a client component, this is moot, but worth considering.


6-9: Hoist static data outside the component.

The faqs array is recreated on every render. Move it outside the component as a module-level constant since it never changes.

♻️ Suggested fix
+const faqs = [
+  { q: "How does the AI analyze my code?", a: "We use AST parsing and heuristic analysis to identify entry points and dependencies without storing your actual source code." },
+  { q: "Can I use this for private repos?", a: "Yes, by connecting your GitHub account, we can securely analyze private repositories with your permission." }
+];
+
 export const FAQ = () => {
-  const faqs = [
-    { q: "How does the AI analyze my code?", a: "We use AST parsing and heuristic analysis to identify entry points and dependencies without storing your actual source code." },
-    { q: "Can I use this for private repos?", a: "Yes, by connecting your GitHub account, we can securely analyze private repositories with your permission." }
-  ];
-
   return (
src/components/ui/Button.tsx (1)

7-7: Remove leftover implementation comments.

Comments like // Add this prop, // Default to false, and // If asChild is true, we render the 'Slot', otherwise we render 'button' read like development notes rather than useful documentation. The code is self-explanatory.

♻️ Suggested cleanup
-  asChild?: boolean; // Add this prop
+  asChild?: boolean;
-  asChild = false, // Default to false
+  asChild = false,
-  // If asChild is true, we render the 'Slot', otherwise we render 'button'
   const Component = asChild ? Slot : 'button';

Also applies to: 14-14, 24-25

src/app/page.tsx (1)

1-1: "use client" may be unnecessary here.

This page component doesn't use hooks, event handlers, or browser APIs directly. Child components like Navbar that need client interactivity already declare their own "use client" directive. Removing it would allow Next.js to render this page as a Server Component, reducing the client JS bundle.

src/components/docs/QuickStart.tsx (1)

1-1: "use client" is unnecessary — this component has no client-side interactivity.

There are no hooks, event handlers, or browser APIs used. Removing the directive lets Next.js render it on the server, reducing the client bundle.

src/components/docs/DocSections.tsx (1)

1-1: Same as QuickStart.tsx"use client" is unnecessary here.

No hooks or browser APIs are used; this can be a Server Component.

src/app/examples/page.tsx (1)

132-133: Clicking the backdrop doesn't close the modal.

Users expect to dismiss a modal by clicking outside the content area. Add an onClick on the overlay that closes when the target is the backdrop itself.

Proposed fix
-          <div className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-md animate-in fade-in duration-300">
+          <div
+            className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-md animate-in fade-in duration-300"
+            onClick={(e) => { if (e.target === e.currentTarget) setPreviewContent(null); }}
+          >

Added accessibility features for modal management and improved clipboard copy handling.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/app/docs/page.tsx`:
- Line 11: The JSX div with className containing Tailwind arbitrary values uses
backtick characters around hex values (the element with className that starts
with "absolute inset-0 bg-[linear-gradient...") which produces invalid CSS;
remove all backticks around the hex/_px tokens inside the arbitrary value blocks
(e.g., change `#80808012_1px` to `#80808012_1px`) and ensure the div line's
indentation matches the file's conventions (align with surrounding JSX
indentation).

Enhanced error handling to provide more informative messages based on response status and content.
Updated metadata title and description for ReadmeGenAI.
@naheel0 naheel0 merged commit d1ba040 into main Feb 10, 2026
4 checks passed
@naheel0 naheel0 deleted the frontend branch February 10, 2026 09:20
@naheel0 naheel0 added the area: frontend Changes specifically for the UI/Tailwind components. label Feb 10, 2026
@naheel0 naheel0 linked an issue Feb 10, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: frontend Changes specifically for the UI/Tailwind components.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Title: [FE] Implement README Generator UI & Markdown Previewer

1 participant