feat: Add Reddit Scout AgentKit#105
Conversation
|
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. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdds a new "Reddit Scout" agentic kit: a Next.js app, UI component library, Lamatic workflow files, orchestration client/server code, and development/configuration files to run a Reddit-focused LLM workflow that searches, scrapes, aggregates, and summarizes Reddit discussion for a given query. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Client as Browser (React)
participant Server as Next.js Server Action
participant LamaticAPI as Lamatic API / Flow Engine
participant Serper as Web Search (Serper)
participant LLM as LLM Provider
User->>Client: Enter query & submit
Client->>Server: call searchReddit(query)
Server->>LamaticAPI: executeFlow(workflowId, { query })
LamaticAPI->>LLM: generate Reddit-focused search query
LamaticAPI->>Serper: perform web search (Serper) using query
Serper-->>LamaticAPI: return search results (links/snippets)
LamaticAPI->>LamaticAPI: batch scrape each Reddit thread (loop)
LamaticAPI->>LLM: synthesize aggregated Reddit data -> markdown
LamaticAPI-->>Server: respond with { success, answer }
Server-->>Client: send result
Client->>User: render markdown summary
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 17
Note
Due to the large number of review comments, Critical, Major severity comments were prioritized as inline comments.
🟡 Minor comments (16)
kits/agentic/reddit-scout/.gitignore-19-21 (1)
19-21:⚠️ Potential issue | 🟡 MinorAdd
.env.localto prevent accidental secret commits.The
.enventry is present, but.env.localis missing. Next.js commonly uses.env.localfor local environment overrides containing secrets.Proposed fix
# env files .env +.env.localAs per coding guidelines: "The
.gitignorefile must exclude.envand.env.localto prevent accidental secret commits."kits/agentic/reddit-scout/components/ui/use-toast.ts-174-182 (1)
174-182:⚠️ Potential issue | 🟡 MinorSame
useEffectdependency issue as inhooks/use-toast.ts.The
[state]dependency causes unnecessary re-subscriptions on every state change. Should be[]for mount-only subscription.Proposed fix
- }, [state]) + }, [])kits/agentic/reddit-scout/hooks/use-toast.ts-174-182 (1)
174-182:⚠️ Potential issue | 🟡 MinorIncorrect
useEffectdependency causes unnecessary re-subscriptions.The effect subscribes the listener on mount and should unsubscribe on unmount. Including
statein the dependency array causes the effect to re-run on every state change, repeatedly adding and removing the listener from the array.Proposed fix
React.useEffect(() => { listeners.push(setState) return () => { const index = listeners.indexOf(setState) if (index > -1) { listeners.splice(index, 1) } } - }, [state]) + }, [])kits/agentic/reddit-scout/.env.example-1-4 (1)
1-4:⚠️ Potential issue | 🟡 MinorRemove spaces around
=signs in environment variable declarations.Spaces around the
=sign in.envfiles can cause parsing issues with some environment loaders. Standard.envformat usesKEY=valuewithout spaces.🔧 Proposed fix
-REDDIT_SCOUT_FLOW_ID = "YOUR_FLOW_ID" -LAMATIC_API_URL = "YOUR_LAMATIC_API_URL" -LAMATIC_PROJECT_ID = "YOUR_LAMATIC_PROJECT_ID" -LAMATIC_API_KEY = "YOUR_LAMATIC_API_KEY" +LAMATIC_API_KEY="YOUR_LAMATIC_API_KEY" +LAMATIC_API_URL="YOUR_LAMATIC_API_URL" +LAMATIC_PROJECT_ID="YOUR_LAMATIC_PROJECT_ID" +REDDIT_SCOUT_FLOW_ID="YOUR_FLOW_ID"kits/agentic/reddit-scout/README.md-37-37 (1)
37-37:⚠️ Potential issue | 🟡 MinorCapitalize "Markdown" as a proper noun.
"Markdown" is a proper noun (the name of the formatting language) and should be capitalized.
📝 Proposed fix
-- **ReactMarkdown** — renders AI output as formatted markdown +- **ReactMarkdown** — renders AI output as formatted Markdownkits/agentic/reddit-scout/orchestrate.js-17-17 (1)
17-17:⚠️ Potential issue | 🟡 Minor
pollingshould be a boolean, not a string.The value
"false"is a string that will be truthy in JavaScript conditionals. If this is intended as a boolean flag, usefalsewithout quotes.🐛 Proposed fix
- "polling" : "false" + "polling" : falsekits/agentic/reddit-scout/README.md-133-148 (1)
133-148:⚠️ Potential issue | 🟡 MinorAdd language specifier to fenced code block.
The repo structure code block should have a language specifier for proper rendering. Use
textorplaintextfor directory trees.📝 Proposed fix
-``` +```text /actions └── orchestrate.ts # Lamatic workflow orchestrationkits/agentic/reddit-scout/components/ui/kbd.tsx-18-26 (1)
18-26:⚠️ Potential issue | 🟡 MinorType mismatch:
KbdGroupacceptsdivprops but renders akbdelement.The component type signature uses
React.ComponentProps<'div'>but the rendered element is<kbd>. This could cause type errors when passing kbd-specific attributes.🐛 Proposed fix
-function KbdGroup({ className, ...props }: React.ComponentProps<'div'>) { +function KbdGroup({ className, ...props }: React.ComponentProps<'kbd'>) { return ( <kbd data-slot="kbd-group" className={cn('inline-flex items-center gap-1', className)} {...props} /> ) }kits/agentic/reddit-scout/flows/reddit-scout/config.json-11-11 (1)
11-11:⚠️ Potential issue | 🟡 MinorTypo:
responeTypeshould beresponseType.This typo may cause unexpected behavior if the Lamatic runtime expects the correct spelling.
🐛 Proposed fix
- "responeType": "realtime", + "responseType": "realtime",kits/agentic/reddit-scout/package.json-62-62 (1)
62-62:⚠️ Potential issue | 🟡 MinorPin
react-markdownto a specific version instead of"latest".The coding guideline requires all kit dependencies to have pinned versions for reproducibility and to prevent unexpected breaking changes. Replace
"latest"with a specific version (e.g.,"10.1.0").kits/agentic/reddit-scout/package.json-54-54 (1)
54-54:⚠️ Potential issue | 🟡 MinorPin the
lamaticandreact-markdownpackage versions instead of usinglatest.Using
"latest"can cause unexpected breakages when packages are updated. As per coding guidelines, each kit must have pinned dependency versions. Both"lamatic": "latest"(line 54) and"react-markdown": "latest"(line 62) need to be updated with specific versions.kits/agentic/reddit-scout/components/ui/empty.tsx-71-80 (1)
71-80:⚠️ Potential issue | 🟡 MinorFix element/type mismatch in
EmptyDescription.
EmptyDescriptionis typed as paragraph props but currently renders adiv. Render a<p>for semantic correctness and prop-type alignment.Suggested fix
function EmptyDescription({ className, ...props }: React.ComponentProps<'p'>) { return ( - <div + <p data-slot="empty-description" className={cn( 'text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4', className, )} {...props} - /> + /> ) }kits/agentic/reddit-scout/components/ui/form.tsx-45-54 (1)
45-54:⚠️ Potential issue | 🟡 MinorBug: Context check will never throw the intended error.
The check
if (!fieldContext)on line 52 will always pass becauseuseContextreturns the default value ({}) when used outside a Provider, and an empty object is truthy. The error message will never be thrown even whenuseFormFieldis used outside<FormField>.🐛 Proposed fix
Either check for the presence of
name:const useFormField = () => { const fieldContext = React.useContext(FormFieldContext) const itemContext = React.useContext(FormItemContext) const { getFieldState } = useFormContext() const formState = useFormState({ name: fieldContext.name }) const fieldState = getFieldState(fieldContext.name, formState) - if (!fieldContext) { + if (!fieldContext.name) { throw new Error('useFormField should be used within <FormField>') }Or use
nullas the default context value:-const FormFieldContext = React.createContext<FormFieldContextValue>( - {} as FormFieldContextValue, -) +const FormFieldContext = React.createContext<FormFieldContextValue | null>(null) const useFormField = () => { const fieldContext = React.useContext(FormFieldContext) // ... + if (!fieldContext) { + throw new Error('useFormField should be used within <FormField>') + }kits/agentic/reddit-scout/components/ui/chart.tsx-235-239 (1)
235-239:⚠️ Potential issue | 🟡 MinorDon't hide zero values in the tooltip.
The truthy check drops legitimate
0values, so zero-count series disappear from the rendered tooltip.Suggested fix
- {item.value && ( + {item.value !== undefined && item.value !== null && ( <span className="text-foreground font-mono font-medium tabular-nums"> {item.value.toLocaleString()} </span> )}kits/agentic/reddit-scout/components/ui/field.tsx-199-214 (1)
199-214:⚠️ Potential issue | 🟡 MinorReturn
nullwhenerrorscontains no messages.Inputs like
errors={[undefined]}or[{}]currently render an emptyrole="alert", which becomes a blank announcement for assistive tech.Suggested fix
- if (!errors) { + if (!errors) { return null } - if (errors.length === 1 && errors[0]?.message) { - return errors[0].message + const messages = errors.flatMap((error) => + error?.message ? [error.message] : [], + ) + + if (messages.length === 0) { + return null + } + + if (messages.length === 1) { + return messages[0] } return ( <ul className="ml-4 flex list-disc flex-col gap-1"> - {errors.map( - (error, index) => - error?.message && <li key={index}>{error.message}</li>, - )} + {messages.map((message, index) => ( + <li key={index}>{message}</li> + ))} </ul> )kits/agentic/reddit-scout/components/ui/input-group.tsx-70-75 (1)
70-75:⚠️ Potential issue | 🟡 MinorConsider handling textarea focus in addon click.
The click handler only queries for
inputelements, butInputGroupTextareais also a valid child. Users clicking the addon when a textarea is present won't trigger focus.🔧 Proposed fix to handle both input and textarea
onClick={(e) => { if ((e.target as HTMLElement).closest('button')) { return } - e.currentTarget.parentElement?.querySelector('input')?.focus() + const parent = e.currentTarget.parentElement + const focusable = parent?.querySelector('input, textarea') as HTMLElement | null + focusable?.focus() }}
🧹 Nitpick comments (22)
kits/agentic/reddit-scout/components/ui/collapsible.tsx (1)
5-31: Consider adding ref forwarding for better component composition.The wrapper components should forward refs to support DOM access and integration with libraries that require ref attachment. This is a best practice for UI primitive wrappers.
♻️ Proposed refactor with ref forwarding
-function Collapsible({ - ...props -}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) { - return <CollapsiblePrimitive.Root data-slot="collapsible" {...props} /> -} +const Collapsible = React.forwardRef< + React.ElementRef<typeof CollapsiblePrimitive.Root>, + React.ComponentProps<typeof CollapsiblePrimitive.Root> +>(({ ...props }, ref) => { + return <CollapsiblePrimitive.Root ref={ref} data-slot="collapsible" {...props} /> +}) +Collapsible.displayName = 'Collapsible' -function CollapsibleTrigger({ - ...props -}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>) { - return ( - <CollapsiblePrimitive.CollapsibleTrigger - data-slot="collapsible-trigger" - {...props} - /> - ) -} +const CollapsibleTrigger = React.forwardRef< + React.ElementRef<typeof CollapsiblePrimitive.CollapsibleTrigger>, + React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger> +>(({ ...props }, ref) => { + return ( + <CollapsiblePrimitive.CollapsibleTrigger + ref={ref} + data-slot="collapsible-trigger" + {...props} + /> + ) +}) +CollapsibleTrigger.displayName = 'CollapsibleTrigger' -function CollapsibleContent({ - ...props -}: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>) { - return ( - <CollapsiblePrimitive.CollapsibleContent - data-slot="collapsible-content" - {...props} - /> - ) -} +const CollapsibleContent = React.forwardRef< + React.ElementRef<typeof CollapsiblePrimitive.CollapsibleContent>, + React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent> +>(({ ...props }, ref) => { + return ( + <CollapsiblePrimitive.CollapsibleContent + ref={ref} + data-slot="collapsible-content" + {...props} + /> + ) +}) +CollapsibleContent.displayName = 'CollapsibleContent'kits/agentic/reddit-scout/components/ui/use-mobile.tsx (1)
1-19: ConsolidateuseIsMobileto a single source of truth.
useIsMobileis duplicated here and inkits/agentic/reddit-scout/hooks/use-mobile.ts. Keeping both will drift over time and cause inconsistent imports.♻️ Suggested change (re-export from hooks)
-import * as React from 'react' - -const MOBILE_BREAKPOINT = 768 - -export function useIsMobile() { - const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined) - - React.useEffect(() => { - const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`) - const onChange = () => { - setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) - } - mql.addEventListener('change', onChange) - setIsMobile(window.innerWidth < MOBILE_BREAKPOINT) - return () => mql.removeEventListener('change', onChange) - }, []) - - return !!isMobile -} +export { useIsMobile } from '../../hooks/use-mobile'kits/agentic/reddit-scout/components/ui/input-otp.tsx (1)
1-7: Filename convention note: kebab-case vs PascalCase.The file uses kebab-case (
input-otp.tsx), which follows shadcn/ui conventions for UI primitives but conflicts with the project's coding guideline requiring PascalCase for component filenames. Consider renaming toInputOtp.tsxfor consistency with the guideline, or document thatcomponents/ui/follows shadcn/ui naming conventions as an exception.As per coding guidelines: "Use PascalCase for React component filenames in the
components/directory".kits/agentic/reddit-scout/flows/reddit-scout/meta.json (2)
2-3: Add a meaningful description for the flow.The
descriptionfield is empty. Consider adding a brief description like "Searches Reddit for product reviews and synthesizes user opinions into structured summaries" to help users understand the flow's purpose.📝 Suggested improvement
{ "name": "Reddit Scout", - "description": "", + "description": "Searches Reddit for product reviews and synthesizes user opinions into structured summaries", "tags": [
10-12: Consider populating URL fields or removing them.The
githubUrl,documentationUrl, anddeployUrlfields are empty strings. If these are intended to be populated later, this is fine. Otherwise, consider removing unused fields or adding the actual URLs now that the live demo exists athttps://reddit-scout-tawny.vercel.app/.kits/agentic/reddit-scout/flows/reddit-scout/README.md (1)
61-61: Use an explicit markdown link for docs URL.Switching to
https://docs.lamatic.aias a markdown link avoids renderer-dependent auto-link behavior.✏️ Suggested doc tweak
-- Check the Lamatic documentation at docs.lamatic.ai +- Check the Lamatic documentation at [docs.lamatic.ai](https://docs.lamatic.ai)kits/agentic/reddit-scout/components/header.tsx (1)
1-41: Rename file to PascalCase:Header.tsxThe filename
header.tsxshould beHeader.tsxto follow PascalCase convention for React component files in thecomponents/directory. As per coding guidelines: "Use PascalCase for React component filenames in thecomponents/directory".kits/agentic/reddit-scout/tsconfig.json (1)
35-38: Remove duplicate include patterns.Lines 37 and 38 contain identical duplicate entries (
.next\\dev/types/**/*.ts). Additionally, mixing backslash (\\) and forward slash (/) path separators may cause cross-platform inconsistencies.🧹 Proposed cleanup
"include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", - ".next/dev/types/**/*.ts", - ".next\\dev/types/**/*.ts", - ".next\\dev/types/**/*.ts" + ".next/dev/types/**/*.ts" ],kits/agentic/reddit-scout/orchestrate.js (1)
1-25: Consider converting to TypeScript for consistency.This configuration file uses JavaScript (
.js), but the coding guidelines recommend TypeScript for kit files. Converting toorchestrate.tswith proper type definitions would improve type safety and consistency with the rest of the codebase.kits/agentic/reddit-scout/lib/lamatic-client.ts (1)
16-20: Redundant fallbacks after validation;nullfallback forprojectIdmay cause issues.The environment variables are validated at lines 4-14, yet lines 17-19 use
??fallbacks. If validation passes, these values are guaranteed to exist inconfig.api. Additionally, passingnullforprojectId(line 18) could cause runtime issues if the Lamatic SDK expects a string.Consider removing the fallbacks or using the validated
process.envvalues directly for consistency:♻️ Proposed refactor
export const lamaticClient = new Lamatic({ - endpoint: config.api.endpoint ?? "", - projectId: config.api.projectId ?? null, - apiKey: config.api.apiKey ?? "" + endpoint: process.env.LAMATIC_API_URL!, + projectId: process.env.LAMATIC_PROJECT_ID!, + apiKey: process.env.LAMATIC_API_KEY! });kits/agentic/reddit-scout/app/globals.css (1)
80-80: Minor: Lowercase font family keyword for consistency.Stylelint flags
Georgiashould begeorgiaper CSS convention for generic font family keywords.✏️ Suggested fix
- --font-serif: 'DM Serif Display', Georgia, serif; + --font-serif: 'DM Serif Display', georgia, serif;kits/agentic/reddit-scout/components/ui/slider.tsx (1)
16-24: Default fallback creates a two-thumb range slider.When neither
valuenordefaultValueis provided, the fallback[min, max]renders two thumbs (a range slider). This may surprise consumers expecting a single-value slider. Consider defaulting to[min]for a single thumb, or document this behavior.✏️ Optional: Single-thumb default
Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue - : [min, max], + : [min],kits/agentic/reddit-scout/actions/orchestrate.ts (2)
14-14: Remove debug console.log statements before production.Multiple
console.logstatements with[v0]prefix appear to be development artifacts. These log potentially sensitive query data and should be removed or converted to conditional debug logging.✏️ Suggested fix
- console.log("[v0] Searching Reddit for:", query) ... - console.log("[v0] Using workflow:", flow.name, flow.workflowId); ... - console.log("[v0] Sending inputs:", inputs) ... - console.log("[v0] Raw response:", resData) ... - console.error("[v0] Reddit Scout error:", error) + console.error("Reddit Scout error:", error)Also applies to: 24-24, 36-36, 42-42, 55-55
8-12: Consider a more specific return type.Using
anyfordatareduces type safety. Define an interface for the expected response shape.✏️ Suggested improvement
+interface SearchResult { + success: true + data: string // markdown content +} | { + success: false + error: string +} export async function searchReddit( query: string, -): Promise<{ - success: boolean - data?: any - error?: string -}> { +): Promise<SearchResult> {kits/agentic/reddit-scout/app/page.tsx (1)
87-96: Consider providing user feedback when clipboard copy fails.The catch block only logs to console. Users won't know if the copy operation failed (e.g., due to permissions).
♻️ Suggested improvement
const handleCopy = async () => { if (result) { try { await navigator.clipboard.writeText(result) setCopied(true) setTimeout(() => setCopied(false), 2000) } catch (err) { console.error("Failed to copy:", err) + setError("Failed to copy to clipboard") } } }kits/agentic/reddit-scout/package.json (1)
2-2: Package name doesn't match the kit folder name.The package is named
agent-kit-generationbut resides inreddit-scout/. Consider renaming toreddit-scoutfor consistency and easier identification.♻️ Suggested fix
- "name": "agent-kit-generation", + "name": "reddit-scout",kits/agentic/reddit-scout/flows/reddit-scout/config.json (1)
79-82: Hardcoded geographic parameters limit international usability.The search is hardcoded to India (
"country": "in","location": "India"). Consider making these configurable or using more generic defaults for broader applicability.kits/agentic/reddit-scout/components/ui/pagination.tsx (1)
9-9: Unused import:Buttonis never used.Only
buttonVariantsis used in this file. TheButtoncomponent import can be removed.♻️ Suggested fix
-import { Button, buttonVariants } from '@/components/ui/button' +import { buttonVariants } from '@/components/ui/button'kits/agentic/reddit-scout/components/ui/alert-dialog.tsx (1)
1-1: Rename the newcomponents/uimodules to PascalCase.
alert-dialog.tsxconflicts with the component-directory naming rule, and the same pattern repeats across the sibling UI files added in this PR.As per coding guidelines, "Use PascalCase for React component filenames in the
components/directory".kits/agentic/reddit-scout/components/ui/carousel.tsx (1)
96-105: Tear down thereInitlistener too.This effect subscribes to both Embla events but only unregisters
select, so the extra callback can stick around longer than intended.Suggested fix
return () => { - api?.off('select', onSelect) + api.off('reInit', onSelect) + api.off('select', onSelect) }kits/agentic/reddit-scout/components/ui/sidebar.tsx (2)
84-87: Consider adding explicit cookie attributes for better security posture.The cookie is set without explicit
SameSiteorSecureattributes. While browsers defaultSameSite=Lax, being explicit improves clarity and ensures consistent behavior.🍪 Suggested cookie attributes
- document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}` + document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}; SameSite=Lax`
529-533: Avoid mutating thetooltipparameter directly.Reassigning the
tooltipparameter shadows the original value and can be confusing. Consider using a separate variable for the normalized tooltip props.♻️ Suggested refactor
+ const tooltipProps = typeof tooltip === 'string' + ? { children: tooltip } + : tooltip + - if (typeof tooltip === 'string') { - tooltip = { - children: tooltip, - } - } - return ( <Tooltip> <TooltipTrigger asChild>{button}</TooltipTrigger> <TooltipContent side="right" align="center" hidden={state !== 'collapsed' || isMobile} - {...tooltip} + {...tooltipProps} /> </Tooltip> )
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9fec5042-e742-41a8-8463-ab386c76f7dc
⛔ Files ignored due to path filters (9)
kits/agentic/reddit-scout/package-lock.jsonis excluded by!**/package-lock.jsonkits/agentic/reddit-scout/public/apple-icon.pngis excluded by!**/*.pngkits/agentic/reddit-scout/public/icon-dark-32x32.pngis excluded by!**/*.pngkits/agentic/reddit-scout/public/icon-light-32x32.pngis excluded by!**/*.pngkits/agentic/reddit-scout/public/icon.svgis excluded by!**/*.svgkits/agentic/reddit-scout/public/lamatic-logo.pngis excluded by!**/*.pngkits/agentic/reddit-scout/public/placeholder-logo.pngis excluded by!**/*.pngkits/agentic/reddit-scout/public/placeholder-logo.svgis excluded by!**/*.svgkits/agentic/reddit-scout/public/placeholder.svgis excluded by!**/*.svg
📒 Files selected for processing (82)
kits/agentic/reddit-scout/.env.examplekits/agentic/reddit-scout/.gitignorekits/agentic/reddit-scout/.npmrckits/agentic/reddit-scout/README.mdkits/agentic/reddit-scout/actions/orchestrate.tskits/agentic/reddit-scout/app/globals.csskits/agentic/reddit-scout/app/layout.tsxkits/agentic/reddit-scout/app/page.tsxkits/agentic/reddit-scout/components.jsonkits/agentic/reddit-scout/components/header.tsxkits/agentic/reddit-scout/components/theme-provider.tsxkits/agentic/reddit-scout/components/ui/accordion.tsxkits/agentic/reddit-scout/components/ui/alert-dialog.tsxkits/agentic/reddit-scout/components/ui/alert.tsxkits/agentic/reddit-scout/components/ui/aspect-ratio.tsxkits/agentic/reddit-scout/components/ui/avatar.tsxkits/agentic/reddit-scout/components/ui/badge.tsxkits/agentic/reddit-scout/components/ui/breadcrumb.tsxkits/agentic/reddit-scout/components/ui/button-group.tsxkits/agentic/reddit-scout/components/ui/button.tsxkits/agentic/reddit-scout/components/ui/calendar.tsxkits/agentic/reddit-scout/components/ui/card.tsxkits/agentic/reddit-scout/components/ui/carousel.tsxkits/agentic/reddit-scout/components/ui/chart.tsxkits/agentic/reddit-scout/components/ui/checkbox.tsxkits/agentic/reddit-scout/components/ui/collapsible.tsxkits/agentic/reddit-scout/components/ui/command.tsxkits/agentic/reddit-scout/components/ui/context-menu.tsxkits/agentic/reddit-scout/components/ui/dialog.tsxkits/agentic/reddit-scout/components/ui/drawer.tsxkits/agentic/reddit-scout/components/ui/dropdown-menu.tsxkits/agentic/reddit-scout/components/ui/empty.tsxkits/agentic/reddit-scout/components/ui/field.tsxkits/agentic/reddit-scout/components/ui/form.tsxkits/agentic/reddit-scout/components/ui/hover-card.tsxkits/agentic/reddit-scout/components/ui/input-group.tsxkits/agentic/reddit-scout/components/ui/input-otp.tsxkits/agentic/reddit-scout/components/ui/input.tsxkits/agentic/reddit-scout/components/ui/item.tsxkits/agentic/reddit-scout/components/ui/kbd.tsxkits/agentic/reddit-scout/components/ui/label.tsxkits/agentic/reddit-scout/components/ui/menubar.tsxkits/agentic/reddit-scout/components/ui/navigation-menu.tsxkits/agentic/reddit-scout/components/ui/pagination.tsxkits/agentic/reddit-scout/components/ui/popover.tsxkits/agentic/reddit-scout/components/ui/progress.tsxkits/agentic/reddit-scout/components/ui/radio-group.tsxkits/agentic/reddit-scout/components/ui/resizable.tsxkits/agentic/reddit-scout/components/ui/scroll-area.tsxkits/agentic/reddit-scout/components/ui/select.tsxkits/agentic/reddit-scout/components/ui/separator.tsxkits/agentic/reddit-scout/components/ui/sheet.tsxkits/agentic/reddit-scout/components/ui/sidebar.tsxkits/agentic/reddit-scout/components/ui/skeleton.tsxkits/agentic/reddit-scout/components/ui/slider.tsxkits/agentic/reddit-scout/components/ui/sonner.tsxkits/agentic/reddit-scout/components/ui/spinner.tsxkits/agentic/reddit-scout/components/ui/switch.tsxkits/agentic/reddit-scout/components/ui/table.tsxkits/agentic/reddit-scout/components/ui/tabs.tsxkits/agentic/reddit-scout/components/ui/textarea.tsxkits/agentic/reddit-scout/components/ui/toast.tsxkits/agentic/reddit-scout/components/ui/toaster.tsxkits/agentic/reddit-scout/components/ui/toggle-group.tsxkits/agentic/reddit-scout/components/ui/toggle.tsxkits/agentic/reddit-scout/components/ui/tooltip.tsxkits/agentic/reddit-scout/components/ui/use-mobile.tsxkits/agentic/reddit-scout/components/ui/use-toast.tskits/agentic/reddit-scout/config.jsonkits/agentic/reddit-scout/flows/reddit-scout/README.mdkits/agentic/reddit-scout/flows/reddit-scout/config.jsonkits/agentic/reddit-scout/flows/reddit-scout/inputs.jsonkits/agentic/reddit-scout/flows/reddit-scout/meta.jsonkits/agentic/reddit-scout/hooks/use-mobile.tskits/agentic/reddit-scout/hooks/use-toast.tskits/agentic/reddit-scout/lib/lamatic-client.tskits/agentic/reddit-scout/lib/utils.tskits/agentic/reddit-scout/next.config.mjskits/agentic/reddit-scout/orchestrate.jskits/agentic/reddit-scout/package.jsonkits/agentic/reddit-scout/postcss.config.mjskits/agentic/reddit-scout/tsconfig.json
| @@ -0,0 +1,53 @@ | |||
| 'use client' | |||
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Rename component file to PascalCase.
This file should be renamed from avatar.tsx to Avatar.tsx to match the kit component filename convention.
As per coding guidelines, kits/**/components/**/*.{tsx,ts} must use PascalCase for React component filenames in the components/ directory.
| return ( | ||
| <Dialog {...props}> | ||
| <DialogHeader className="sr-only"> | ||
| <DialogTitle>{title}</DialogTitle> | ||
| <DialogDescription>{description}</DialogDescription> | ||
| </DialogHeader> | ||
| <DialogContent | ||
| className={cn('overflow-hidden p-0', className)} | ||
| showCloseButton={showCloseButton} | ||
| > | ||
| <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"> | ||
| {children} | ||
| </Command> | ||
| </DialogContent> | ||
| </Dialog> | ||
| ) |
There was a problem hiding this comment.
DialogHeader is rendered outside DialogContent.
The DialogHeader (containing DialogTitle and DialogDescription) is rendered as a sibling to DialogContent rather than inside it. This breaks the expected DOM hierarchy where dialog title/description should be within the content container for proper ARIA association.
🐛 Proposed fix to move header inside content
return (
<Dialog {...props}>
- <DialogHeader className="sr-only">
- <DialogTitle>{title}</DialogTitle>
- <DialogDescription>{description}</DialogDescription>
- </DialogHeader>
<DialogContent
className={cn('overflow-hidden p-0', className)}
showCloseButton={showCloseButton}
>
+ <DialogHeader className="sr-only">
+ <DialogTitle>{title}</DialogTitle>
+ <DialogDescription>{description}</DialogDescription>
+ </DialogHeader>
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
</Command>
</DialogContent>
</Dialog>
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| return ( | |
| <Dialog {...props}> | |
| <DialogHeader className="sr-only"> | |
| <DialogTitle>{title}</DialogTitle> | |
| <DialogDescription>{description}</DialogDescription> | |
| </DialogHeader> | |
| <DialogContent | |
| className={cn('overflow-hidden p-0', className)} | |
| showCloseButton={showCloseButton} | |
| > | |
| <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"> | |
| {children} | |
| </Command> | |
| </DialogContent> | |
| </Dialog> | |
| ) | |
| return ( | |
| <Dialog {...props}> | |
| <DialogContent | |
| className={cn('overflow-hidden p-0', className)} | |
| showCloseButton={showCloseButton} | |
| > | |
| <DialogHeader className="sr-only"> | |
| <DialogTitle>{title}</DialogTitle> | |
| <DialogDescription>{description}</DialogDescription> | |
| </DialogHeader> | |
| <Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"> | |
| {children} | |
| </Command> | |
| </DialogContent> | |
| </Dialog> | |
| ) |
| @@ -0,0 +1,47 @@ | |||
| 'use client' | |||
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Rename component file to PascalCase.
Rename toggle.tsx to Toggle.tsx to match the required naming convention for components.
As per coding guidelines, kits/**/components/**/*.{tsx,ts} must use PascalCase for React component filenames in the components/ directory.
| @@ -0,0 +1,61 @@ | |||
| 'use client' | |||
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Rename component file to PascalCase.
Please rename tooltip.tsx to Tooltip.tsx to follow the components naming standard.
As per coding guidelines, kits/**/components/**/*.{tsx,ts} must use PascalCase for React component filenames in the components/ directory.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: fe0ddbc7-ba79-4f7e-8635-0e43c0ee5987
📒 Files selected for processing (1)
kits/agentic/reddit-scout/README.md
| ``` | ||
| /actions | ||
| └── orchestrate.ts # Lamatic workflow orchestration | ||
| /app | ||
| └── page.tsx # Main search form UI | ||
| /components | ||
| ├── header.tsx # Header component | ||
| └── ui # shadcn/ui components | ||
| /lib | ||
| └── lamatic-client.ts # Lamatic SDK client | ||
| /public | ||
| └── lamatic-logo.png # Lamatic branding | ||
| /flows | ||
| └── reddit-scout/ # Exported Lamatic flow | ||
| /package.json # Dependencies & scripts | ||
| ``` |
There was a problem hiding this comment.
Add a language tag to the fenced code block.
The repo structure block is fenced without a language, which triggers markdown linting (MD040).
💡 Suggested fix
-```
+```text
/actions
└── orchestrate.ts # Lamatic workflow orchestration
/app
└── page.tsx # Main search form UI
/components
├── header.tsx # Header component
└── ui # shadcn/ui components
/lib
└── lamatic-client.ts # Lamatic SDK client
/public
└── lamatic-logo.png # Lamatic branding
/flows
└── reddit-scout/ # Exported Lamatic flow
/package.json # Dependencies & scripts</details>
<!-- suggestion_start -->
<details>
<summary>📝 Committable suggestion</summary>
> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
```suggestion
🧰 Tools
🪛 markdownlint-cli2 (0.22.0)
[warning] 133-133: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
…ltip/Chart/Carousel components, rename to PascalCase, use env vars for flow ID
What This Kit Does
Reddit Scout is an AI-powered product review research tool. It searches Reddit for real user opinions about any product or topic and generates a structured, scannable review summary — saving users 15-20 minutes of manual thread browsing.
Providers & Prerequisites
How to Run Locally
cd kits/agentic/reddit-scoutnpm installcp .env.example .envand fill in your Lamatic + Serper credentialsnpm run devLive Preview
https://reddit-scout-tawny.vercel.app/
Lamatic Flow
Flow ID:
956525e7-9d01-43ca-a373-07ad4e067909npm run dev.env.examplehas no secrets, only placeholdersREADME.mddocuments setup and usagekits/agentic/reddit-scout/config.jsonis present and validflows/folderCheck out the README at kits/agentic/reddit-scout for more info