Skip to content

Conversation

@rossmanko
Copy link
Contributor

@rossmanko rossmanko commented Nov 10, 2025

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced an enhanced shimmer animation component for improved loading state visuals.
    • Expanded pre-installed pentesting tools with additional security utilities including network scanning, web fuzzing, and recon capabilities.
  • Improvements

    • Enhanced JSON file processing with proper formatting and UTF-8 encoding.
    • Updated dependencies to latest stable versions for improved performance and security.

- Update @langchain/community from 0.3.57 to 1.0.0
- Update langchain from 0.3.36 to 1.0.3
- Remove JSONLoader dependency due to deprecated export path
- Replace JSONLoader with native JSON.parse/stringify for JSON file processing
- Update related dependencies (@ai-sdk/react, convex, gpt-tokenizer, etc.)
@vercel
Copy link

vercel bot commented Nov 10, 2025

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

Project Deployment Preview Comments Updated (UTC)
hackerai Ready Ready Preview Comment Nov 10, 2025 7:57pm

@coderabbitai
Copy link

coderabbitai bot commented Nov 10, 2025

Walkthrough

The PR migrates from the old ShimmerText component to a new Shimmer component from the ai-elements library, updating all usages across multiple files. Additionally, it updates dependencies, expands e2b container setup with security tools, refactors JSON processing logic, and updates system prompt documentation.

Changes

Cohort / File(s) Change Summary
Shimmer component migration
app/components/ShimmerText.tsx, components/ai-elements/shimmer.tsx
Removes old ShimmerText component and introduces new Shimmer component with motion-based animation, TextShimmerProps interface, and memoization.
Shimmer usage updates
app/components/Messages.tsx, app/components/TerminalCodeBlock.tsx, app/components/tools/SummarizationHandler.tsx, components/ui/tool-block.tsx
Updates imports and JSX to replace ShimmerText with new Shimmer component across loading state renderings.
Shimmer test cleanup
app/components/__tests__/ShimmerText.test.tsx
Removes test file for deleted ShimmerText component.
JSON processing refactor
convex/fileActions.ts
Reworks JSON file handling to parse Blob as ArrayBuffer, decode to UTF-8, parse JSON, and serialize with 2-space indentation instead of using JSONLoader.
Container tooling expansion
e2b/template.ts
Extends apt-get install with net-tools, pandoc, libpcap-dev; adds Python tools (arjun, dirsearch); introduces jwt_tool installation and symlink; expands go tooling (httpx, naabu, gobuster); updates test/verification block with additional version checks.
Tool documentation update
lib/system-prompt.ts
Replaces generic "Pre-installed Tools" section with categorized "Pre-installed Pentesting Tools" listing (Network Scanning, Web Fuzzing, Recon, Specialized).
Dependency updates
package.json
Updates package versions: @ai-sdk/react (2.0.88→2.0.90), @langchain/community (0.3.57→1.0.0), ai (5.0.88→5.0.90), convex (1.28.2→1.29.0), langchain (0.3.36→1.0.3), and others.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • e2b/template.ts: Significant expansion of container setup with multiple new tool installations and verification checks; requires careful validation of command sequences and symlink paths.
  • convex/fileActions.ts: JSON processing logic change; verify ArrayBuffer decoding and pretty-printing behavior matches intended output format.
  • Component migration: While primarily replacement, verify all usages of Shimmer component match expected props and rendering behavior across distinct files.

Possibly related PRs

Poem

🐰✨ A shimmer anew, with motion so fine,
Old text fades out as animations align,
Tools expand far with security might,
Dependencies dance to versions more bright,
The container grows strong, ready to fight! 🎯

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Daily branch 2025 11 10' is a generic timestamp reference that does not describe the actual changes made in the pull request. Use a descriptive title summarizing the main change, such as 'Refactor ShimmerText to Shimmer component and update pentesting tools' or 'Replace ShimmerText with Shimmer component across codebase'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch daily-branch-2025-11-10

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13a8ad6 and 0ebbab2.

⛔ Files ignored due to path filters (4)
  • convex/_generated/api.d.ts is excluded by !**/_generated/**
  • convex/_generated/server.d.ts is excluded by !**/_generated/**
  • convex/_generated/server.js is excluded by !**/_generated/**
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (11)
  • app/components/Messages.tsx (2 hunks)
  • app/components/ShimmerText.tsx (0 hunks)
  • app/components/TerminalCodeBlock.tsx (4 hunks)
  • app/components/__tests__/ShimmerText.test.tsx (0 hunks)
  • app/components/tools/SummarizationHandler.tsx (2 hunks)
  • components/ai-elements/shimmer.tsx (1 hunks)
  • components/ui/tool-block.tsx (2 hunks)
  • convex/fileActions.ts (1 hunks)
  • e2b/template.ts (3 hunks)
  • lib/system-prompt.ts (1 hunks)
  • package.json (3 hunks)
💤 Files with no reviewable changes (2)
  • app/components/tests/ShimmerText.test.tsx
  • app/components/ShimmerText.tsx
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/convex_rules.mdc)

**/*.{ts,tsx}: Use Id from ./_generated/dataModel for document IDs (e.g., Id<'users'>) instead of string
Ensure Record key/value types align with validators (e.g., v.record(v.id('users'), v.string()) -> Record<Id<'users'>, string>)
Use as const on string literals in discriminated unions
When using Array type, explicitly declare arrays with const array: Array = [...]
When using Record type, explicitly declare with const record: Record<KeyType, ValueType> = {...}

Files:

  • components/ui/tool-block.tsx
  • app/components/Messages.tsx
  • app/components/TerminalCodeBlock.tsx
  • components/ai-elements/shimmer.tsx
  • convex/fileActions.ts
  • lib/system-prompt.ts
  • app/components/tools/SummarizationHandler.tsx
  • e2b/template.ts
convex/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/convex_rules.mdc)

convex/**/*.{ts,tsx,js,jsx}: ALWAYS use the new Convex function syntax (query/mutation/action object with args/returns/handler) when defining Convex functions
When a Convex function returns null, include returns: v.null() and return null
Use internalQuery/internalMutation/internalAction for private functions; do not expose sensitive logic with public query/mutation/action
Do NOT register functions via the api or internal objects
ALWAYS provide args and returns validators for query, mutation, action and their internal variants; use v.null() when no value is returned
From Convex functions, use ctx.runQuery/ctx.runMutation/ctx.runAction to call other functions (not direct function calls)
Pass a FunctionReference (from api/internal) to ctx.runQuery/ctx.runMutation/ctx.runAction; do NOT pass the callee function directly
Only call an action from another action when crossing runtimes (e.g., V8 to Node); otherwise refactor shared code into helpers
Minimize calls from actions to queries/mutations to reduce race conditions; prefer fewer transactional boundaries
Organize public query/mutation/action functions under convex/ to align with file-based routing
For pagination, validate args with paginationOptsValidator and call .paginate(args.paginationOpts) on queries
Use v.int64() instead of deprecated v.bigint() for signed 64-bit integers
Use v.record() for record-like structures; v.map() and v.set() are not supported
Do NOT use query().filter(...); define an index in schema and use withIndex instead
Convex queries do not support .delete(); collect or iterate results and call ctx.db.delete(_id) for each
Use .unique() to fetch exactly one document and fail on multiples
When async-iterating query results, prefer for await (const row of query) over .collect() or .take(n)
Use ctx.db.replace to fully replace an existing document; ctx.db.patch to shallow-merge updates
Files defining actions that use Node built-ins must start with "use node"
Never access ctx.db from within an action
D...

Files:

  • convex/fileActions.ts
convex/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/convex_rules.mdc)

When run-calling a function in the same file, add an explicit return type annotation on the await result to avoid TS circularity issues

Files:

  • convex/fileActions.ts
package.json

📄 CodeRabbit inference engine (.cursor/rules/convex_rules.mdc)

Add @types/node to devDependencies when using Node.js built-in modules

Files:

  • package.json
🧠 Learnings (3)
📚 Learning: 2025-10-03T13:15:14.787Z
Learnt from: CR
Repo: hackerai-tech/hackerai PR: 0
File: .cursor/rules/convex_rules.mdc:0-0
Timestamp: 2025-10-03T13:15:14.787Z
Learning: Applies to convex/**/*.{ts,tsx,js,jsx} : Organize public query/mutation/action functions under convex/ to align with file-based routing

Applied to files:

  • convex/fileActions.ts
📚 Learning: 2025-10-03T13:15:14.787Z
Learnt from: CR
Repo: hackerai-tech/hackerai PR: 0
File: .cursor/rules/convex_rules.mdc:0-0
Timestamp: 2025-10-03T13:15:14.787Z
Learning: Applies to convex/**/*.{ts,tsx,js,jsx} : Files defining actions that use Node built-ins must start with "use node"

Applied to files:

  • convex/fileActions.ts
📚 Learning: 2025-10-03T13:15:14.787Z
Learnt from: CR
Repo: hackerai-tech/hackerai PR: 0
File: .cursor/rules/convex_rules.mdc:0-0
Timestamp: 2025-10-03T13:15:14.787Z
Learning: Applies to convex/**/*.{ts,tsx,js,jsx} : ALWAYS use the new Convex function syntax (query/mutation/action object with args/returns/handler) when defining Convex functions

Applied to files:

  • convex/fileActions.ts
🧬 Code graph analysis (5)
components/ui/tool-block.tsx (1)
components/ai-elements/shimmer.tsx (1)
  • Shimmer (64-64)
app/components/Messages.tsx (1)
components/ai-elements/shimmer.tsx (1)
  • Shimmer (64-64)
app/components/TerminalCodeBlock.tsx (1)
components/ai-elements/shimmer.tsx (1)
  • Shimmer (64-64)
components/ai-elements/shimmer.tsx (1)
lib/utils.ts (1)
  • cn (23-25)
app/components/tools/SummarizationHandler.tsx (1)
components/ai-elements/shimmer.tsx (1)
  • Shimmer (64-64)
🪛 ESLint
components/ai-elements/shimmer.tsx

[error] 38-38: Error: Cannot create components during render

Components created during render will reset their state each time they are created. Declare components outside of render.

/home/jailuser/git/components/ai-elements/shimmer.tsx:38:6
36 |
37 | return (

38 | <MotionComponent
| ^^^^^^^^^^^^^^^ This component is created during render
39 | animate={{ backgroundPosition: "0% center" }}
40 | className={cn(
41 | "relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",

/home/jailuser/git/components/ai-elements/shimmer.tsx:28:27
26 | spread = 2,
27 | }: TextShimmerProps) => {

28 | const MotionComponent = motion.create(
| ^^^^^^^^^^^^^^
29 | Component as keyof JSX.IntrinsicElements,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 | );
| ^^^^ The component is created during render here
31 |
32 | const dynamicSpread = useMemo(
33 | () => (children?.length ?? 0) * spread,

(react-hooks/static-components)

🔇 Additional comments (4)
components/ui/tool-block.tsx (1)

2-2: LGTM! Clean component migration.

The migration from ShimmerText to the new Shimmer component is implemented correctly with the updated import path and consistent usage pattern.

Also applies to: 46-46

app/components/tools/SummarizationHandler.tsx (1)

3-3: LGTM! Component migration with improved message formatting.

The migration from ShimmerText to Shimmer is correct, and the template literal approach for appending the ellipsis is cleaner than the previous implementation. The className prop usage appears appropriate for styling.

Also applies to: 23-23

app/components/TerminalCodeBlock.tsx (1)

6-6: LGTM! Consistent component migration across all loading states.

All three loading state indicators have been successfully migrated from ShimmerText to Shimmer, maintaining the existing conditional rendering logic. The implementation is consistent throughout the file.

Also applies to: 174-176, 244-244, 268-268

lib/system-prompt.ts (1)

157-163: LGTM! Improved documentation structure.

The reorganization of pre-installed tools into categorized groups (Network Scanning, Web Fuzzing, Recon, Specialized, Documents) with descriptive annotations significantly improves clarity and helps the AI better understand the available toolset in the sandbox environment.

Comment on lines +28 to +57
const MotionComponent = motion.create(
Component as keyof JSX.IntrinsicElements,
);

const dynamicSpread = useMemo(
() => (children?.length ?? 0) * spread,
[children, spread],
);

return (
<MotionComponent
animate={{ backgroundPosition: "0% center" }}
className={cn(
"relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",
"[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
className,
)}
initial={{ backgroundPosition: "100% center" }}
style={
{
"--spread": `${dynamicSpread}px`,
backgroundImage:
"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",
} as CSSProperties
}
transition={{
repeat: Number.POSITIVE_INFINITY,
duration,
ease: "linear",
}}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid recreating the motion wrapper every render

ESLint (react-hooks/static-components) is erroring because motion.create runs inside the render path, so the motion component is rebuilt on each render and any local state would reset. Memoize the factory on the Component reference to keep lint happy and avoid unnecessary churn.

Apply this diff:

-  const MotionComponent = motion.create(
-    Component as keyof JSX.IntrinsicElements,
-  );
+  const MotionComponent = useMemo(
+    () => motion.create(Component as keyof JSX.IntrinsicElements),
+    [Component],
+  );
📝 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.

Suggested change
const MotionComponent = motion.create(
Component as keyof JSX.IntrinsicElements,
);
const dynamicSpread = useMemo(
() => (children?.length ?? 0) * spread,
[children, spread],
);
return (
<MotionComponent
animate={{ backgroundPosition: "0% center" }}
className={cn(
"relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",
"[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
className,
)}
initial={{ backgroundPosition: "100% center" }}
style={
{
"--spread": `${dynamicSpread}px`,
backgroundImage:
"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",
} as CSSProperties
}
transition={{
repeat: Number.POSITIVE_INFINITY,
duration,
ease: "linear",
}}
const MotionComponent = useMemo(
() => motion.create(Component as keyof JSX.IntrinsicElements),
[Component],
);
const dynamicSpread = useMemo(
() => (children?.length ?? 0) * spread,
[children, spread],
);
return (
<MotionComponent
animate={{ backgroundPosition: "0% center" }}
className={cn(
"relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",
"[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
className,
)}
initial={{ backgroundPosition: "100% center" }}
style={
{
"--spread": `${dynamicSpread}px`,
backgroundImage:
"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",
} as CSSProperties
}
transition={{
repeat: Number.POSITIVE_INFINITY,
duration,
ease: "linear",
}}
🧰 Tools
🪛 ESLint

[error] 38-38: Error: Cannot create components during render

Components created during render will reset their state each time they are created. Declare components outside of render.

/home/jailuser/git/components/ai-elements/shimmer.tsx:38:6
36 |
37 | return (

38 | <MotionComponent
| ^^^^^^^^^^^^^^^ This component is created during render
39 | animate={{ backgroundPosition: "0% center" }}
40 | className={cn(
41 | "relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent",

/home/jailuser/git/components/ai-elements/shimmer.tsx:28:27
26 | spread = 2,
27 | }: TextShimmerProps) => {

28 | const MotionComponent = motion.create(
| ^^^^^^^^^^^^^^
29 | Component as keyof JSX.IntrinsicElements,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 | );
| ^^^^ The component is created during render here
31 |
32 | const dynamicSpread = useMemo(
33 | () => (children?.length ?? 0) * spread,

(react-hooks/static-components)

🤖 Prompt for AI Agents
In components/ai-elements/shimmer.tsx around lines 28 to 57, motion.create is
being called directly during render which recreates the MotionComponent each
render; wrap the factory call in a memo (e.g. useMemo(() =>
motion.create(Component as keyof JSX.IntrinsicElements), [Component])) or useRef
initialized once to preserve the same MotionComponent between renders so the
motion wrapper is not rebuilt and the react-hooks/static-components ESLint error
is resolved.

@rossmanko rossmanko merged commit 3aa94fd into main Nov 10, 2025
4 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Nov 18, 2025
This was referenced Nov 28, 2025
@coderabbitai coderabbitai bot mentioned this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants