Skip to content

feat(webui): Remove timeline for Presto queries. #1251

Merged
davemarco merged 2 commits into
y-scope:mainfrom
davemarco:rmTimeline
Aug 25, 2025
Merged

feat(webui): Remove timeline for Presto queries. #1251
davemarco merged 2 commits into
y-scope:mainfrom
davemarco:rmTimeline

Conversation

@davemarco

@davemarco davemarco commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Description

Removes the timeline since not yet supported for presto. Timeline support will be added in phase II of presto webui.

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

Timeline does not render

Summary by CodeRabbit

  • Bug Fixes
    • The Search Results Timeline now appears only when the configured query engine supports it; users on PRESTO will no longer see the timeline.
    • All other Search page elements remain unchanged: Search Controls, Query Status, Results Table, and progress indicators.
    • No impact on existing search workflows, filters, sorting, or performance.

@coderabbitai

coderabbitai Bot commented Aug 22, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

SearchPage now conditionally renders SearchResultsTimeline only when SETTINGS\_QUERY\_ENGINE is not PRESTO. All other components and behaviours on the page remain unchanged.

Changes

Cohort / File(s) Summary
Search page conditional timeline
components/webui/client/src/pages/SearchPage/index.tsx
Wrapped SearchResultsTimeline render in a condition: render only if SETTINGS_QUERY_ENGINE !== PRESTO. No other logic changes.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant U as User
    participant SP as SearchPage
    participant CFG as Settings
    participant C as SearchControls
    participant S as SearchQueryStatus
    participant T as SearchResultsTable
    participant TL as SearchResultsTimeline

    U->>SP: Open/Search
    SP->>CFG: Read SETTINGS_QUERY_ENGINE
    CFG-->>SP: engine value

    rect rgba(220,235,255,0.5)
    note right of SP: Conditional render
    alt engine != PRESTO
        SP->>TL: Render Timeline
    else engine == PRESTO
        SP-->>TL: Skip Timeline
    end
    end

    SP->>C: Render Controls
    SP->>S: Render Status
    SP->>T: Render Results Table
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • junhaoliao
  • hoophalab
  • kirkrodrigues

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • 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.
  • 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 the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

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

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

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

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • 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.

@davemarco davemarco marked this pull request as ready for review August 22, 2025 13:29
@davemarco davemarco requested a review from a team as a code owner August 22, 2025 13:29
@davemarco davemarco requested a review from hoophalab August 22, 2025 13:29

@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

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/index.tsx (1)

24-31: Reduce duplication by deriving isPresto once

You’re checking the engine in two places (progress bar and timeline). Deriving a single boolean improves readability and future edits.

Example:

const isPresto = SETTINGS_QUERY_ENGINE === CLP_QUERY_ENGINES.PRESTO;

// ...
{isPresto && <ProgressBar/>}
{false == isPresto && <SearchResultsTimeline/>} // follows the project’s guideline on negation style
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7aa8684 and 94d98ab.

📒 Files selected for processing (1)
  • components/webui/client/src/pages/SearchPage/index.tsx (1 hunks)
🧰 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/index.tsx
🔇 Additional comments (2)
components/webui/client/src/pages/SearchPage/index.tsx (2)

30-30: Timeline correctly gated off for Presto — aligns with PR objective

Conditionally rendering the timeline only when the engine is not PRESTO matches the PR’s intent. Looks good.


30-31: No module-level side effects detected in SearchResultsTimeline

I’ve inspected components/webui/client/src/pages/SearchPage/SearchResults/SearchResultsTimeline/index.tsx and confirmed there are no import-time side effects:

  • No network calls (fetch, axios, XMLHttpRequest) at the module top level
  • No subscriptions or event listeners (WebSocket, addEventListener) executed on import
  • No immediate-execution blocks (IIFEs) outside of React hooks/components

The conditional render in index.tsx is sufficient; the module itself is side-effect-free.

Comment on lines +30 to 31
{SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO && <SearchResultsTimeline/>}
<SearchResultsTable/>

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.

🧹 Nitpick (assertive)

Code‑split Timeline to avoid shipping unused code and import‑time side effects

Because SearchResultsTimeline is still imported at the top level, its code is bundled and any module‑level side effects (if any) would still run in PRESTO builds. Consider lazy‑loading the component and wrapping it in Suspense, which also reduces the PRESTO bundle.

Apply this diff within the selected range:

-{SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO && <SearchResultsTimeline/>}
+{SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO && (
+  <Suspense fallback={null}>
+    <SearchResultsTimeline/>
+  </Suspense>
+)}

Then, elsewhere in this file:

  • Remove the static import on Line 10.
  • Add:
import {lazy, Suspense} from "react";
const SearchResultsTimeline = lazy(() => import("./SearchResults/SearchResultsTimeline"));
🤖 Prompt for AI Agents
In components/webui/client/src/pages/SearchPage/index.tsx around lines 30-31,
the SearchResultsTimeline is currently statically imported and rendered which
ships its code and possible module side-effects into PRESTO builds; remove the
static import at line 10 and instead import lazy and Suspense from react and
declare SearchResultsTimeline via lazy(() =>
import("./SearchResults/SearchResultsTimeline")); then replace the JSX at lines
30-31 so the timeline is only rendered when SETTINGS_QUERY_ENGINE !==
CLP_QUERY_ENGINES.PRESTO and wrapped in <Suspense fallback={null}> (or another
minimal fallback) to ensure the component is code-split and only loaded when
needed.

@hoophalab hoophalab 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.

Looks good. The timeline is gone in Presto.

@kirkrodrigues kirkrodrigues changed the title feat(webui): Remove timeline for presto queries. feat(webui): Remove timeline for Presto queries. Aug 25, 2025

@kirkrodrigues kirkrodrigues 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.

Deferring to @hoophalab's review.

@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 (2)
components/webui/client/src/pages/SearchPage/index.tsx (2)

30-30: Add a TODO referencing “Phase II” to clarify intent and revisit timing

This helps future contributors understand why the timeline is gated and when to re-enable it.

Apply this diff in place:

-                {SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO && <SearchResultsTimeline/>}
+                // TODO(Phase II - Presto UI): Enable timeline for PRESTO once supported.
+                {SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO && <SearchResultsTimeline/>}

30-30: Code‑split Timeline to avoid bundling unused code and import-time side effects

The static import at Line 10 ships timeline code (and any module-level side effects) even when PRESTO hides it. Lazy-load to keep PRESTO bundles lean and defer work.

Within this line range, wrap the conditional render with Suspense:

-                {SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO && <SearchResultsTimeline/>}
+                {false == (SETTINGS_QUERY_ENGINE === CLP_QUERY_ENGINES.PRESTO) && (
+                    <Suspense fallback={null}>
+                        <SearchResultsTimeline/>
+                    </Suspense>
+                )}

And elsewhere in this file (imports section), replace the static import with a lazy one:

-import SearchResultsTimeline from "./SearchResults/SearchResultsTimeline";
+import {lazy, Suspense} from "react";
+const SearchResultsTimeline = lazy(() => import("./SearchResults/SearchResultsTimeline"));
📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 94d98ab and 2bedc8c.

📒 Files selected for processing (1)
  • components/webui/client/src/pages/SearchPage/index.tsx (1 hunks)
🧰 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/index.tsx
🧬 Code graph analysis (1)
components/webui/client/src/pages/SearchPage/index.tsx (1)
components/webui/client/src/config/index.ts (1)
  • SETTINGS_QUERY_ENGINE (26-26)
⏰ 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 (macos-15)
🔇 Additional comments (1)
components/webui/client/src/pages/SearchPage/index.tsx (1)

30-30: Timeline correctly gated for PRESTO — aligns with the PR objective

Rendering the timeline only when the engine is not PRESTO meets the stated goal to remove timeline for Presto queries.

<SearchQueryStatus/>
</div>
<SearchResultsTimeline/>
{SETTINGS_QUERY_ENGINE !== CLP_QUERY_ENGINES.PRESTO && <SearchResultsTimeline/>}

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.

🧹 Nitpick (assertive)

Add a focused test to lock in the PRESTO gating behaviour

A small test guards against regressions: timeline not rendered for PRESTO; rendered otherwise.

Example (React Testing Library):

import {render, screen} from "@testing-library/react";
import * as config from "../../config";
import SearchPage from "./index";

test("does not render timeline for PRESTO", () => {
  jest.spyOn(config, "SETTINGS_QUERY_ENGINE", "get").mockReturnValue(config.CLP_QUERY_ENGINES.PRESTO);
  render(<SearchPage/>);
  expect(screen.queryByTestId("search-results-timeline")).toBeNull();
});

test("renders timeline for non-PRESTO", () => {
  jest.spyOn(config, "SETTINGS_QUERY_ENGINE", "get").mockReturnValue(config.CLP_QUERY_ENGINES.CLP); // or another engine
  render(<SearchPage/>);
  expect(screen.getByTestId("search-results-timeline")).toBeInTheDocument();
});

Note: Add data-testid="search-results-timeline" to the root element of SearchResultsTimeline if not already present.

🤖 Prompt for AI Agents
In components/webui/client/src/pages/SearchPage/index.tsx around line 30, the
conditional rendering for PRESTO needs a focused test and the Timeline component
should expose a test id; add data-testid="search-results-timeline" to the root
element of SearchResultsTimeline, then add two React Testing Library tests: one
that mocks config.SETTINGS_QUERY_ENGINE getter to return
CLP_QUERY_ENGINES.PRESTO and asserts the timeline is not rendered (queryByTestId
returns null), and another that mocks it to a non-PRESTO engine and asserts the
timeline is rendered (getByTestId finds it).

@davemarco davemarco merged commit 9a20264 into y-scope:main Aug 25, 2025
8 checks passed
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