Skip to content

feat(webui): Reorganize clp-s search controls onto two different lines; Remove text from buttons. #1853

Open
davemarco wants to merge 4 commits intoy-scope:mainfrom
davemarco:move_ui
Open

feat(webui): Reorganize clp-s search controls onto two different lines; Remove text from buttons. #1853
davemarco wants to merge 4 commits intoy-scope:mainfrom
davemarco:move_ui

Conversation

@davemarco
Copy link
Contributor

@davemarco davemarco commented Jan 8, 2026

Description

Update clp-s ui per kirks drawing. Did not update the clp ui since there is no dataset selector. Also got rid of text in buttons per drawing.

Screenshot 2026-01-08 at 12 41 06 PM

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

ui looks like drawing

Summary by CodeRabbit

Release Notes

  • Refactors

    • Reorganized search control components for improved code structure and maintainability.
  • Style

    • Updated search and cancel buttons to display icons only, providing a cleaner and more compact interface.

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


@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 8, 2026

Walkthrough

The pull request refactors the NativeControls component from a single file into a modularized directory structure. The original monolithic component is replaced with separate CLP and CLP_S implementations, with conditional rendering logic moved to a new index file. Additionally, button components are updated to render icon-only variants by removing text labels.

Changes

Cohort / File(s) Summary
NativeControls component restructuring
components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls.tsx, components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.tsx, components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpControls.tsx, components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpSControls.tsx
Original monolithic NativeControls file removed and replaced with modularized structure. Conditional storage engine logic extracted into separate ClpControls and ClpSControls components. New index.tsx handles storage engine detection and conditional rendering between the two implementations.
Layout styling
components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.module.css
Three new CSS classes added (.clpSRow, .clpSTimeRange, .clpSQuery) to support CLP_S layout with flexbox positioning and responsive sizing.
Button component refactoring
components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/CancelButton.tsx, components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/SubmitButton/index.tsx
Button components converted to self-closing tags with text labels removed ("Cancel" and "Search"), resulting in icon-only button variants. Event handlers and tooltip wrappers preserved.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the two main changes: reorganizing clp-s search controls onto two lines and removing text from buttons, which align with the file modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ 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

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

@davemarco davemarco requested a review from hoophalab January 8, 2026 18:37
@davemarco davemarco marked this pull request as ready for review January 8, 2026 18:37
@davemarco davemarco requested a review from a team as a code owner January 8, 2026 18:37
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: 1

Caution

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

⚠️ Outside diff range comments (1)
components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/CancelButton.tsx (1)

44-50: Add accessible label for icon-only button.

The button now lacks a text label. For accessibility, add an aria-label attribute to ensure screen readers can identify the button's purpose.

♿ Proposed fix to add aria-label
 <Button
     danger={true}
     htmlType={"button"}
     icon={<CloseOutlined/>}
     size={"middle"}
     type={"primary"}
+    aria-label={"Cancel search"}
     onClick={handleCancelButtonClick}/>
🤖 Fix all issues with AI agents
In
@components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.module.css:
- Around line 1-4: The .clpSRow flex container is missing vertical alignment and
wrap behavior; update the .clpSRow rule to add align-items: center to vertically
center child controls and add flex-wrap: wrap (and optionally adjust gap or
introduce a responsive media query) so the controls don’t overflow on narrow
viewports—verify in mobile/tablet sizes that elements wrap cleanly and remain
accessible.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 19bb18f and ae5cff2.

📒 Files selected for processing (7)
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpControls.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpSControls.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.module.css
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/CancelButton.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/SubmitButton/index.tsx
💤 Files with no reviewable changes (1)
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls.tsx
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}

⚙️ CodeRabbit configuration file

  • Prefer false == <expression> rather than !<expression>.

Files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/CancelButton.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpSControls.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpControls.tsx
  • components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/SubmitButton/index.tsx
🧠 Learnings (1)
📚 Learning: 2025-07-08T17:20:02.560Z
Learnt from: junhaoliao
Repo: y-scope/clp PR: 1078
File: components/webui/server/src/plugins/MongoSocketIoServer/index.ts:105-108
Timestamp: 2025-07-08T17:20:02.560Z
Learning: The y-scope/clp codebase has a 100-character line length limit that takes precedence over other style preferences like template literals when they conflict.

Applied to files:

  • components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.module.css
🧬 Code graph analysis (1)
components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.tsx (2)
components/webui/common/src/config.ts (1)
  • CLP_STORAGE_ENGINES (54-54)
components/webui/client/src/config/index.ts (1)
  • SETTINGS_STORAGE_ENGINE (24-24)
⏰ 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). (4)
  • GitHub Check: package-image
  • GitHub Check: check-generated
  • GitHub Check: lint-check (macos-15)
  • GitHub Check: lint-check (ubuntu-24.04)
🔇 Additional comments (6)
components/webui/client/src/pages/SearchPage/SearchControls/Native/SearchButton/SubmitButton/index.tsx (1)

126-139: LGTM! Icon-only button with proper accessibility.

The button text removal is correct, and accessibility is maintained through the wrapping Tooltip component that provides context-sensitive messages.

components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpSControls.tsx (1)

1-28: LGTM! Clean two-row layout for CLP-S controls.

The component structure is well-organized and correctly implements the two-row layout as described in the PR objectives.

components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/ClpControls.tsx (1)

1-18: LGTM! Clean single-row layout for CLP controls.

The component structure is well-organized and correctly implements the single-row layout for CLP controls.

components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.tsx (1)

1-30: LGTM! Correct conditional rendering logic.

The component cleanly separates CLP and CLP-S control layouts with straightforward runtime selection logic.

components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.module.css (2)

6-8: LGTM!

Using margin-left: auto to push the time range control to the right is a standard flex layout pattern and works well for the intended layout.


10-13: LGTM!

The combination of flex: 1 and min-width: 0 is correct for a flexible search input. The min-width: 0 override is particularly important as it allows the flex item to shrink below its content size, preventing overflow issues and enabling proper text truncation or scrolling behaviour.

Comment on lines +1 to +4
.clpSRow {
display: flex;
gap: 10px;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider adding vertical alignment.

The .clpSRow flex container lacks align-items, which may cause inconsistent vertical alignment if child elements (search input, buttons, selectors) have different heights. Consider adding align-items: center; for consistent vertical centering.

Additionally, since flex-wrap defaults to nowrap, the controls might overflow horizontally on narrow screens.

♻️ Proposed enhancement
 .clpSRow {
     display: flex;
     gap: 10px;
+    align-items: center;
 }

Please verify the layout behaviour on small screens (mobile/tablet viewports) to ensure controls remain accessible and don't overflow.

🤖 Prompt for AI Agents
In
@components/webui/client/src/pages/SearchPage/SearchControls/Native/NativeControls/index.module.css
around lines 1 - 4, The .clpSRow flex container is missing vertical alignment
and wrap behavior; update the .clpSRow rule to add align-items: center to
vertically center child controls and add flex-wrap: wrap (and optionally adjust
gap or introduce a responsive media query) so the controls don’t overflow on
narrow viewports—verify in mobile/tablet sizes that elements wrap cleanly and
remain accessible.

Copy link
Contributor

@hoophalab hoophalab left a comment

Choose a reason for hiding this comment

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

One minor ui issue in clp mode. The cancel button width is changed after submitting the query.
sized

Maybe we should fix the width of the run/cancel button?

@junhaoliao junhaoliao modified the milestones: Backlog, February 2026 Jan 19, 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.

3 participants