Skip to content

Fix multiple client and server lint/test bugs#98

Draft
Gautam7352 wants to merge 1 commit into
gautamfrom
fix/various-lint-and-test-bugs-4281398120361291047
Draft

Fix multiple client and server lint/test bugs#98
Gautam7352 wants to merge 1 commit into
gautamfrom
fix/various-lint-and-test-bugs-4281398120361291047

Conversation

@Gautam7352
Copy link
Copy Markdown
Member

The codebase contained several lint warnings and failing test scenarios. This commit resolves:

  1. react-hooks/set-state-in-effect rule violation in the client by removing an unnecessary useEffect and correctly passing a lazy initializer to useState.
  2. Multiple @typescript-eslint/parser errors on server test files by removing the **/*.test.ts exclusion in server/tsconfig.json.
  3. Hanging/malformed code blocks in embeddings.test.ts that were causing syntax errors, moving them to a proper it block.
  4. An incorrect test context mutation in errorHandler.test.ts for req.originalUrl.
  5. A trailing space bug in .docx parsing regex in content-extractors.ts and its resulting Vitest failure in content-extractors.test.ts.
  6. Several type casts from any or malformed catches to strictly typed types, satisfying strict ESLint checks.

PR created automatically by Jules for task 4281398120361291047 started by @Gautam7352

- Refactored `ChatToggleButton.tsx` to lazily initialize state instead of mutating within a `useEffect`, fixing a React lint warning.
- Removed test exclusion in `server/tsconfig.json` to allow ESLint to properly parse `.test.ts` files without throwing resolution errors.
- Fixed an `originalUrl` fallback bug in `errorHandler.test.ts`.
- Implemented previously dangling test cases in `embeddings.test.ts`.
- Adjusted a regex in `content-extractors.ts` to properly trim trailing spaces around new lines for Docx extraction and fixed matching test assertions.
- Fixed other various typing problems and formatting issues caught by ESLint and Vitest.
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 9, 2026

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

Project Deployment Actions Updated (UTC)
neura-memory-ai Ready Ready Preview, Comment Apr 9, 2026 5:04pm

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.

1 participant