Skip to content

refactor(new-webui): Remove redundant StatCard and DetailsCard. - #1088

Merged
hoophalab merged 4 commits into
y-scope:mainfrom
hoophalab:card-refactor
Jul 10, 2025
Merged

refactor(new-webui): Remove redundant StatCard and DetailsCard.#1088
hoophalab merged 4 commits into
y-scope:mainfrom
hoophalab:card-refactor

Conversation

@hoophalab

@hoophalab hoophalab commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

Description

As the name suggests, this PR replaces the inheritance style dependency of Files -> DetailsCard -> StatCard -> DashboardCard with dependency injection.

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

  1. Run clp-text:

    1. Compressed hive-24h i-00c90a0f/
    2. The loading cards look same as before
    3. The loaded cards look same as before
  2. Run clp-json:

    1. Compressed spark-event-logs and postgresql logs across several databases
    2. The loading cards look same as before
    3. The loaded cards look same as before

Potential improvements
The height of cards change after the first reloading. I'll create an issue on this and submit another PR.

Summary by CodeRabbit

  • New Features

    • Introduced a new Stat component for displaying styled statistical values within dashboard cards.
  • Refactor

    • Replaced DetailsCard and StatCard components with a combination of DashboardCard and the new Stat component across various dashboard sections.
    • Updated Files, Messages, TimeRange, CompressedSize, UncompressedSize, and SpaceSavings components to use the new Stat structure for displaying statistics.
    • Simplified the Jobs component by removing unnecessary props and class handling.
    • Adjusted IngestPage layout by wrapping Jobs component with a styled container div.
  • Chores

    • Removed unused DetailsCard and StatCard components to streamline the codebase.
    • Renamed CSS class from .jobs to .jobsGrid for clarity.

@hoophalab
hoophalab requested a review from a team as a code owner July 9, 2025 17:16
@coderabbitai

coderabbitai Bot commented Jul 9, 2025

Copy link
Copy Markdown
Contributor
## Walkthrough

This change removes the `StatCard` and `DetailsCard` components, introduces a new `Stat` component, and refactors several IngestPage detail components to use `DashboardCard` with the new `Stat` for displaying statistics. The `Jobs` component interface is simplified, and related component structures are updated accordingly.

## Changes

| File(s)                                                                                     | Change Summary                                                                                                                           |
|---------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------|
| `components/webui/client/src/components/Stat/index.tsx`                                     | Added new `Stat` React component for styled statistic display.                                                                           |
| `components/webui/client/src/components/StatCard/index.tsx`                                 | Deleted `StatCard` component.                                                                                                            |
| `components/webui/client/src/pages/IngestPage/Details/DetailsCard.tsx`                      | Deleted `DetailsCard` component.                                                                                                         |
| `components/webui/client/src/pages/IngestPage/Details/Files.tsx`<br>`.../Messages.tsx`<br>`.../TimeRange.tsx` | Refactored to replace `DetailsCard` usage with `DashboardCard` and nested new `Stat` component for statistic display.                   |
| `components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx`<br>`.../UncompressedSize.tsx`<br>`.../index.tsx` | Refactored to use `DashboardCard` and nested `Stat` component instead of `DetailsCard` or `StatCard`.                                   |
| `components/webui/client/src/pages/IngestPage/Jobs/index.tsx`                              | Simplified: removed `className` prop and interface; passed loading state to `DashboardCard` instead of `VirtualTable`.                  |
| `components/webui/client/src/pages/IngestPage/index.tsx`                                   | Updated to wrap `Jobs` in a `div` for className styling instead of passing className as a prop.                                         |
| `components/webui/client/src/pages/IngestPage/index.module.css`                            | Renamed CSS class selector `.jobs` to `.jobsGrid`.                                                                                       |

## Sequence Diagram(s)

```mermaid
sequenceDiagram
    participant ParentComponent
    participant DashboardCard
    participant Stat

    ParentComponent->>DashboardCard: Render with title, isLoading
    DashboardCard->>Stat: Render statistic as child
    Stat-->>DashboardCard: Styled statistic display
    DashboardCard-->>ParentComponent: Rendered card with statistic

Possibly related PRs

  • y-scope/clp#910: Integrates database queries and dynamic data fetching into IngestPage components previously using DetailsCard; related as both PRs modify IngestPage detail components.
  • y-scope/clp#830: Introduced the original DetailsCard and related components now removed or refactored in this PR; directly connected through component evolution.

Suggested reviewers

  • junhaoliao

<!-- walkthrough_end -->
<!-- internal state start -->


<!-- DwQgtGAEAqAWCWBnSTIEMB26CuAXA9mAOYCmGJATmriQCaQDG+Ats2bg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+3FfpJy0lfI6fFAeQI43uaIi40edtawQaxicaxoHKZEBoAwHFma0E8Sfho9fouE7a5E5ADm3m5VQbJEEkHwDwlW9+YxsgILPtJg3hzW3WymlcAg5gAYpiHwEo8yz5n4OPEKh7ltrQDmeyI4CWI7JQCW9e9sH0H9vs82Jvq+KeBQE/My5BaEFDNxxsUIxFTcWI2K7Fey4cTI8AVHZ+zDuh/m1YVhwaK2MRxeO9BoPh97oAEmEtQ5n5H9YZCk4WrAHTBeuu17BF5YHEHE80HAChdhgyUakh8Fhgc2klrWNAUECwUiHTWVkigMUagcUjkiUzkBkewuAAA+vWIgOl/4JyItHQOl+hJ3AlP5yl98ApiQCQAAJzhw/AADMJAAArAAOxKA1e0AABsHXzXDA4cHXvwdX3XVXOQHXHwtAnwzXnwdXEoyXgXdXAATN12gN8FV3VwwPN2gJ8E1/11V7twIHEHVy1wN5VwwA1819V3VwIAwNKYSCpAFxAKl+oJl7QNl7l0VNkLQOlxpPoEAA=== -->

<!-- internal state end -->
<!-- finishing_touch_checkbox_start -->

<details open="true">
<summary>✨ Finishing Touches</summary>

- [ ] <!-- {"checkboxId": "7962f53c-55bc-4827-bfbf-6a18da830691"} --> 📝 Generate Docstrings

</details>

<!-- finishing_touch_checkbox_end -->
<!-- tips_start -->

---

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.

<details>
<summary>❤️ Share</summary>

- [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai)
- [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai)
- [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai)
- [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)

</details>

<details>
<summary>🪧 Tips</summary>

### Chat

There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai?utm_source=oss&utm_medium=github&utm_campaign=y-scope/clp&utm_content=1088):

- 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](https://www.coderabbit.ai/contact-us/support) 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](https://docs.coderabbit.ai/finishing-touches/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](https://docs.coderabbit.ai/guides/configure-coderabbit) 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](https://docs.coderabbit.ai) for detailed information on how to use CodeRabbit.
- Join our [Discord Community](http://discord.gg/coderabbit) to get help, request features, and share feedback.
- Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.

</details>

<!-- tips_end -->

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 6815890 and 0ccee94.

📒 Files selected for processing (11)
  • components/webui/client/src/components/Stat/index.tsx (1 hunks)
  • components/webui/client/src/components/StatCard/index.tsx (0 hunks)
  • components/webui/client/src/pages/IngestPage/Details/DetailsCard.tsx (0 hunks)
  • components/webui/client/src/pages/IngestPage/Details/Files.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/Details/Messages.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/Jobs/index.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/index.tsx (1 hunks)
💤 Files with no reviewable changes (2)
  • components/webui/client/src/components/StatCard/index.tsx
  • components/webui/client/src/pages/IngestPage/Details/DetailsCard.tsx
🧰 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/IngestPage/index.tsx
  • components/webui/client/src/pages/IngestPage/Details/Files.tsx
  • components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx
  • components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx
  • components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx
  • components/webui/client/src/pages/IngestPage/Details/Messages.tsx
  • components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx
  • components/webui/client/src/components/Stat/index.tsx
  • components/webui/client/src/pages/IngestPage/Jobs/index.tsx
🧠 Learnings (8)
components/webui/client/src/pages/IngestPage/index.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/pages/IngestPage/Details/Files.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx (2)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
Learnt from: davemarco
PR: y-scope/clp#797
File: components/log-viewer-webui/client/src/components/Layout/MainLayout.tsx:2-5
Timestamp: 2025-04-08T22:32:05.366Z
Learning: In this codebase using React Router v7.4.1, components should be imported directly from "react-router" (e.g., `import { Link, Outlet } from "react-router";`) rather than from "react-router-dom" as was common in previous versions of React Router.
components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/pages/IngestPage/Details/Messages.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx (2)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
Learnt from: davemarco
PR: y-scope/clp#797
File: components/log-viewer-webui/client/src/components/Layout/MainLayout.tsx:2-5
Timestamp: 2025-04-08T22:32:05.366Z
Learning: In this codebase using React Router v7.4.1, components should be imported directly from "react-router" (e.g., `import { Link, Outlet } from "react-router";`) rather than from "react-router-dom" as was common in previous versions of React Router.
components/webui/client/src/components/Stat/index.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/pages/IngestPage/Jobs/index.tsx (2)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
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.
⏰ 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). (1)
  • GitHub Check: lint-check (ubuntu-latest)
🔇 Additional comments (11)
components/webui/client/src/pages/IngestPage/index.tsx (1)

17-19: Clean refactoring of Jobs component usage.

The wrapping of the Jobs component in a div with className is a good approach that aligns with the simplified Jobs interface. This maintains the styling while removing the className prop dependency.

components/webui/client/src/pages/IngestPage/Details/Files.tsx (1)

22-29: Excellent refactoring to dependency injection pattern.

The component correctly migrates from DetailsCard to DashboardCard with Stat as a child component. The logic for handling numFiles is preserved, and the new structure aligns with the architectural improvements.

components/webui/client/src/pages/IngestPage/Details/Messages.tsx (1)

22-29: Consistent refactoring implementation.

The Messages component follows the same excellent pattern as Files, correctly migrating from DetailsCard to DashboardCard with Stat as a child. The numMessages handling logic is properly preserved.

components/webui/client/src/pages/IngestPage/Jobs/index.tsx (1)

38-48: Well-executed interface simplification.

The Jobs component refactoring successfully removes the className prop dependency while maintaining all functionality. Moving the loading state to DashboardCard and applying className directly to VirtualTable is a clean architectural improvement.

components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx (1)

21-28: Consistent architectural improvement.

The CompressedSize component correctly implements the same dependency injection pattern as other components, migrating from DetailsCard to DashboardCard with Stat as a child. The size formatting logic is properly preserved.

components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx (2)

1-2: LGTM: Clean refactoring to dependency injection pattern.

The import changes correctly replace the old DetailsCard with DashboardCard and the new Stat component, aligning with the dependency injection refactoring goals.


21-28: LGTM: Proper implementation of new component structure.

The refactoring correctly uses DashboardCard as the container and Stat as the child component for displaying the formatted size, maintaining the same functionality while improving the architecture.

components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx (2)

3-4: LGTM: Consistent refactoring implementation.

The imports correctly align with the new dependency injection pattern, replacing DetailsCard with DashboardCard and introducing the Stat component.


33-40: LGTM: Proper component structure with preserved logic.

The component correctly uses DashboardCard as the container and Stat for displaying the time range, while maintaining the existing logic for calculating the stat value.

components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx (1)

62-74: LGTM: Effective refactoring with proper styling.

The component correctly implements the new dependency injection pattern by using DashboardCard as the container and Stat with explicit styling for the percentage display. The backgroundColor and titleColor props maintain the visual design while the nested Stat provides the statistic content.

components/webui/client/src/components/Stat/index.tsx (1)

24-31: LGTM: Well-designed component with proper defaults.

The component provides a clean API with sensible defaults using theme tokens. The implementation correctly uses Ant Design's Typography.Text and provides flexibility for customization while maintaining consistency.

Comment thread components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx Outdated
Comment thread components/webui/client/src/components/Stat/index.tsx Outdated
@hoophalab
hoophalab marked this pull request as draft July 9, 2025 17:34
@hoophalab hoophalab changed the title refactor: Replace with StatCard and DetailsCard with dependency injection. refactor(new-webui): Replace with StatCard and DetailsCard with dependency injection. Jul 9, 2025

@davemarco davemarco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

see comments

Comment thread components/webui/client/src/components/Stat/index.tsx Outdated
* A text component for displaying statistical values in `DashboardCard`.
*
* @param props
* @param props.children

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this take children or explicit stat string?

Comment thread components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think junhao wanted me to change this by passing class Name, but I think this is also good with the grid setting explicit on the outside. i am good with this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I see... thanks for the context. This makes sense. I made the change because the other grids are explicitly set on the outside. We should check with Junhao later about whether all cards should have a className. He needs this for cloud as well.

Comment thread components/webui/client/src/components/Stat/index.tsx Outdated
@hoophalab
hoophalab marked this pull request as ready for review July 9, 2025 19:55

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
components/webui/client/src/components/Stat/index.tsx (1)

9-13: Rename interface to match component name.

The interface name StatProps should be used instead of StatCardProps to match the component name Stat and avoid confusion.

-interface StatProps {
+interface StatProps {

Wait, I see the interface is already named StatProps in the current code. This appears to have been addressed from the previous review.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0ccee94 and 3267a09.

📒 Files selected for processing (9)
  • components/webui/client/src/components/Stat/index.tsx (1 hunks)
  • components/webui/client/src/pages/IngestPage/Details/Files.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/Details/Messages.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx (2 hunks)
  • components/webui/client/src/pages/IngestPage/index.module.css (1 hunks)
  • components/webui/client/src/pages/IngestPage/index.tsx (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/IngestPage/Details/Files.tsx
  • components/webui/client/src/pages/IngestPage/index.tsx
  • components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx
  • components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx
  • components/webui/client/src/pages/IngestPage/Details/Messages.tsx
  • components/webui/client/src/components/Stat/index.tsx
  • components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx
  • components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx
🧠 Learnings (7)
components/webui/client/src/pages/IngestPage/Details/Files.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/pages/IngestPage/index.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx (6)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
Learnt from: davemarco
PR: y-scope/clp#797
File: components/log-viewer-webui/client/src/components/Layout/MainLayout.tsx:2-5
Timestamp: 2025-04-08T22:32:05.366Z
Learning: In this codebase using React Router v7.4.1, components should be imported directly from "react-router" (e.g., `import { Link, Outlet } from "react-router";`) rather than from "react-router-dom" as was common in previous versions of React Router.
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: gibber9809
PR: y-scope/clp#504
File: components/core/src/clp_s/search/kql/CMakeLists.txt:29-29
Timestamp: 2024-10-22T15:36:04.655Z
Learning: When reviewing pull requests, focus on the changes within the PR and avoid commenting on issues outside the scope of the PR.
Learnt from: haiqi96
PR: y-scope/clp#523
File: components/core/src/clp/clp/FileCompressor.hpp:58-78
Timestamp: 2024-10-24T14:25:17.978Z
Learning: When reviewing legacy code refactors, avoid suggesting changes that would extend the scope of the PR.
Learnt from: junhaoliao
PR: y-scope/clp#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.
components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx (2)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
Learnt from: davemarco
PR: y-scope/clp#797
File: components/log-viewer-webui/client/src/components/Layout/MainLayout.tsx:2-5
Timestamp: 2025-04-08T22:32:05.366Z
Learning: In this codebase using React Router v7.4.1, components should be imported directly from "react-router" (e.g., `import { Link, Outlet } from "react-router";`) rather than from "react-router-dom" as was common in previous versions of React Router.
components/webui/client/src/pages/IngestPage/Details/Messages.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
components/webui/client/src/components/Stat/index.tsx (2)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
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.
components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx (1)
Learnt from: junhaoliao
PR: y-scope/clp#937
File: components/log-viewer-webui/client/src/AntdApp.tsx:16-24
Timestamp: 2025-05-29T20:33:40.653Z
Learning: In components/log-viewer-webui React codebase: Return type annotations (like `: JSX.Element`) are unnecessary and not preferred for React components in JSX/TSX files.
🔇 Additional comments (12)
components/webui/client/src/pages/IngestPage/index.module.css (1)

10-12: LGTM! Clear and consistent naming change.

The class rename from .jobs to .jobsGrid better reflects its purpose as a grid container and aligns with the structural changes in the parent component.

components/webui/client/src/components/Stat/index.tsx (1)

24-31: LGTM! Well-implemented component with proper styling.

The component correctly uses Ant Design's theme tokens for consistent styling and provides sensible defaults for color and fontSize.

components/webui/client/src/pages/IngestPage/Details/Files.tsx (1)

22-28: Excellent refactoring to dependency injection pattern.

The change from inheritance-based DetailsCard to composition using DashboardCard with Stat child component successfully implements the dependency injection approach while maintaining the same functionality.

components/webui/client/src/pages/IngestPage/Details/Messages.tsx (1)

22-28: Consistent refactoring pattern applied correctly.

The component successfully follows the same dependency injection pattern as other detail components, replacing inheritance with composition using DashboardCard and Stat.

components/webui/client/src/pages/IngestPage/Details/TimeRange.tsx (2)

3-4: Import statements updated correctly for dependency injection pattern.

The imports have been properly updated to use DashboardCard and the new Stat component, aligning with the refactor from inheritance to dependency injection.


33-39: Component structure successfully refactored to use composition.

The component now properly uses DashboardCard as the container with Stat as the child component for displaying the formatted time range. This maintains the same functionality while following the new dependency injection pattern.

components/webui/client/src/pages/IngestPage/SpaceSavings/CompressedSize.tsx (2)

1-2: Import statements correctly updated for the refactor.

The imports follow the same pattern as other refactored components, replacing DetailsCard with DashboardCard and adding the new Stat component.


21-27: Component structure consistently refactored.

The component correctly uses the new composition pattern with DashboardCard containing a Stat component that displays the formatted compressed size. The formatSizeInBytes function integration is preserved.

components/webui/client/src/pages/IngestPage/SpaceSavings/UncompressedSize.tsx (2)

1-2: Import statements properly updated.

The imports are consistent with the refactor pattern, replacing DetailsCard with DashboardCard and adding the Stat component.


21-27: Component structure successfully refactored.

The component correctly implements the new composition pattern, with DashboardCard containing a Stat component that displays the formatted uncompressed size. The functionality is preserved.

components/webui/client/src/pages/IngestPage/SpaceSavings/index.tsx (2)

4-5: Import statements correctly updated.

The imports have been properly updated to use DashboardCard and Stat components, and the import paths are correct with no extra slashes.


62-72: Component structure successfully refactored with proper styling distribution.

The component correctly replaces StatCard with the composition of DashboardCard and Stat. The styling props are appropriately distributed - backgroundColor and titleColor to DashboardCard, while color and fontSize are passed to the Stat component. This maintains the same visual appearance while following the dependency injection pattern.

Comment thread components/webui/client/src/pages/IngestPage/index.tsx
@hoophalab hoophalab changed the title refactor(new-webui): Replace with StatCard and DetailsCard with dependency injection. refactor(new-webui): Pass DashboardCard's content via children on IngestPage. Jul 9, 2025
@hoophalab

hoophalab commented Jul 9, 2025

Copy link
Copy Markdown
Contributor Author

@davemarco ready for another review on this. I also tried ai for the PR title -- any better suggestions?

@davemarco davemarco left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

title:
refactor(webui): Remove redundant StatCard and DetailsCard.

@hoophalab hoophalab changed the title refactor(new-webui): Pass DashboardCard's content via children on IngestPage. refactor(new-webui): Remove redundant StatCard and DetailsCard. Jul 9, 2025

@junhaoliao junhaoliao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(i appreciate this refactoring as it leads us towards making the dashboard customizable)

deferring to @davemarco 's review for approval

@hoophalab
hoophalab merged commit 08c6e8f into y-scope:main Jul 10, 2025
@hoophalab
hoophalab deleted the card-refactor branch August 5, 2025 20:32
junhaoliao pushed a commit to junhaoliao/clp that referenced this pull request May 17, 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