Skip to content

Conversation

@rmelisson
Copy link
Contributor

No description provided.

@revu-bot revu-bot bot requested a review from revu-bot February 10, 2026 16:09
@rmelisson rmelisson temporarily deployed to build-preproduction February 10, 2026 16:09 — with GitHub Actions Inactive
Copy link
Collaborator

@revu-bot revu-bot left a comment

Choose a reason for hiding this comment

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

Summary

This WIP PR introduces changes to search functionality and IDCC handling. The review identifies 3 critical issues and 2 important concerns that need attention:

Critical Issues

  1. Unused import causing potential build failures
  2. Debug console.log left in production code
  3. Type safety regression in IDCC parsing (parseFloat → parseInt)

Important Issues

  1. Commented-out code should be removed or documented
  2. Incomplete TODO comment needs clarification

Overall Assessment

The PR shows good progress on search improvements, but contains debugging artifacts and incomplete refactoring that should be addressed before merging.

@sonarqubecloud
Copy link

Comment on lines 4 to +5
import { PresearchClass, PreSearchResult, SEARCH_ALGO } from "./types";
import { format } from "path";
Copy link
Collaborator

Choose a reason for hiding this comment

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

[CRITICAL] Unused import will cause build failures

  • Why it matters: This unused import from 'path' module will trigger linting errors and potentially break the build
  • Impact: Build pipeline failure, code quality degradation
  • Action required: Remove this import as it's not used anywhere in the file
Suggested change
import { PresearchClass, PreSearchResult, SEARCH_ALGO } from "./types";
import { format } from "path";
import { PresearchClass, PreSearchResult, SEARCH_ALGO } from "./types";

Comment on lines +14 to +16
const pq = this.searchParams.get("pq");
console.log({ q, pq });
const response = await searchWithQuery(q as string, 5, pq != "false");
Copy link
Collaborator

Choose a reason for hiding this comment

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

[CRITICAL] Debug console.log left in production code

  • Why it matters: Console logs in production expose internal query parameters and degrade performance
  • Security concern: May leak sensitive search patterns or user behavior
  • Action required: Remove this debug statement before merging
Suggested change
const pq = this.searchParams.get("pq");
console.log({ q, pq });
const response = await searchWithQuery(q as string, 5, pq != "false");
const pq = this.searchParams.get("pq");
const response = await searchWithQuery(q as string, 5, pq != "false");

Comment on lines +246 to +253
// {
// match: {
// source: {
// boost: 1.1,
// query: SOURCES.SHEET_SP,
// },
// },
// },
Copy link
Collaborator

Choose a reason for hiding this comment

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

[IMPORTANT] Commented-out code should be removed or documented

  • Why it matters: Commented code creates confusion about intent and clutters the codebase
  • Options:
    1. If this boost is no longer needed, remove it entirely
    2. If it's temporarily disabled for testing, add a TODO with context and timeline
    3. If it's for future reference, move to documentation or git history

Recommendation: Either remove completely or add a clear comment explaining why it's disabled and when it should be reconsidered.

@tokenbureau
Copy link

tokenbureau bot commented Feb 10, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants