Skip to content

CI: Build Lint Checks#85

Merged
Ayush8923 merged 9 commits intomainfrom
ci/add-lint-build-checks
Mar 24, 2026
Merged

CI: Build Lint Checks#85
Ayush8923 merged 9 commits intomainfrom
ci/add-lint-build-checks

Conversation

@Ayush8923
Copy link
Collaborator

@Ayush8923 Ayush8923 commented Mar 23, 2026

Issue: #84

Summary:

  • Implemented an automated linting CI pipeline to run lint checks and verify the build process.
  • Added pre-commit hooks to ensure that code with linting issues cannot be committed.
  • Fixed existing linting issues across the codebase. Some rules have been temporarily disabled and will be addressed gradually, as fixing them requires re-validating the entire flow. Additionally, removed unused code where applicable.

Summary by CodeRabbit

  • New Features

    • Added pre-commit hooks to enforce linting standards automatically.
  • Documentation

    • Updated README with new npm scripts (npm test, npm run test:coverage, npm run lint:fix) and pre-commit hooks configuration details.
  • Chores

    • Added GitHub Actions CI/CD workflow for automated linting and builds.
    • Enhanced linting configuration and rules enforcement.
    • Improved type safety throughout the codebase.
    • Removed unused code and dependencies.

@coderabbitai
Copy link

coderabbitai bot commented Mar 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c9e88980-719d-43b6-a429-c0e06a8e8410

📥 Commits

Reviewing files that changed from the base of the PR and between d0c0938 and 7a7f7e8.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

This PR modernizes the project's linting and type safety infrastructure. It establishes Husky pre-commit hooks with lint-staged for staged file linting, migrates ESLint configuration, improves type safety by replacing any with unknown in error handling across API routes, adds ESLint suppression comments throughout the codebase, removes unnecessary React imports, and introduces a GitHub Actions CI workflow.

Changes

Cohort / File(s) Summary
Git Hooks Setup
.husky/pre-commit, package.json
Added Husky pre-commit hook execution and corresponding dependencies (husky, lint-staged) with npm prepare script and lint-staged config for staged JavaScript/TypeScript files.
ESLint Configuration
eslint.config.mjs, eslint.config.mts
Migrated from .mts to .mjs config format, removed old config file, added rules for prefer-const, no-var, no-console (warn), no-duplicate-imports, and @typescript-eslint/no-unused-vars with underscore-prefix ignore patterns.
Documentation
README.md
Extended "Available Scripts" section with npm test and npm run test:coverage commands, added new "Pre-commit Hooks" section documenting Husky + lint-staged usage and bypass instructions.
API Error Handling Type Safety
app/api/assistant/[assistant_id]/route.ts, app/api/collections/.../*.ts, app/api/configs/.../*.ts, app/api/credentials/.../*.ts, app/api/document/.../*.ts, app/api/evaluations/.../*.ts
Standardized error handling across ~18 route files by converting catch parameter types from any to unknown, adding type guards (error instanceof Error) for safe message extraction, and replacing unused error variables with _error.
Component Type Strictness
app/components/types.ts, app/components/prompt-editor/ConfigDiffPane.tsx, app/components/prompt-editor/ConfigDrawer.tsx, app/configurations/prompt-editor/types.ts, app/lib/configTypes.ts
Tightened TypeScript types by converting any[] to unknown[] and record value types from any to unknown in component configs, tool parameters, and response metadata.
Component ESLint Suppressions
app/components/ConfigDrawer.tsx, app/components/ConfigModal.tsx, app/components/ConfigSelector.tsx, app/components/Sidebar.tsx, app/components/prompt-editor/ABTestTab.tsx, app/components/prompt-editor/ConfigEditorPane.tsx, app/components/prompt-editor/CurrentConfigTab.tsx, app/components/prompt-editor/HistorySidebar.tsx, app/components/speech-to-text/ModelComparisonCard.tsx, app/components/speech-to-text/WaveformVisualizer.tsx, app/components/evaluations/DatasetsTab.tsx, app/components/evaluations/EvaluationsTab.tsx
Added targeted ESLint suppression comments (@typescript-eslint/no-explicit-any, react-hooks/exhaustive-deps, react-hooks/set-state-in-effect, react-hooks/purity) to reduce lint warnings in specific hooks and type casts.
React Import Cleanup
app/components/prompt-editor/DiffView.tsx
Removed unused default React import, relying on modern JSX transform.
Component Refactoring
app/components/SimplifiedConfigEditor.tsx, app/components/DetailedResultsTable.tsx, app/evaluations/[id]/page.tsx, app/evaluations/page.tsx, app/keystore/page.tsx, app/knowledge-base/page.tsx, app/settings/credentials/page.tsx, app/speech-to-text/page.tsx, app/text-to-speech/page.tsx, app/document/page.tsx, app/configurations/page.tsx
Updated components with improved error handling (unknown types), removed unused imports/hooks, added ESLint suppressions, escaped HTML entities in UI strings, refactored unused state/variables, and streamlined type safety.
CI/CD Workflow
.github/workflows/ci.yml
Added GitHub Actions workflow for linting and building on push/PR to main branch.

Sequence Diagram(s)

Conditions for generation not met. Changes consist primarily of type safety improvements, linting configuration, error handling standardization, and minor code cleanup across distributed components, without introducing new functional features or substantially altering control flow between 3+ distinct components.

Estimated Code Review Effort

🎯 4 (Complex) | ⏱️ ~75 minutes

The PR spans 60+ files with heterogeneous changes across configuration, type safety, error handling, and component updates. While many error-handling changes are repetitive (catch parameter typing), the diversity of affected areas—API routes, React components, TypeScript interfaces, linting configs, and CI workflows—combined with several files containing substantial refactoring (SimplifiedConfigEditor, evaluations pages) and scattered ESLint suppression reasoning, demands moderate-to-high review complexity and thoroughness to verify consistency and correctness.

Possibly Related PRs

Suggested Reviewers

  • Prajna1999
  • vprashrex

Poem

🐰 The linter hops with glee,
Pre-commit hooks dance so free,
unknown types shine bright—goodbye any!
ESLint whispers hush—no more worries,
Build and test, our checks all run merry! 🎉

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 13.24% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'CI: Build Lint Checks' directly and clearly summarizes the main change: implementing CI checks for linting and building. It accurately reflects the primary objective of adding an automated CI pipeline.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/add-lint-build-checks

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

🧹 Nitpick comments (2)
jest.config.ts (1)

141-142: Consider configuring setupFilesAfterEnv for @testing-library/jest-dom matchers.

The project includes @testing-library/jest-dom which provides useful matchers like toBeInTheDocument(). To make these available in tests, create a setup file and reference it here.

♻️ Proposed configuration

Create a file jest.setup.ts:

import '@testing-library/jest-dom';

Then update the config:

   // A list of paths to modules that run some code to configure or set up the testing framework before each test
-  // setupFilesAfterEnv: [],
+  setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'],
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@jest.config.ts` around lines 141 - 142, The Jest config is not enabling
`@testing-library/jest-dom` matchers; create a setup file (e.g., jest.setup.ts)
that imports '@testing-library/jest-dom' and then update the jest.config.ts
setting setupFilesAfterEnv to include that setup file (use the path string like
'<rootDir>/jest.setup.ts') so matchers such as toBeInTheDocument() are available
in tests.
.github/workflows/lint-build.yml (1)

25-29: Remove redundant test step.

Running both npm test and npm run test:coverage is redundant since test:coverage executes all tests with coverage enabled. Consider keeping only the coverage step.

♻️ Proposed fix
       - name: Run Linting
         run: npm run lint

-      - name: Run Tests
-        run: npm test
-
       - name: Run Tests with Coverage
         run: npm run test:coverage

       - name: Build the Project
         run: npm run build
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/lint-build.yml around lines 25 - 29, Remove the redundant
"Run Tests" job step that runs "npm test" and keep only the coverage step "Run
Tests with Coverage" that runs "npm run test:coverage"; specifically delete the
step whose name is "Run Tests" and the command "npm test" from the workflow so
only the "Run Tests with Coverage" step remains to execute tests with coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/lint-build.yml:
- Around line 15-20: Add an explicit Node.js setup step using actions/setup-node
before the "Install dependencies" step so the workflow uses a reproducible Node
version; insert a step named like "Setup Node.js" that uses actions/setup-node
and sets node-version (e.g., '20' or the project's required version/read from
.tool-versions) so subsequent steps such as "Install dependencies" (run: npm ci)
run on the specified Node runtime.

In `@eslint.config.mjs`:
- Around line 19-28: Remove the duplicate "no-unused-vars" key from the rules
object in eslint.config.mjs: keep a single declaration (preferably the
comment-backed one that clarifies using `@typescript-eslint`) and delete the other
"no-unused-vars": "off" entry so the rules object no longer contains duplicate
keys; verify the remaining keys include "@typescript-eslint/no-unused-vars":
"error" and the "no-unused-vars" disablement only once.

In `@jest.config.ts`:
- Around line 150-152: Uncomment and set the Jest configuration key
testEnvironment to "jsdom" in the Jest config (the testEnvironment setting in
jest.config.ts) so React/component tests have DOM APIs available; update the
exported config object to include testEnvironment: "jsdom" (replace the
commented line // testEnvironment: "jest-environment-node" with testEnvironment:
"jsdom").

---

Nitpick comments:
In @.github/workflows/lint-build.yml:
- Around line 25-29: Remove the redundant "Run Tests" job step that runs "npm
test" and keep only the coverage step "Run Tests with Coverage" that runs "npm
run test:coverage"; specifically delete the step whose name is "Run Tests" and
the command "npm test" from the workflow so only the "Run Tests with Coverage"
step remains to execute tests with coverage.

In `@jest.config.ts`:
- Around line 141-142: The Jest config is not enabling `@testing-library/jest-dom`
matchers; create a setup file (e.g., jest.setup.ts) that imports
'@testing-library/jest-dom' and then update the jest.config.ts setting
setupFilesAfterEnv to include that setup file (use the path string like
'<rootDir>/jest.setup.ts') so matchers such as toBeInTheDocument() are available
in tests.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 22fb67ca-c842-4480-b6e6-5a568b4572e5

📥 Commits

Reviewing files that changed from the base of the PR and between 069d9f2 and 73bc3ce.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • .github/workflows/lint-build.yml
  • .husky/pre-commit
  • README.md
  • app/components/prompt-editor/DiffView.tsx
  • app/knowledge-base/page.tsx
  • eslint.config.mjs
  • eslint.config.mts
  • jest.config.ts
  • package.json
💤 Files with no reviewable changes (1)
  • eslint.config.mts

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

Caution

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

⚠️ Outside diff range comments (2)
app/components/SimplifiedConfigEditor.tsx (2)

257-421: ⚠️ Potential issue | 🟠 Major

Prevent duplicate saves while request is in flight.

handleSaveConfig can be triggered repeatedly before prior requests finish, which risks duplicate config/version writes.

Suggested fix
+ const [isSaving, setIsSaving] = useState<boolean>(false);

  const handleSaveConfig = async () => {
+   if (isSaving) return;
+   setIsSaving(true);
    if (!configName.trim()) {
      toast.error("Please enter a configuration name");
+     setIsSaving(false);
      return;
    }

    const apiKey = getApiKey();
    if (!apiKey) {
      toast.error("No API key found. Please add an API key in the Keystore.");
+     setIsSaving(false);
      return;
    }

    try {
      // existing save logic...
      setHasUnsavedChanges(false);
      setCommitMessage("");
    } catch (e) {
      console.error("Failed to save config:", e);
      toast.error("Failed to save configuration. Please try again.");
+   } finally {
+     setIsSaving(false);
    }
  };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/SimplifiedConfigEditor.tsx` around lines 257 - 421,
handleSaveConfig can be invoked multiple times before an earlier save completes;
add an "isSaving" lock (state or ref) and check it at the start of
handleSaveConfig to early-return if already saving, set isSaving = true before
the first network request and set it false in all exit paths (success, error,
and early returns), and wire that same isSaving flag into the UI (e.g., disable
the Save button) so duplicate config/version creations are prevented; reference
handleSaveConfig, setHasUnsavedChanges, setCommitMessage and savedConfigs/update
flow when adding the lock and clearing it in finally/error handlers.

548-640: ⚠️ Potential issue | 🟠 Major

Add an accessible name to the icon-only Run Evaluation button.

This button has no text label, so screen readers may announce it ambiguously.

Suggested fix
 <button
   onClick={onRunEvaluation}
+  aria-label={isEvaluating ? "Evaluation in progress" : "Run evaluation"}
+  title={isEvaluating ? "Evaluation in progress" : "Run evaluation"}
   disabled={ ... }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/SimplifiedConfigEditor.tsx` around lines 548 - 640, The Run
Evaluation button (onRunEvaluation handler, isEvaluating state, the two SVG
icons) is icon-only and lacks an accessible name—add an explicit accessible
label by providing an aria-label (e.g., aria-label="Run evaluation") or include
a visually-hidden text element inside the button that changes with isEvaluating
(e.g., "Running evaluation" vs "Run evaluation") so screen readers get
meaningful context while preserving the current visual appearance.
🧹 Nitpick comments (13)
app/evaluations/[id]/page.tsx (3)

153-157: Inconsistent error typing in catch block.

Other catch blocks in this file use catch (err: unknown) with type guards, but this one leaves the error untyped. For consistency with the PR's safer error handling approach, consider typing this as unknown.

Suggested fix
-    } catch (err) {
+    } catch (err: unknown) {
       console.error(
         `Failed to fetch assistant config for ${assistantId}:`,
         err,
       );
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/evaluations/`[id]/page.tsx around lines 153 - 157, The catch block that
currently reads catch (err) for the assistant config fetch should be changed to
catch (err: unknown) and then use a type guard before logging; update the error
handling around the console.error call that references assistantId to first
check if err is an Error (e.g., err instanceof Error) and log err.message (or
otherwise stringify unknown errors) so the console.error call remains safe and
consistent with other blocks in this file.

141-142: Verify if toast should be included in the dependency array.

The eslint-disable comment suppresses the react-hooks/exhaustive-deps warning. The toast object is used inside this callback (lines 114-115) but is not listed in the dependencies. If useToast() returns a stable reference, this is fine, but the blanket suppression may hide legitimate warnings for other missing dependencies.

Consider either adding toast to the dependency array or using a more targeted inline suppression comment that documents why toast is intentionally omitted.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/evaluations/`[id]/page.tsx around lines 141 - 142, The effect currently
suppresses react-hooks/exhaustive-deps while using the toast object from
useToast inside the callback; update the dependency handling so it’s explicit:
either add toast to the effect dependency array (the useEffect where apiKeys,
selectedKeyId, jobId, exportFormat are listed) or replace the blanket
eslint-disable with a targeted inline suppression and a short comment explaining
why toast is intentionally stable (e.g., provided by useToast). Locate the
useEffect and the useToast() invocation to make the change and ensure the
dependency list accurately reflects all used variables.

428-429: Remove unused statusColor variable instead of suppressing the lint warning.

The statusColor is computed but never used. Rather than suppressing the lint error, consider removing this dead code. If it's planned for future use, it can be added back when needed.

Suggested fix
-  // eslint-disable-next-line `@typescript-eslint/no-unused-vars`
-  const statusColor = getStatusColor(job.status);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/evaluations/`[id]/page.tsx around lines 428 - 429, The variable
statusColor assigned via getStatusColor(job.status) is unused; remove this dead
code instead of suppressing the linter. Delete the line that declares
statusColor (the const statusColor = getStatusColor(job.status);) and any
accompanying eslint-disable comment, or if you intend to use it later, leave a
TODO comment and actually use statusColor where the job status is rendered;
locate the assignment near the evaluation page rendering logic referencing
job.status to make the change.
app/components/SimplifiedConfigEditor.tsx (3)

524-539: Finish color centralization in this style block.

This block still mixes hardcoded hex values with colors, which makes theme updates brittle.

Based on learnings: Use centralized colors from /app/lib/colors.ts instead of hardcoded hex values for styling.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/SimplifiedConfigEditor.tsx` around lines 524 - 539, In
SimplifiedConfigEditor (the style block that sets backgroundColor, borderColor,
color and the onMouseEnter/onMouseLeave handlers for the element using
hasUnsavedChanges), replace all hardcoded hex literals ("#fffbeb", "#fef3c7",
"#fafafa", "#ffffff", "#fcd34d", "#b45309", "#e5e5e5", "#171717") with
centralized tokens from the colors export in /app/lib/colors.ts (you already use
colors.bg.primary) so theme values come from a single source; update the
conditional expressions to reference the appropriate colors.* properties (e.g.,
colors.bg.warning, colors.bg.hover, colors.border.highlight,
colors.text.warning, colors.border.default, colors.text.primary) and ensure the
onMouseEnter/onMouseLeave handlers set e.currentTarget.style.backgroundColor to
those colors.* values instead of hex strings.

87-87: Extract kaapi_api_keys into a shared localStorage key constant.

Hardcoding this key in-component makes future key migrations error-prone.

Based on learnings: Avoid hardcoding status values and localStorage keys; define them as constants in utility files for maintainability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/SimplifiedConfigEditor.tsx` at line 87, The component
hardcodes the localStorage key "kaapi_api_keys" (see
localStorage.getItem("kaapi_api_keys") in SimplifiedConfigEditor.tsx); extract
this into a shared constant (e.g., export const KAAPI_API_KEYS =
"kaapi_api_keys") in a central constants or localStorageKeys utility module,
update SimplifiedConfigEditor.tsx to import and use that constant where
getItem/setItem are used, and update any other modules that reference the same
literal to use the new constant to ensure a single source of truth for the key.

467-468: Replace any in handleConfigChange with a field-to-type map to maintain type safety.

Using any here undermines the type-safety improvements this PR is aiming for. The callback receives typed values (string, number, Tool[]) from ConfigDrawer but loses that type information.

However, the suggested refactor needs refinement:

  • provider should accept any string value (not just "openai") since ConfigDrawer dynamically generates options
  • vectorStoreIds appears unused in ConfigDrawer calls and may not need inclusion in the ConfigChangeMap

Consider using a generic overload approach instead for better flexibility:

const handleConfigChange = <K extends keyof typeof handlers>(
  field: K,
  value: Parameters<typeof handlers[K]>[0],
) => {
  handlers[field](value);
};

Or adjust the suggested ConfigChangeMap to match actual ConfigDrawer usage patterns while removing vectorStoreIds.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/SimplifiedConfigEditor.tsx` around lines 467 - 468, The
handleConfigChange function currently types its value as any; replace this with
a field-to-type mapping or a generic overload so callers retain precise types
(string, number, Tool[], etc.). Either (a) define a ConfigChangeMap matching
actual ConfigDrawer fields (omit unused vectorStoreIds and make provider string
rather than a literal) and type handleConfigChange as (field: keyof
ConfigChangeMap, value: ConfigChangeMap[typeof field]), or (b) implement the
suggested generic overload using handlers: const handleConfigChange = <K extends
keyof typeof handlers>(field: K, value: Parameters<typeof handlers[K]>[0]) => {
handlers[field](value); } so handleConfigChange and referenced handlers preserve
exact parameter types; update references to handleConfigChange accordingly.
app/document/page.tsx (2)

155-157: Consider applying the same error typing pattern to other catch blocks for consistency.

The fetchDocuments catch block was updated to use catch (err: unknown) with an instanceof Error guard, but other catch blocks in this file still use implicit any typing:

  • Line 155: catch (error) in handleUpload
  • Line 195: catch (error) in handleDeleteDocument
  • Line 237: catch (err) in handleSelectDocument

For consistency with the PR's type safety improvements, these should follow the same pattern.

♻️ Suggested fix for consistent error typing
-    } catch (error) {
+    } catch (error: unknown) {
       console.error('Upload error:', error);
-    } catch (error) {
+    } catch (error: unknown) {
       console.error('Delete error:', error);
-    } catch (err) {
+    } catch (err: unknown) {
       console.error('Failed to fetch document details:', err);

Also applies to: 195-197, 237-239

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/document/page.tsx` around lines 155 - 157, Several catch blocks in this
file use untyped catch parameters; update handleUpload, handleDeleteDocument,
and handleSelectDocument to use catch (err: unknown) and then narrow with if
(err instanceof Error) to read err.message (or use a fallback like 'Unknown
error') when logging or toasting, mirroring the fetchDocuments change and
ensuring consistent type-safe error handling across those handlers.

53-58: ESLint disable is acceptable, but consider using useCallback for cleaner dependency management.

The disable comment suppresses the warning about fetchDocuments not being in the dependency array. While this works, wrapping fetchDocuments in useCallback with [apiKey] as dependencies would eliminate the need for the disable comment and make the data flow more explicit.

♻️ Optional refactor using useCallback
+import { useState, useEffect, useCallback } from 'react';
-import { useState, useEffect } from 'react';
-  const fetchDocuments = async () => {
+  const fetchDocuments = useCallback(async () => {
     if (!apiKey) {
       setError('No API key found. Please add an API key in the Keystore.');
       return;
     }
     // ... rest of implementation
-  };
+  }, [apiKey]);

   useEffect(() => {
     if (apiKey) {
       fetchDocuments();
     }
-    // eslint-disable-next-line react-hooks/exhaustive-deps
-  }, [apiKey]);
+  }, [apiKey, fetchDocuments]);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/document/page.tsx` around lines 53 - 58, The effect currently suppresses
the exhaustive-deps ESLint rule because fetchDocuments is not stable; wrap
fetchDocuments in useCallback with [apiKey] (or whatever external values it
reads) so it is memoized, then include that memoized fetchDocuments in the
useEffect dependency array and remove the eslint-disable comment; update the
function referenced as fetchDocuments (and any helper it uses) to be declared
via React.useCallback and keep the useEffect dependency list to [apiKey,
fetchDocuments] (or just [fetchDocuments] if apiKey is captured inside the
callback).
app/components/prompt-editor/ConfigEditorPane.tsx (1)

101-102: The any cast bypasses provider type safety.

The CompletionConfig.provider is typed as the literal 'openai', but casting newProvider as any bypasses this. While the dropdown currently only offers valid options, this cast could mask issues if the dropdown options expand.

Consider a type assertion that maintains some safety:

♻️ Optional: Use a type predicate for safer provider casting
+const isValidProvider = (p: string): p is 'openai' => p === 'openai';
+
 const handleProviderChange = (newProvider: string) => {
+  if (!isValidProvider(newProvider)) {
+    console.warn(`Invalid provider: ${newProvider}`);
+    return;
+  }
   onConfigChange({
     ...configBlob,
     completion: {
       ...configBlob.completion,
-      // eslint-disable-next-line `@typescript-eslint/no-explicit-any`
-      provider: newProvider as any,
+      provider: newProvider,
       params: {
         ...params,
         model: MODEL_OPTIONS[newProvider as keyof typeof MODEL_OPTIONS][0].value,
       },
     },
   });
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/prompt-editor/ConfigEditorPane.tsx` around lines 101 - 102,
The code is bypassing type safety by casting newProvider to any for
CompletionConfig.provider; replace the any cast with a safe assertion like
newProvider as CompletionConfig['provider'] (or, even better, validate via a
type predicate e.g. isValidProvider(value): value is
CompletionConfig['provider'] and only set provider when it returns true) so the
assignment to CompletionConfig.provider preserves the literal union type instead
of using any.
app/components/ConfigDrawer.tsx (1)

142-159: Consider using the formatDateTime utility or memoizing Date.now().

The formatTimestamp function calls Date.now() on every invocation during render, which is why the react-hooks/purity rule flags it. This could cause inconsistent relative times if the component re-renders frequently.

Based on learnings, the codebase has a formatDateTime() utility in /app/components/utils.ts. Consider using it or refactoring to avoid impure calls during render.

♻️ Suggested: Pass current time as parameter
-const formatTimestamp = (timestamp: number | string) => {
-  // eslint-disable-next-line react-hooks/purity
-  const now = Date.now();
+const formatTimestamp = (timestamp: number | string, now: number) => {
   const date = typeof timestamp === 'string'
     ? new Date(timestamp).getTime()
     : timestamp;
   // ... rest of function
 };

 // In component, memoize current time per render:
+const now = Date.now();
 // Then pass `now` to formatTimestamp calls
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/ConfigDrawer.tsx` around lines 142 - 159, The formatTimestamp
function makes an impure call to Date.now() each render; replace its internal
Date.now() usage by either (a) delegating to the existing formatDateTime utility
(imported from app/components/utils.ts) to format relative times, or (b) change
formatTimestamp signature to accept a currentTime parameter (number) and compute
diffs against that value so callers pass a memoized Date.now() (e.g., computed
with useMemo/useState at the component level). Update all callers of
formatTimestamp accordingly (or call formatDateTime instead) and remove the
inline Date.now() call inside formatTimestamp to satisfy the react-hooks/purity
rule.
app/components/prompt-editor/CurrentConfigTab.tsx (1)

65-74: Type narrowing is incomplete for value: unknown.

The change from any to unknown is a good type safety improvement, but the narrowing logic is incomplete:

  1. Line 68: value as string assumes the caller passed a string, but unknown doesn't guarantee this.
  2. Lines 70-71: The any cast bypasses type checking entirely.

Given that callers pass different types (e.target.value for strings, parseInt(...) for numbers), consider adding runtime type guards:

♻️ Optional: Add type guards for safer narrowing
 const updateTool = (index: number, field: keyof Tool, value: unknown) => {
   const newTools = [...tools];
   if (field === 'knowledge_base_ids') {
+    if (typeof value !== 'string') {
+      console.warn('Expected string for knowledge_base_ids');
+      return;
+    }
-    newTools[index][field] = [value as string];
+    newTools[index][field] = [value];
+  } else if (field === 'max_num_results') {
+    newTools[index][field] = typeof value === 'number' ? value : 20;
   } else {
-    // eslint-disable-next-line `@typescript-eslint/no-explicit-any`
-    (newTools[index] as any)[field] = value;
+    // type field is readonly 'file_search', no update needed
   }
   onToolsChange(newTools);
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/prompt-editor/CurrentConfigTab.tsx` around lines 65 - 74, The
updateTool function uses value: unknown but unsafely narrows it (casts to string
and uses any); update updateTool to perform runtime type guards before assigning
into newTools: for field === 'knowledge_base_ids' ensure value is a string or an
array of strings (if string, wrap into [value]; if Array, validate every item is
a string) and for other fields use typeof checks (e.g., typeof value ===
'string' for string fields, typeof value === 'number' for numeric fields, typeof
value === 'boolean' for booleans) or Array.isArray where appropriate, then
assign with proper typing to newTools[index][field]; keep using the Tool type
and call onToolsChange(newTools) only after validation to avoid unsafe any casts
in updateTool.
app/components/prompt-editor/ABTestTab.tsx (1)

42-47: Consider a type-safe alternative to the any cast.

The any cast is a workaround for TypeScript's limitation with dynamic property assignment. While acceptable, a slightly cleaner approach would preserve type information:

♻️ Optional: Type-safe field update
 const updateVariant = (index: number, field: keyof LegacyVariant, value: string) => {
   const newVariants = [...variants];
-  // eslint-disable-next-line `@typescript-eslint/no-explicit-any`
-  (newVariants[index] as any)[field] = value;
+  newVariants[index] = { ...newVariants[index], [field]: value };
   onVariantsChange(newVariants);
 };

This avoids the any cast by using object spread with computed property, which TypeScript handles safely.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/prompt-editor/ABTestTab.tsx` around lines 42 - 47, The
updateVariant function uses an any cast to assign a dynamic field on a
LegacyVariant, which loses type safety; instead, create a new variant object via
object spread and a computed property to update the dynamic key (e.g., const
updated = { ...newVariants[index], [field]: value } ), replace
newVariants[index] with that updated object, and then call
onVariantsChange(newVariants); updateVariant, LegacyVariant, variants, and
onVariantsChange are the symbols to change so you avoid the (newVariants[index]
as any)[field] cast and preserve type checking.
app/components/prompt-editor/ConfigDrawer.tsx (1)

62-63: Remove the unused currentContent prop from the interface and destructuring.

The prop is declared in the ConfigDrawerProps interface (line 25) and destructured (line 63) but never used within the component. Suppressing the lint warning with eslint-disable-next-line masks dead code that should be cleaned up. Remove currentContent from both the interface definition and the destructuring statement.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/components/prompt-editor/ConfigDrawer.tsx` around lines 62 - 63, Remove
the dead prop `currentContent` from the component's props interface and
destructuring: in the `ConfigDrawerProps` interface delete the `currentContent`
declaration and in the `ConfigDrawer` functional component remove
`currentContent` from the destructured parameters (also remove the
eslint-disable comment). Verify there are no other references to
`currentContent` in this file (e.g., inside `ConfigDrawer` body or helper
functions) and run type checks to ensure no remaining references break
compilation.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@app/components/SimplifiedConfigEditor.tsx`:
- Line 76: The provider useState in SimplifiedConfigEditor is typed as a loose
string allowing invalid values; change its type to the exact literal union used
by ConfigBlob.completion.provider (use that type or extract the provider type
alias) so provider and setProvider only accept valid provider literals, update
handleConfigChange to validate/guard incoming values before calling setProvider
(do not accept arbitrary strings) and remove or replace any force-cast to
'openai' (the cast at the code handling update in handleConfigChange and where
provider is assumed to be 'openai'); locate the provider state, the
handleConfigChange function, and any places that cast provider to 'openai' and
enforce the typed literal instead.

In `@app/components/speech-to-text/ModelComparisonCard.tsx`:
- Around line 72-77: The effect currently only collapses when status ===
'pending' but includes modelId in its dependency array, so changing modelId in a
non-pending state won't reset expansion; update the logic to reset expansion on
model switch by either (a) removing modelId from this effect if collapse should
only happen on pending, or (b) add an explicit reset for model changes—e.g., in
the existing useEffect or a new useEffect watching modelId call
setIsExpanded(false) unconditionally—so refer to useEffect, status, modelId, and
setIsExpanded when applying the change.

In `@app/evaluations/`[id]/page.tsx:
- Around line 161-179: The function fetchConfigInfo currently issues fetches for
`/api/configs/${configId}` and
`/api/configs/${configId}/versions/${configVersion}` but never uses or returns
the responses, making it dead network work; either remove fetchConfigInfo and
all its call sites (including where it's invoked during component load and any
effect/handler calls) if configVersionInfo/state is intentionally removed, or
restore the function to parse and return the JSON (e.g., await
configResponse.json(), await versionResponse.json()) and update the caller(s) to
consume and set the restored state (configVersionInfo) or otherwise use the
returned data (update state setters, props, or downstream logic); ensure to keep
the try/catch and handle non-ok responses by returning null or throwing so
callers can handle errors.
- Around line 206-208: Sanitize LLM answers before pushing into CSV: when
building the CSV row where row.push uses (group.llm_answers[i] ||
"").replace(...), detect if the trimmed value begins with any of the
CSV-formula-leading characters (=, +, -, @) and prefix it (e.g., with a single
quote) the same way score comments are sanitized; keep the existing quote
escaping .replace(/"/g, '""') and newline removal, but add the leading-character
check on the sanitized string prior to wrapping in surrounding quotes so formula
injection is prevented for group.llm_answers.
- Around line 266-268: Replace the manual .replace(...) sanitization for CSV on
item.input?.question, item.output?.answer, and item.metadata?.ground_truth with
the existing sanitizeCSVCell utility (call sanitizeCSVCell(<value>, true)) just
like score.comment uses; update the three CSV cell entries that currently build
`"${(...).replace(...)}"` to instead use
`"${sanitizeCSVCell(item.input?.question, true)}"`,
`"${sanitizeCSVCell(item.output?.answer, true)}"`, and
`"${sanitizeCSVCell(item.metadata?.ground_truth, true)}"` (referencing these
exact property names and the sanitizeCSVCell function so the same
CSV/formula-injection protections are applied consistently).

In `@app/knowledge-base/page.tsx`:
- Around line 245-246: Remove the incorrect eslint-disable comment sitting above
the top-level async function fetchCollections; instead either wrap
fetchCollections with React.useCallback (so it can be safely referenced in the
useEffect dependency array) and supply the correct dependencies, or move the
function definition inside the useEffect where it's used so no external
dependency suppression is needed; ensure the useEffect that references
fetchCollections lists the stable callback or no dependencies as appropriate and
delete the obsolete "// eslint-disable-next-line react-hooks/exhaustive-deps"
line above fetchCollections.

---

Outside diff comments:
In `@app/components/SimplifiedConfigEditor.tsx`:
- Around line 257-421: handleSaveConfig can be invoked multiple times before an
earlier save completes; add an "isSaving" lock (state or ref) and check it at
the start of handleSaveConfig to early-return if already saving, set isSaving =
true before the first network request and set it false in all exit paths
(success, error, and early returns), and wire that same isSaving flag into the
UI (e.g., disable the Save button) so duplicate config/version creations are
prevented; reference handleSaveConfig, setHasUnsavedChanges, setCommitMessage
and savedConfigs/update flow when adding the lock and clearing it in
finally/error handlers.
- Around line 548-640: The Run Evaluation button (onRunEvaluation handler,
isEvaluating state, the two SVG icons) is icon-only and lacks an accessible
name—add an explicit accessible label by providing an aria-label (e.g.,
aria-label="Run evaluation") or include a visually-hidden text element inside
the button that changes with isEvaluating (e.g., "Running evaluation" vs "Run
evaluation") so screen readers get meaningful context while preserving the
current visual appearance.

---

Nitpick comments:
In `@app/components/ConfigDrawer.tsx`:
- Around line 142-159: The formatTimestamp function makes an impure call to
Date.now() each render; replace its internal Date.now() usage by either (a)
delegating to the existing formatDateTime utility (imported from
app/components/utils.ts) to format relative times, or (b) change formatTimestamp
signature to accept a currentTime parameter (number) and compute diffs against
that value so callers pass a memoized Date.now() (e.g., computed with
useMemo/useState at the component level). Update all callers of formatTimestamp
accordingly (or call formatDateTime instead) and remove the inline Date.now()
call inside formatTimestamp to satisfy the react-hooks/purity rule.

In `@app/components/prompt-editor/ABTestTab.tsx`:
- Around line 42-47: The updateVariant function uses an any cast to assign a
dynamic field on a LegacyVariant, which loses type safety; instead, create a new
variant object via object spread and a computed property to update the dynamic
key (e.g., const updated = { ...newVariants[index], [field]: value } ), replace
newVariants[index] with that updated object, and then call
onVariantsChange(newVariants); updateVariant, LegacyVariant, variants, and
onVariantsChange are the symbols to change so you avoid the (newVariants[index]
as any)[field] cast and preserve type checking.

In `@app/components/prompt-editor/ConfigDrawer.tsx`:
- Around line 62-63: Remove the dead prop `currentContent` from the component's
props interface and destructuring: in the `ConfigDrawerProps` interface delete
the `currentContent` declaration and in the `ConfigDrawer` functional component
remove `currentContent` from the destructured parameters (also remove the
eslint-disable comment). Verify there are no other references to
`currentContent` in this file (e.g., inside `ConfigDrawer` body or helper
functions) and run type checks to ensure no remaining references break
compilation.

In `@app/components/prompt-editor/ConfigEditorPane.tsx`:
- Around line 101-102: The code is bypassing type safety by casting newProvider
to any for CompletionConfig.provider; replace the any cast with a safe assertion
like newProvider as CompletionConfig['provider'] (or, even better, validate via
a type predicate e.g. isValidProvider(value): value is
CompletionConfig['provider'] and only set provider when it returns true) so the
assignment to CompletionConfig.provider preserves the literal union type instead
of using any.

In `@app/components/prompt-editor/CurrentConfigTab.tsx`:
- Around line 65-74: The updateTool function uses value: unknown but unsafely
narrows it (casts to string and uses any); update updateTool to perform runtime
type guards before assigning into newTools: for field === 'knowledge_base_ids'
ensure value is a string or an array of strings (if string, wrap into [value];
if Array, validate every item is a string) and for other fields use typeof
checks (e.g., typeof value === 'string' for string fields, typeof value ===
'number' for numeric fields, typeof value === 'boolean' for booleans) or
Array.isArray where appropriate, then assign with proper typing to
newTools[index][field]; keep using the Tool type and call
onToolsChange(newTools) only after validation to avoid unsafe any casts in
updateTool.

In `@app/components/SimplifiedConfigEditor.tsx`:
- Around line 524-539: In SimplifiedConfigEditor (the style block that sets
backgroundColor, borderColor, color and the onMouseEnter/onMouseLeave handlers
for the element using hasUnsavedChanges), replace all hardcoded hex literals
("#fffbeb", "#fef3c7", "#fafafa", "#ffffff", "#fcd34d", "#b45309", "#e5e5e5",
"#171717") with centralized tokens from the colors export in /app/lib/colors.ts
(you already use colors.bg.primary) so theme values come from a single source;
update the conditional expressions to reference the appropriate colors.*
properties (e.g., colors.bg.warning, colors.bg.hover, colors.border.highlight,
colors.text.warning, colors.border.default, colors.text.primary) and ensure the
onMouseEnter/onMouseLeave handlers set e.currentTarget.style.backgroundColor to
those colors.* values instead of hex strings.
- Line 87: The component hardcodes the localStorage key "kaapi_api_keys" (see
localStorage.getItem("kaapi_api_keys") in SimplifiedConfigEditor.tsx); extract
this into a shared constant (e.g., export const KAAPI_API_KEYS =
"kaapi_api_keys") in a central constants or localStorageKeys utility module,
update SimplifiedConfigEditor.tsx to import and use that constant where
getItem/setItem are used, and update any other modules that reference the same
literal to use the new constant to ensure a single source of truth for the key.
- Around line 467-468: The handleConfigChange function currently types its value
as any; replace this with a field-to-type mapping or a generic overload so
callers retain precise types (string, number, Tool[], etc.). Either (a) define a
ConfigChangeMap matching actual ConfigDrawer fields (omit unused vectorStoreIds
and make provider string rather than a literal) and type handleConfigChange as
(field: keyof ConfigChangeMap, value: ConfigChangeMap[typeof field]), or (b)
implement the suggested generic overload using handlers: const
handleConfigChange = <K extends keyof typeof handlers>(field: K, value:
Parameters<typeof handlers[K]>[0]) => { handlers[field](value); } so
handleConfigChange and referenced handlers preserve exact parameter types;
update references to handleConfigChange accordingly.

In `@app/document/page.tsx`:
- Around line 155-157: Several catch blocks in this file use untyped catch
parameters; update handleUpload, handleDeleteDocument, and handleSelectDocument
to use catch (err: unknown) and then narrow with if (err instanceof Error) to
read err.message (or use a fallback like 'Unknown error') when logging or
toasting, mirroring the fetchDocuments change and ensuring consistent type-safe
error handling across those handlers.
- Around line 53-58: The effect currently suppresses the exhaustive-deps ESLint
rule because fetchDocuments is not stable; wrap fetchDocuments in useCallback
with [apiKey] (or whatever external values it reads) so it is memoized, then
include that memoized fetchDocuments in the useEffect dependency array and
remove the eslint-disable comment; update the function referenced as
fetchDocuments (and any helper it uses) to be declared via React.useCallback and
keep the useEffect dependency list to [apiKey, fetchDocuments] (or just
[fetchDocuments] if apiKey is captured inside the callback).

In `@app/evaluations/`[id]/page.tsx:
- Around line 153-157: The catch block that currently reads catch (err) for the
assistant config fetch should be changed to catch (err: unknown) and then use a
type guard before logging; update the error handling around the console.error
call that references assistantId to first check if err is an Error (e.g., err
instanceof Error) and log err.message (or otherwise stringify unknown errors) so
the console.error call remains safe and consistent with other blocks in this
file.
- Around line 141-142: The effect currently suppresses
react-hooks/exhaustive-deps while using the toast object from useToast inside
the callback; update the dependency handling so it’s explicit: either add toast
to the effect dependency array (the useEffect where apiKeys, selectedKeyId,
jobId, exportFormat are listed) or replace the blanket eslint-disable with a
targeted inline suppression and a short comment explaining why toast is
intentionally stable (e.g., provided by useToast). Locate the useEffect and the
useToast() invocation to make the change and ensure the dependency list
accurately reflects all used variables.
- Around line 428-429: The variable statusColor assigned via
getStatusColor(job.status) is unused; remove this dead code instead of
suppressing the linter. Delete the line that declares statusColor (the const
statusColor = getStatusColor(job.status);) and any accompanying eslint-disable
comment, or if you intend to use it later, leave a TODO comment and actually use
statusColor where the job status is rendered; locate the assignment near the
evaluation page rendering logic referencing job.status to make the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 106a48c6-897c-4a6d-8fd4-a8e1a81fdbde

📥 Commits

Reviewing files that changed from the base of the PR and between 73bc3ce and 00ce1c0.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (56)
  • .github/workflows/lint-build.yml
  • app/api/assistant/[assistant_id]/route.ts
  • app/api/collections/[collection_id]/route.ts
  • app/api/collections/jobs/[job_id]/route.ts
  • app/api/collections/route.ts
  • app/api/configs/[config_id]/route.ts
  • app/api/configs/[config_id]/versions/[version_number]/route.ts
  • app/api/configs/[config_id]/versions/route.ts
  • app/api/credentials/[provider]/route.ts
  • app/api/credentials/route.ts
  • app/api/document/[document_id]/route.ts
  • app/api/document/route.ts
  • app/api/evaluations/[id]/route.ts
  • app/api/evaluations/datasets/[dataset_id]/route.ts
  • app/api/evaluations/datasets/route.ts
  • app/api/evaluations/stt/datasets/[dataset_id]/route.ts
  • app/api/evaluations/stt/files/route.ts
  • app/api/evaluations/stt/results/[result_id]/route.ts
  • app/api/evaluations/stt/runs/[run_id]/route.ts
  • app/api/evaluations/stt/samples/[sample_id]/route.ts
  • app/api/evaluations/tts/datasets/[dataset_id]/route.ts
  • app/api/evaluations/tts/results/[result_id]/route.ts
  • app/api/evaluations/tts/runs/[run_id]/route.ts
  • app/components/ConfigDrawer.tsx
  • app/components/ConfigModal.tsx
  • app/components/ConfigSelector.tsx
  • app/components/DetailedResultsTable.tsx
  • app/components/Sidebar.tsx
  • app/components/SimplifiedConfigEditor.tsx
  • app/components/evaluations/DatasetsTab.tsx
  • app/components/evaluations/EvaluationsTab.tsx
  • app/components/prompt-editor/ABTestTab.tsx
  • app/components/prompt-editor/ConfigDiffPane.tsx
  • app/components/prompt-editor/ConfigDrawer.tsx
  • app/components/prompt-editor/ConfigEditorPane.tsx
  • app/components/prompt-editor/CurrentConfigTab.tsx
  • app/components/prompt-editor/HistorySidebar.tsx
  • app/components/prompt-editor/HistoryTab.tsx
  • app/components/speech-to-text/ModelComparisonCard.tsx
  • app/components/speech-to-text/WaveformVisualizer.tsx
  • app/components/types.ts
  • app/configurations/page.tsx
  • app/configurations/prompt-editor/page.tsx
  • app/configurations/prompt-editor/types.ts
  • app/datasets/page.tsx
  • app/document/page.tsx
  • app/evaluations/[id]/page.tsx
  • app/evaluations/page.tsx
  • app/keystore/page.tsx
  • app/knowledge-base/page.tsx
  • app/lib/configTypes.ts
  • app/settings/credentials/page.tsx
  • app/speech-to-text/page.tsx
  • app/text-to-speech/page.tsx
  • eslint.config.mjs
  • package.json
✅ Files skipped from review due to trivial changes (25)
  • app/api/evaluations/tts/runs/[run_id]/route.ts
  • app/api/evaluations/tts/results/[result_id]/route.ts
  • app/api/evaluations/stt/results/[result_id]/route.ts
  • app/api/evaluations/stt/files/route.ts
  • app/api/configs/[config_id]/route.ts
  • app/components/prompt-editor/HistoryTab.tsx
  • .github/workflows/lint-build.yml
  • app/api/configs/[config_id]/versions/[version_number]/route.ts
  • app/api/configs/[config_id]/versions/route.ts
  • app/components/speech-to-text/WaveformVisualizer.tsx
  • app/components/prompt-editor/HistorySidebar.tsx
  • app/components/evaluations/DatasetsTab.tsx
  • app/components/ConfigSelector.tsx
  • app/configurations/prompt-editor/page.tsx
  • app/components/Sidebar.tsx
  • app/components/types.ts
  • app/api/document/route.ts
  • app/components/DetailedResultsTable.tsx
  • package.json
  • app/configurations/prompt-editor/types.ts
  • app/components/prompt-editor/ConfigDiffPane.tsx
  • app/keystore/page.tsx
  • app/datasets/page.tsx
  • app/components/ConfigModal.tsx
  • app/api/evaluations/stt/runs/[run_id]/route.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • eslint.config.mjs
👮 Files not reviewed due to content moderation or server errors (8)
  • app/components/evaluations/EvaluationsTab.tsx
  • app/evaluations/page.tsx
  • app/configurations/page.tsx
  • app/settings/credentials/page.tsx
  • app/speech-to-text/page.tsx
  • app/text-to-speech/page.tsx
  • app/api/credentials/[provider]/route.ts
  • app/api/evaluations/datasets/route.ts

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/lint-build.yml:
- Around line 16-20: The workflow step mistakenly contains duplicate "uses" keys
and an invalid "cache: 'npm'" input for actions/checkout@v4; split this into two
steps: keep a single checkout step using actions/checkout@v4 (remove the
duplicate uses and the cache input) and add a separate setup step using
actions/setup-node (e.g., actions/setup-node@v3) where you place the
Node.js-specific inputs like cache: 'npm' and node-version; update or remove the
duplicate "uses: actions/checkout@v4" and ensure the new actions/setup-node step
appears after the checkout step.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 68debf87-df0a-4bbd-995f-2a0f1fef446c

📥 Commits

Reviewing files that changed from the base of the PR and between 00ce1c0 and ca89e67.

📒 Files selected for processing (1)
  • .github/workflows/lint-build.yml

@Ayush8923
Copy link
Collaborator Author

@Prajna1999 @vprashrex Could you please perform a sanity check of the feature flows on your side to ensure everything is working as expected?

@vprashrex
Copy link
Collaborator

@Ayush8923 (NitPick) can rename lint.yml to ci.yml .. in future we can add type check or anything in one ci.yml file ..

@Ayush8923
Copy link
Collaborator Author

@Ayush8923 (NitPick) can rename lint.yml to ci.yml .. in future we can add type check or anything in one ci.yml file ..

I have updated the file name @vprashrex as per your suggestion. Thanks!

@Ayush8923 Ayush8923 merged commit fe9a695 into main Mar 24, 2026
2 checks passed
@Ayush8923 Ayush8923 deleted the ci/add-lint-build-checks branch March 24, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants