Skip to content

Conversation

@omeraplak
Copy link
Member

@omeraplak omeraplak commented Jan 12, 2026

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

What is the new behavior?

fixes (issue)

Notes for reviewers


Summary by cubic

Fixes lint issues across the repo and standardizes Biome usage to ensure consistent formatting and reliable pre-commit runs. Includes small refactors and type cleanups with no intentional behavior changes.

  • Refactors

    • Standardized Biome commands to use --write and updated lint-staged/Husky to run from the repo root with explicit config.
    • Cleaned up comments/types across components and examples, and reworked the website workflows animation for clarity.
    • Minor internal refactors in server websocket auth, Langfuse exporter trace handling, Groq provider types, subagent streaming, and server-core exports.
  • Dependencies

    • Bumped @biomejs/biome in website to ^1.9.4.

Written for commit 287d067. Summary will update on new commits.

Summary by CodeRabbit

  • Refactor

    • Internal refactoring of streaming, authentication, and trace processing logic for improved code organization and maintainability.
    • Restructured component layouts and parsing utilities for better code modularity.
  • Chores

    • Updated linting tooling configuration and scripts.
    • Removed internal documentation annotations.

✏️ Tip: You can customize this high-level summary in your review settings.

@changeset-bot
Copy link

changeset-bot bot commented Jan 12, 2026

⚠️ No Changeset found

Latest commit: c48dfb7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 12, 2026

Warning

Rate limit exceeded

@omeraplak has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 51 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 805cd59 and c48dfb7.

📒 Files selected for processing (4)
  • archive/deprecated-providers/groq-ai/src/index.ts
  • packages/langfuse-exporter/src/exporter.ts
  • packages/server-core/src/websocket/setup.ts
  • website/src/theme/CustomerProjectPage/index.tsx
📝 Walkthrough

Walkthrough

This PR refactors internal streaming and authentication logic across multiple packages, updates build tooling configuration (biome flags, husky pre-commit hooks), removes linting ignore directives from website components, modularizes UI components with new internal structures, and introduces content parsing utilities for consistent data handling.

Changes

Cohort / File(s) Summary
Build & Configuration
.husky/pre-commit, package.json, packages/vercel-ai-exporter/package.json, website/package.json
Updated biome linting from --apply to --write flag; modified pre-commit hook to explicitly change directory to root before running lint-staged with explicit config file.
Streaming Logic Refactors
archive/deprecated-providers/groq-ai/src/index.ts, packages/core/src/agent/subagent/index.ts
Modularized streaming pipelines by extracting internal helper methods (stream state tracking, chunk processing, tool call handling) and replacing inline logic with stateful workflows; preserved public API surface.
Trace & Langfuse Integration
packages/langfuse-exporter/src/exporter.ts
Refactored trace extraction into dedicated helpers (extractTraceInfo, buildTraceParams) to consolidate span selection and attribute parsing into a multi-step pipeline.
WebSocket Authentication
packages/server-core/src/websocket/setup.ts
Introduced internal auth result types and modular helpers to standardize authentication flow for Next.js and legacy configs; added centralized error handling paths replacing ad-hoc socket responses.
Export Restructuring
packages/server-core/src/edge.ts
Broadened public export surface from explicit named exports to wildcard export from agent handlers module.
UI Comment Cleanup
website/src/components/supervisor-agent/flow-version.tsx, website/src/components/tutorial/mobile-agent-code.tsx, website/src/components/tutorial/mobile-tool-code.tsx, website/src/pages/tutorial/chatbot-problem.tsx, website/src/pages/tutorial/introduction.tsx
Removed biome-ignore lint directives and explanatory comments related to accessibility linting without behavioral changes.
Component Refactoring
website/src/components/workflows/animation-diagram.tsx, website/src/theme/CustomerProjectPage/index.tsx
Decomposed monolithic components into smaller internal subcomponents with centralized theme/color definitions and extracted rendering logic; introduced content parsing utilities for structured data handling.
Formatting
examples/with-lancedb/tsconfig.json
Added trailing newline to file.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 Helpers sprouted from the code,
Streaming paths less tightly sewed,
Auth refactored, clean and bright,
Components modularized right,
Biome flags now write instead,
Cleaner commits, the tests well-fed! 🌟

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 18.18% 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 'chore: lint issues' is vague and uses non-descriptive language that doesn't convey the actual scope of changes, which include significant refactors and internal improvements. Consider a more descriptive title that reflects the main changes, such as 'chore: fix lint issues and standardize Biome configuration' or similar to better indicate the scope.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The PR description is mostly complete with auto-generated summary and detailed refactoring notes, though the standard template sections lack specific details.

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


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

@joggrbot

This comment has been minimized.

Copy link
Contributor

@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: 4

Caution

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

⚠️ Outside diff range comments (2)
website/src/components/workflows/animation-diagram.tsx (1)

683-703: Stale ref reference in cleanup function.

The cleanup function accesses containerRef.current directly, but this value may have changed by the time cleanup runs. Capture the ref value at the start of the effect.

🐛 Proposed fix
   useEffect(() => {
-    if (!containerRef.current) return;
+    const node = containerRef.current;
+    if (!node) return;

     const observer = new IntersectionObserver(
       (entries) => {
         const [entry] = entries;
         if (entry.isIntersecting && !isAnimating && animationStep === 0) {
           startAnimation();
         }
       },
       { threshold: 0.3 },
     );

-    observer.observe(containerRef.current);
+    observer.observe(node);

     return () => {
-      if (containerRef.current) {
-        observer.unobserve(containerRef.current);
-      }
+      observer.unobserve(node);
     };
   }, [isAnimating, animationStep]);
archive/deprecated-providers/groq-ai/src/index.ts (1)

496-502: Throw Error objects instead of string literals.

Same issue as in executeToolCalls.

Proposed fix
           if (functionToCall === undefined) {
-            throw `Function ${functionName} not found in tools`;
+            throw new Error(`Function ${functionName} not found in tools`);
           }
           const functionResponse = await functionToCall(functionArgs);
           if (functionResponse === undefined) {
-            throw `Function ${functionName} returned undefined`;
+            throw new Error(`Function ${functionName} returned undefined`);
           }
🤖 Fix all issues with AI agents
In @archive/deprecated-providers/groq-ai/src/index.ts:
- Around line 313-322: The code currently throws string literals when a tool
function is missing or returns undefined (see functionToCall, functionName,
functionResponse and parsing of toolCall.function?.arguments); replace those
string throws with proper Error objects by throwing new Error(...) with the same
descriptive messages (e.g., include functionName and context) so stack traces
and exception handling behave correctly.

In @packages/langfuse-exporter/src/exporter.ts:
- Line 262: The assignment to traceParams.model incorrectly uses String(...)
which converts undefined to the literal "undefined"; instead, read the raw value
from traceInfo.rootSpan?.attributes["ai.model.name"], check whether that value
is strictly undefined (or null) and only call String(...) when a real value
exists, assigning undefined otherwise (i.e., guard the conversion so
traceParams.model gets undefined when the attribute is missing).

In @website/src/theme/CustomerProjectPage/index.tsx:
- Around line 75-80: The code pushes empty bullet arrays into bulletSections
when afterColon is semicolons/whitespace; modify the logic around afterColon
processing in CustomerProjectPage (the block that builds bulletPoints from
afterColon and pushes to bulletSections) to only push when the resulting
bulletPoints array has at least one non-empty entry (e.g., check
bulletPoints.length > 0 after .filter) so downstream rendering (which accesses
part.content[0].substring()) never receives an empty/undefined element.
🧹 Nitpick comments (12)
.husky/pre-commit (1)

4-6: Consider propagating lint-staged exit code.

The hook correctly changes to the repository root, but if lint-staged fails, the hook will still exit with code 0 (success), allowing the commit to proceed despite lint failures.

Suggested fix
 cd "$(git rev-parse --show-toplevel)" || exit 1

-npx lint-staged --config package.json
+npx lint-staged --config package.json || exit 1
packages/server-core/src/edge.ts (1)

12-12: Consider using explicit named exports for consistency with the rest of the file.

The export * from agent.handlers exposes legitimate public handlers (handleGetAgents, handleGenerateText, handleStreamText, handleChatStream, handleResumeChatStream, handleGenerateObject, handleStreamObject). However, this creates an inconsistency—the rest of edge.ts uses explicit named exports. Explicitly naming these exports would align with the established pattern in this file and make the public API surface more explicit and easier to audit.

packages/server-core/src/websocket/setup.ts (1)

93-114: Consider adding a defensive null check after token verification.

If provider.verifyToken(token) returns null or undefined instead of throwing (due to a provider implementation quirk), the function returns { user: null, handled: false }, allowing the connection to proceed without a valid user on protected routes.

♻️ Proposed defensive check
   try {
     const user = await provider.verifyToken(token);
+    if (!user) {
+      logger?.debug("[WebSocket] Token verification returned no user");
+      return denyUnauthorized(socket);
+    }
     return { user, handled: false };
   } catch (error) {
website/src/theme/CustomerProjectPage/index.tsx (1)

433-473: Consider extracting shared parsing logic for Challenge and Results sections.

The Solution section now uses the new parseSolutionContent helper, but the Challenge (lines 352-416) and Results (lines 489-552) sections still contain nearly identical inline parsing logic. Consider creating a simpler parseQuotedContent helper (quotes + text only, no bullets) to eliminate this duplication.

♻️ Example helper extraction
const parseQuotedContent = (content: string): Array<{ type: "quote" | "text"; content: string }> => {
  const parts: Array<{ type: "quote" | "text"; content: string }> = [];
  let currentText = "";
  let inQuote = false;
  let quoteText = "";

  for (const char of content) {
    if (char === '"' && !inQuote) {
      if (currentText.trim()) {
        parts.push({ type: "text", content: currentText.trim() });
        currentText = "";
      }
      inQuote = true;
      quoteText = "";
    } else if (char === '"' && inQuote) {
      if (quoteText.trim()) {
        parts.push({ type: "quote", content: quoteText.trim() });
        quoteText = "";
      }
      inQuote = false;
    } else if (inQuote) {
      quoteText += char;
    } else {
      currentText += char;
    }
  }

  if (currentText.trim()) {
    parts.push({ type: "text", content: currentText.trim() });
  }

  return parts;
};

Then use it in Challenge and Results sections:

{parseQuotedContent(customer.case_study.challenge_paragraph).map((part) => (
  // ... render logic
))}
website/src/components/workflows/animation-diagram.tsx (3)

429-663: Consider consolidating beam components to reduce repetition.

The six beam components (UserToWorkflowBeam, WorkflowToAgentOneBeam, etc.) share similar structure with slight variations in colors, curvature, and animation step conditions. While the current explicit approach aids readability, you could consolidate them using a configuration-driven pattern.

♻️ Optional: Configuration-driven beam rendering
// Example consolidation approach
interface BeamConfig {
  id: string;
  fromRef: NodeRef;
  toRef: NodeRef;
  colors: typeof colors.user;
  curvature: number;
  reverse?: boolean;
  visibleFrom: number;
  visibleUntil?: number;
  particleDurationStep?: number;
  solidAfterStep?: number;
}

const BeamFromConfig = ({ config, containerRef, isMobile, animationStep }: { 
  config: BeamConfig; 
  containerRef: NodeRef;
  isMobile: boolean;
  animationStep: number;
}) => {
  if (animationStep < config.visibleFrom) return null;
  // ... common rendering logic
};

This would reduce ~240 lines to ~80 lines while maintaining the same behavior.


703-703: Missing startAnimation in dependency array.

The startAnimation function is called within this effect but is not listed in the dependency array. While it currently works because startAnimation has a stable reference (via useCallback with empty deps), this is technically incomplete and could cause subtle bugs if startAnimation's dependencies change in the future.

♻️ Proposed fix
-  }, [isAnimating, animationStep]);
+  }, [isAnimating, animationStep, startAnimation]);

816-821: Style injection may cause duplicates during HMR and SSR hydration mismatches.

This approach appends a new style tag every time the module is hot-reloaded during development. Additionally, since styles are injected client-side only, there may be a flash of unstyled content during SSR hydration.

♻️ Suggested improvements

Option 1: Add deduplication check

 if (typeof document !== "undefined") {
+  const existingStyle = document.getElementById("workflow-animation-styles");
+  if (existingStyle) {
+    existingStyle.remove();
+  }
   const styleTag = document.createElement("style");
+  styleTag.id = "workflow-animation-styles";
   styleTag.innerHTML = styles;
   document.head.appendChild(styleTag);
 }

Option 2 (Preferred): Move to a CSS file

Create animation-diagram.module.css and import it, or add these classes to your global Tailwind/CSS config. This ensures styles are included in the SSR bundle and avoids runtime injection.

archive/deprecated-providers/groq-ai/src/index.ts (5)

196-230: Use safeStringify instead of JSON.stringify.

Per coding guidelines, JSON.stringify should be replaced with safeStringify from @voltagent/internal to handle circular references and edge cases safely. This applies to lines 198, 216, and other occurrences throughout this file.

Proposed fix for createStepFromChunk

Add import at the top of the file:

import { safeStringify } from "@voltagent/internal/utils";

Then update the method:

     if (chunk.type === "tool-call" && chunk.toolCallId) {
       return {
         id: chunk.toolCallId,
         type: "tool_call",
-        content: JSON.stringify([
+        content: safeStringify([
           {
             type: "tool-call",
             toolCallId: chunk.toolCallId,
             toolName: chunk.toolName,
             args: chunk.args,
           },
         ]),
         // ...
       };
     }
     if (chunk.type === "tool-result" && chunk.toolCallId) {
       return {
         id: chunk.toolCallId,
         type: "tool_result",
-        content: JSON.stringify([
+        content: safeStringify([
           {
             type: "tool-result",
             // ...
           },
         ]),
         // ...
       };
     }

329-333: Use safeStringify for tool response serialization.

As per coding guidelines, replace JSON.stringify with safeStringify to safely handle potential circular references in function responses.

Proposed fix
       groqMessages.push({
         tool_call_id: toolCall.id ? toolCall.id : "",
         role: "tool",
-        content: JSON.stringify(functionResponse),
+        content: safeStringify(functionResponse),
       });

509-513: Use safeStringify for function response serialization.

Same issue as in executeToolCalls - replace JSON.stringify with safeStringify.

Proposed fix
           groqMessages.push({
             tool_call_id: toolCall.id,
             role: "tool",
-            content: JSON.stringify(functionResponse),
+            content: safeStringify(functionResponse),
           });

666-721: Use safeStringify for schema and object serialization.

Replace JSON.stringify with safeStringify for consistency with coding guidelines.

Proposed fix
       const schemaDescription =
-        JSON.stringify(zodToJsonSchema(options.schema)) ||
+        safeStringify(zodToJsonSchema(options.schema)) ||
         "Respond with a JSON object according to the specified schema.";
       if (options.onStepFinish) {
         const step = {
           id: "",
           type: "text" as const,
-          content: JSON.stringify(parsedObject, null, 2),
+          content: safeStringify(parsedObject, { indentation: 2 }),
           role: "assistant" as MessageRole,
           usage,
         };

742-749: Use safeStringify for schema serialization.

Same issue as in generateObject.

Proposed fix
       const schemaDescription =
-        JSON.stringify(zodToJsonSchema(options.schema)) ||
+        safeStringify(zodToJsonSchema(options.schema)) ||
         "Respond with a JSON object according to the specified schema.";
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a9b48c6 and 805cd59.

📒 Files selected for processing (17)
  • .husky/pre-commit
  • archive/deprecated-providers/groq-ai/src/index.ts
  • examples/with-lancedb/tsconfig.json
  • package.json
  • packages/core/src/agent/subagent/index.ts
  • packages/langfuse-exporter/src/exporter.ts
  • packages/server-core/src/edge.ts
  • packages/server-core/src/websocket/setup.ts
  • packages/vercel-ai-exporter/package.json
  • website/package.json
  • website/src/components/supervisor-agent/flow-version.tsx
  • website/src/components/tutorial/mobile-agent-code.tsx
  • website/src/components/tutorial/mobile-tool-code.tsx
  • website/src/components/workflows/animation-diagram.tsx
  • website/src/pages/tutorial/chatbot-problem.tsx
  • website/src/pages/tutorial/introduction.tsx
  • website/src/theme/CustomerProjectPage/index.tsx
💤 Files with no reviewable changes (5)
  • website/src/pages/tutorial/chatbot-problem.tsx
  • website/src/components/supervisor-agent/flow-version.tsx
  • website/src/components/tutorial/mobile-tool-code.tsx
  • website/src/components/tutorial/mobile-agent-code.tsx
  • website/src/pages/tutorial/introduction.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.ts: Maintain type safety in TypeScript-first codebase
Never use JSON.stringify; use the safeStringify function instead, imported from @voltagent/internal

Files:

  • packages/server-core/src/edge.ts
  • packages/server-core/src/websocket/setup.ts
  • archive/deprecated-providers/groq-ai/src/index.ts
  • packages/core/src/agent/subagent/index.ts
  • packages/langfuse-exporter/src/exporter.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: VoltAgent/voltagent PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-07T05:09:23.217Z
Learning: Follow the monorepo structure - changes may impact multiple packages
📚 Learning: 2026-01-07T05:09:23.217Z
Learnt from: CR
Repo: VoltAgent/voltagent PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-07T05:09:23.217Z
Learning: Applies to **/*.test.ts : Test your changes - ensure all tests pass before committing

Applied to files:

  • examples/with-lancedb/tsconfig.json
  • website/package.json
🧬 Code graph analysis (3)
packages/server-core/src/websocket/setup.ts (3)
packages/server-core/src/auth/next.ts (4)
  • AuthNextConfig (11-13)
  • normalizeAuthNextConfig (21-25)
  • resolveAuthNextAccess (48-66)
  • isAuthNextConfig (15-19)
packages/server-core/src/auth/utils.ts (1)
  • hasConsoleAccess (66-83)
packages/server-core/src/auth/defaults.ts (1)
  • requiresAuth (212-273)
archive/deprecated-providers/groq-ai/src/index.ts (1)
examples/with-a2a-server/src/agents/assistant.ts (1)
  • tools (24-24)
packages/core/src/agent/subagent/index.ts (4)
packages/core/src/agent/agent.ts (3)
  • StreamTextOptions (379-386)
  • GenerateTextOptions (373-378)
  • Agent (396-4479)
packages/core/src/agent/types.ts (1)
  • OperationContext (894-942)
packages/core/src/agent/memory-persist-queue.ts (1)
  • AgentMetadataContextValue (21-24)
packages/core/src/agent/subagent/stream-metadata-enricher.ts (2)
  • createMetadataEnrichedStream (38-99)
  • shouldForwardChunk (107-114)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Test cli
  • GitHub Check: Test server-core
  • GitHub Check: Test core
  • GitHub Check: Build (Node 22)
  • GitHub Check: Build (Node 24)
  • GitHub Check: Build (Node 20)
🔇 Additional comments (36)
examples/with-lancedb/tsconfig.json (1)

13-13: LGTM! Trailing newline added.

The addition of a trailing newline is a standard formatting practice and aligns with the PR's objective of fixing lint issues.

packages/vercel-ai-exporter/package.json (1)

57-57: LGTM!

The --apply flag was deprecated in Biome in favor of --write. This update aligns with the current Biome CLI conventions and matches the changes in other package.json files across the monorepo.

package.json (2)

46-53: LGTM!

The lint-staged configuration correctly uses --write (replacing deprecated --apply) and includes --no-errors-on-unmatched to gracefully handle cases where staged files don't match the glob pattern.


75-75: LGTM!

Consistent update from --apply to --write for the lint:fix script.

website/package.json (3)

13-13: LGTM!

Consistent lint:fix script update using --write flag.


22-25: LGTM!

lint-staged configuration updated consistently with the root package.json.


80-80: LGTM!

Biome version updated to ^1.9.4, matching the root package.json. This ensures consistent linting behavior across the monorepo. Based on learnings, maintaining consistency across packages in this monorepo structure is important.

packages/langfuse-exporter/src/exporter.ts (3)

92-100: LGTM!

Clean type definition that clearly documents the trace-level data structure. The required updateParent field with optional trace metadata fields is well-designed.


157-157: LGTM!

Good refactoring to extract trace info into a dedicated method with a clear return type. The extraction logic and return statement correctly construct the TraceInfo object.

Also applies to: 201-210


268-277: LGTM!

Clean refactoring that improves readability by delegating to focused helper methods. The multi-step pipeline (extract → assemble → log → emit) is easier to follow and maintain.

packages/server-core/src/websocket/setup.ts (5)

59-77: Clean modular design for WebSocket authentication helpers.

The WebSocketAuthResult type and the helper functions (closeUpgrade, denyUnauthorized, denyServerError) provide a clear, reusable abstraction for handling WebSocket upgrade responses. The HTTP response format with proper CRLF termination is correct.


79-91: LGTM!

The function correctly handles optional token verification by returning null for missing tokens or verification failures, which is appropriate for public routes where authentication is optional.


116-155: Well-structured authentication flow for AuthNext config.

The function correctly handles the three access levels (public, console, user) with appropriate token verification strategies for each. The dev bypass for local testing is clearly scoped and safe (requires non-production environment).

Minor observation: The console user object { id: "console", type: "console-access" } is repeated in multiple places (lines 140, 173, 178). Consider extracting to a constant if this pattern expands.


157-194: LGTM!

The legacy authentication flow correctly handles observability paths, console access, and route-based auth requirements using the existing requiresAuth utility. The logic preserves backward compatibility while integrating with the new modular structure.


237-265: Clean refactoring of the upgrade handler.

The authentication flow is now much clearer: validate path → resolve auth → handle upgrade. The use of isAuthNextConfig type guard to dispatch to the appropriate resolver is correct, and the error handling properly catches unexpected failures with a 500 response.

website/src/theme/CustomerProjectPage/index.tsx (2)

48-51: LGTM!

Clean discriminated union type that enables type-safe rendering of different content parts.


107-145: LGTM!

The character-by-character parsing correctly identifies quoted segments and delegates remaining text to appendTextSections. The logic gracefully handles edge cases where quotes might be unclosed by discarding incomplete quote content.

website/src/components/workflows/animation-diagram.tsx (4)

1-56: LGTM! Clean modular structure with proper TypeScript patterns.

The refactored imports using type React for the namespace and named hook imports align with modern TypeScript/React practices. The unified colors constant and NodeRef type alias provide good foundations for the component decomposition.


145-254: LGTM! Well-structured container components.

The WorkflowDiagram and WorkflowNodes components follow good composition patterns with clear prop interfaces and single responsibilities. The position logic is cleanly separated based on isMobile flag.


262-352: LGTM! Clean node component implementations.

The node components are well-typed with consistent prop patterns. The use of nullish coalescing for optional className props on AgentNode is a good practice.


771-783: LGTM! Clean integration of extracted components.

The main WorkflowCodeExample component now delegates rendering to the new modular components with proper prop passing. This significantly improves readability compared to the previous inline implementation.

archive/deprecated-providers/groq-ai/src/index.ts (6)

22-43: LGTM! Well-structured internal types.

The new GroqUsage, GroqStreamState, and GroqStreamConfig types provide good encapsulation for the streaming state machine, improving code organization and type safety.


234-265: LGTM! Clean helper implementations.

buildStreamParams and updateUsageFromChunk are well-structured helpers that encapsulate common logic effectively.


267-289: LGTM!

Good defensive check for empty content and proper state management.


361-396: LGTM!

The chunk processing logic correctly handles text emission, usage tracking, and tool call orchestration with follow-up streaming.


398-434: LGTM!

Good separation between stream processing and finalization. The callback invocations are properly sequenced.


600-631: LGTM! Clean refactoring of streamText.

The new stateful streaming approach with GroqStreamConfig and GroqStreamState improves code organization. The provider reference correctly preserves this context within the ReadableStream callback.

packages/core/src/agent/subagent/index.ts (9)

392-403: LGTM! Clean refactoring to use streamTextWithForwarding.

The delegation to streamTextWithForwarding centralizes the streaming logic and improves maintainability.


568-574: LGTM!

Good extraction of the assistant message creation logic, reducing code duplication across the handoffTask branches.


576-587: LGTM!

Good encapsulation of stream writer access from the operation context.


589-626: LGTM!

The stream forwarding logic correctly separates UI stream merging and full stream writing, with proper metadata enrichment.


669-679: LGTM!

Clean implementation with proper precedence for bailed results over the actual stream response.


681-691: LGTM!

Clean orchestration of the streaming pipeline with good separation of concerns.


901-915: LGTM!

Good metadata construction with proper handling of optional parent context and agent hierarchy tracking.


917-941: LGTM!

Good defensive checks and lazy initialization of the metadata map. The deduplication check prevents redundant registrations.


642-667: Fire-and-forget async pattern uses adequate error handling.

The writeSubagentFullStream() is intentionally called without await to avoid blocking the main flow. The internal try-catch logs errors without propagating them, preventing failures in stream writing from disrupting the operation. This pattern is consistent with similar background operations throughout the codebase (e.g., packages/postgres/src/memory-adapter.ts, packages/core/src/workflow/core.ts) and is an acceptable design choice for non-critical background tasks.

Comment on lines +108 to +111
<span
className={`text-teal-400 transition-all duration-500 ease-in-out ${
isAgentStep ? "text-shadow-neon font-bold" : ""
}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Missing CSS class definition: text-shadow-neon.

The class text-shadow-neon is applied to contentAgent (line 110) and analysisAgent (line 127) but is not defined in the styles block at the bottom of the file. Only text-shadow-neon-blue, text-shadow-neon-purple, and text-shadow-soft are defined.

🐛 Proposed fix: Add the missing class definition

Add to the styles constant around line 809:

   .text-shadow-soft {
     text-shadow: 0 0 5px rgba(251, 113, 133, 0.5),
                 0 0 10px rgba(251, 113, 133, 0.3);
     filter: brightness(1.1);
   }
+
+  .text-shadow-neon {
+    text-shadow: 0 0 7px rgba(45, 212, 191, 0.9),
+                0 0 14px rgba(45, 212, 191, 0.7),
+                0 0 21px rgba(45, 212, 191, 0.5),
+                0 0 28px rgba(45, 212, 191, 0.3);
+    filter: brightness(1.2);
+  }

Also applies to: 125-128

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

5 issues found across 17 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="website/src/theme/CustomerProjectPage/index.tsx">

<violation number="1" location="website/src/theme/CustomerProjectPage/index.tsx:94">
P1: Empty bullet arrays can cause runtime error when accessing `part.content[0]` in JSX. Add length check to prevent empty arrays from being pushed to parts.</violation>
</file>

<file name="packages/langfuse-exporter/src/exporter.ts">

<violation number="1" location="packages/langfuse-exporter/src/exporter.ts:262">
P1: String() coercion prevents fallback to undefined. When the model name attribute is missing, this sets model to the string "undefined" instead of undefined, potentially breaking downstream consumers expecting a valid model name or undefined.</violation>
</file>

<file name="packages/server-core/src/websocket/setup.ts">

<violation number="1" location="packages/server-core/src/websocket/setup.ts:64">
P2: `closeUpgrade` destroys the socket right after `write`, which may drop the response before it’s flushed. Prefer `socket.end(...)` (and avoid immediate `destroy()`), so clients reliably receive the 401/500 status.</violation>
</file>

<file name="archive/deprecated-providers/groq-ai/src/index.ts">

<violation number="1" location="archive/deprecated-providers/groq-ai/src/index.ts:317">
P1: Throw an Error object instead of a string literal. String literals lose stack trace information and violate best practices for error handling.</violation>

<violation number="2" location="archive/deprecated-providers/groq-ai/src/index.ts:321">
P1: Throw an Error object instead of a string literal. String literals lose stack trace information and violate best practices for error handling.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 12, 2026

Deploying voltagent with  Cloudflare Pages  Cloudflare Pages

Latest commit: c48dfb7
Status:⚡️  Build in progress...

View logs

omeraplak and others added 5 commits January 13, 2026 02:16
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@omeraplak omeraplak merged commit a320ea9 into main Jan 12, 2026
18 of 23 checks passed
@omeraplak omeraplak deleted the fix/lint-issues branch January 12, 2026 23:20
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