Skip to content

fix(new-webui): Unquote query string for the clp (rather than clp-s) storage engine (fixes #1072).#1074

Merged
kirkrodrigues merged 2 commits into
y-scope:mainfrom
kirkrodrigues:fix-1072
Jul 7, 2025
Merged

fix(new-webui): Unquote query string for the clp (rather than clp-s) storage engine (fixes #1072).#1074
kirkrodrigues merged 2 commits into
y-scope:mainfrom
kirkrodrigues:fix-1072

Conversation

@kirkrodrigues

@kirkrodrigues kirkrodrigues commented Jul 7, 2025

Copy link
Copy Markdown
Member

Description

#967 incorrectly unquoted query strings for the clp-s storage engine, even though the original code unquoted them for the clp storage engine. This PR resolves the issue, including a comment to explain the change for future developers.

Checklist

  • The PR satisfies the contribution guidelines.
  • This is a breaking change and that has been indicated in the PR title, OR this isn't a
    breaking change.
  • Necessary docs have been updated, OR no docs need to be updated.

Validation performed

  • clp-text
    • Compressed the hive-24hr dataset.
    • Tested the following queries worked from the UI:
      • DESERIALIZE_ERRORS
      • DESERIALIZE_ERRORS:
      • "DESERIALIZE_ERRORS"
      • " DESERIALIZE_ERRORS:"
  • clp-json
    • Compressed the mongodb dataset.
    • Tested the following queries worked from the UI:
      • c: REPL
      • c: "REPL"
      • msg: *register*
      • msg: "*register*"

@kirkrodrigues kirkrodrigues requested a review from a team as a code owner July 7, 2025 10:03
@coderabbitai

coderabbitai Bot commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

The conditional logic in the handleQuerySubmit function was updated to check for a different storage engine constant, and a comment was added to clarify why query strings are unquoted if they are wrapped in double quotes. No functional or exported API changes were made.

Changes

File Change Summary
components/webui/client/src/pages/SearchPage/SearchControls/search-requests.ts Modified conditional check for storage engine; added explanatory comment for unquoting logic.

Possibly related PRs

Suggested reviewers

  • junhaoliao

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f1d379d and 97c351f.

📒 Files selected for processing (1)
  • components/webui/client/src/pages/SearchPage/SearchControls/search-requests.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.

**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}: - Prefer false == <expression> rather than !<expression>.

⚙️ Source: CodeRabbit Configuration File

List of files the instruction was applied to:

  • components/webui/client/src/pages/SearchPage/SearchControls/search-requests.ts
🧠 Learnings (2)
📓 Common learnings
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In `components/log-viewer-webui/client/src/api/query.js`, the `ExtractJsonResp` type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.
Learnt from: Bill-hbrhbr
PR: y-scope/clp#868
File: components/clp-package-utils/clp_package_utils/scripts/start_clp.py:869-870
Timestamp: 2025-06-10T05:56:56.572Z
Learning: The team prefers keeping simple conditional logic inline rather than extracting it into helper functions, especially for straightforward operations like string concatenation based on storage engine type.
components/webui/client/src/pages/SearchPage/SearchControls/search-requests.ts (3)
Learnt from: LinZhihao-723
PR: y-scope/clp#873
File: components/core/src/clp/ffi/ir_stream/search/QueryHandlerImpl.hpp:320-324
Timestamp: 2025-05-05T01:12:18.561Z
Learning: In the CLP codebase, the `m_case_sensitive_search` flag is used only for actual string value comparisons during query evaluation, not for schema key name matching. Schema keys are always compared case-sensitively regardless of this flag's setting.
Learnt from: junhaoliao
PR: y-scope/clp#596
File: components/log-viewer-webui/client/src/api/query.js:16-23
Timestamp: 2024-11-21T15:51:33.203Z
Learning: In `components/log-viewer-webui/client/src/api/query.js`, the `ExtractJsonResp` type definition is accurate as-is and does not require modification. When suggesting changes to type definitions, ensure they align with the server-side definitions, referencing the source code if necessary.
Learnt from: Bill-hbrhbr
PR: y-scope/clp#868
File: components/clp-package-utils/clp_package_utils/scripts/start_clp.py:869-870
Timestamp: 2025-06-10T05:56:56.572Z
Learning: The team prefers keeping simple conditional logic inline rather than extracting it into helper functions, especially for straightforward operations like string concatenation based on storage engine type.
⏰ 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). (3)
  • GitHub Check: build (macos-latest)
  • GitHub Check: lint-check (ubuntu-latest)
  • GitHub Check: lint-check (macos-latest)
🔇 Additional comments (2)
components/webui/client/src/pages/SearchPage/SearchControls/search-requests.ts (2)

67-67: Bug fix correctly applied - storage engine check updated.

The conditional check has been properly updated from CLP_STORAGE_ENGINES.CLP_S to CLP_STORAGE_ENGINES.CLP, which aligns with the PR objective to fix the incorrect unquoting behavior for the clp storage engine rather than clp-s.


69-71: Well-documented reasoning for query string unquoting.

The added comment clearly explains why query strings need to be unquoted, providing valuable context for future maintainers about user behavior and the necessity of this processing step.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@kirkrodrigues kirkrodrigues requested a review from davemarco July 7, 2025 12:59
@davemarco

Copy link
Copy Markdown
Contributor

it looks okay. i am rebuilding package to test it

@davemarco

davemarco commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

It looks okay in testing

@kirkrodrigues kirkrodrigues merged commit 3779a4c into y-scope:main Jul 7, 2025
7 checks passed
@kirkrodrigues kirkrodrigues deleted the fix-1072 branch July 7, 2025 21:16
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 2026
…storage engine (fixes y-scope#1072). (y-scope#1074)

Co-authored-by: davemarco <83603688+davemarco@users.noreply.github.com>
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