Skip to content

Clear research page#387

Merged
jerry609 merged 5 commits into
jerry609:devfrom
Linjie-top:clear/research
Mar 13, 2026
Merged

Clear research page#387
jerry609 merged 5 commits into
jerry609:devfrom
Linjie-top:clear/research

Conversation

@Linjie-top

@Linjie-top Linjie-top commented Mar 13, 2026

Copy link
Copy Markdown
Collaborator

tag and delete the component below the search box

Summary by CodeRabbit

  • Refactor

    • Removed the Track Snapshot panel from the research page UI.
  • Tests

    • Deleted unit tests for the removed panel.
    • Added an end-to-end test to confirm the Track Snapshot is no longer shown and that post-search summary indicators render.

@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e08b7147-5c2e-452c-9763-aafba5f2f02a

📥 Commits

Reviewing files that changed from the base of the PR and between 5a1b01e and 808ac57.

📒 Files selected for processing (1)
  • web/e2e/research.spec.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/e2e/research.spec.ts

📝 Walkthrough

Walkthrough

Removed the ResearchTrackContextPanel component and its test file, eliminated the conditional rendering of that panel from ResearchPageNew, and added an e2e test to assert the post-search view no longer shows the "Track Snapshot" label.

Changes

Cohort / File(s) Summary
Component deleted
web/src/components/research/ResearchTrackContextPanel.tsx
Removed the entire Track Snapshot panel implementation, its helper functions, interfaces, and exports.
Tests deleted
web/src/components/research/ResearchTrackContextPanel.test.tsx
Deleted unit tests that validated stat item construction and snapshot rendering.
Usage removed
web/src/components/research/ResearchPageNew.tsx
Removed conditional rendering of ResearchTrackContextPanel (replaced with a comment).
E2E test added
web/e2e/research.spec.ts
Added an end-to-end test that navigates to post-search view, asserts "Track Snapshot" is absent, and checks for post-search summary indicators ("Results:", "Mode:", "Sources:").

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through lines of code today,

A panel packed its things away,
Tests and snapshot took a skip,
The search view now has a lighter zip,
I nibbled bytes and bounded on my way.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'Clear research page' is vague and generic, using non-descriptive language that doesn't convey the specific change (removal of ResearchTrackContextPanel component). Use a more descriptive title like 'Remove ResearchTrackContextPanel component from research page' to clearly communicate the main change.
✅ Passed checks (1 passed)
Check name Status Explanation
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the research page by eliminating a specific UI component. The change focuses on decluttering the interface and removing functionality that is no longer desired, resulting in a cleaner and more focused user experience on the research page.

Highlights

  • Component Removal: The ResearchTrackContextPanel component has been entirely removed from the ResearchPageNew component, including its import and rendering logic.
  • UI Simplification: The research page UI has been simplified by removing the section previously occupied by the ResearchTrackContextPanel, which was located below the search box.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • web/src/components/research/ResearchPageNew.tsx
    • Removed the import statement for ResearchTrackContextPanel.
    • Deleted the JSX code responsible for rendering the ResearchTrackContextPanel and its conditional logic.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request successfully removes the ResearchTrackContextPanel from the research page as intended. However, the component file web/src/components/research/ResearchTrackContextPanel.tsx and its corresponding test file web/src/components/research/ResearchTrackContextPanel.test.tsx are now unused and should be deleted to maintain a clean codebase. This would complete the removal of the component.

Comment thread web/src/components/research/ResearchPageNew.tsx
@Linjie-top
Linjie-top marked this pull request as ready for review March 13, 2026 13:27
@Linjie-top
Linjie-top requested a review from jerry609 as a code owner March 13, 2026 13:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/src/components/research/ResearchPageNew.tsx`:
- Line 640: The removed post-search panel behavior around ResearchPageNew
(comment at line ~640) no longer has coverage; add/update tests for the
ResearchPageNew component to assert the post-search panel is absent and that the
remaining post-search UI still renders correctly — e.g., render
<ResearchPageNew/> with a mock search result, assert that the removed panel's
selector/text is not present, and assert expected elements (search results list,
filters, and any "no results" or summary components) are present; update or
create the corresponding test case in the ResearchPageNew test suite (look for
existing tests referencing ResearchPageNew or the previous post-search panel
name) and use the component's public props/mocks to reproduce post-search state.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 29da389b-77d3-4f3d-918b-1099908ec568

📥 Commits

Reviewing files that changed from the base of the PR and between c5a7646 and 3b4db94.

📒 Files selected for processing (4)
  • web/.npm-cache/_update-notifier-last-checked
  • web/src/components/research/ResearchPageNew.tsx
  • web/src/components/research/ResearchTrackContextPanel.test.tsx
  • web/src/components/research/ResearchTrackContextPanel.tsx
💤 Files with no reviewable changes (2)
  • web/src/components/research/ResearchTrackContextPanel.test.tsx
  • web/src/components/research/ResearchTrackContextPanel.tsx

Comment thread web/src/components/research/ResearchPageNew.tsx

@jerry609 jerry609 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

the review content of coderabbit makes sense

@coderabbitai

coderabbitai Bot commented Mar 13, 2026

Copy link
Copy Markdown

No open human review comments were found in this PR to create a plan for.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Removes the “Track Snapshot” (track context) panel from the Research page UI to “clear” the area below the search box, and updates tests accordingly.

Changes:

  • Deleted ResearchTrackContextPanel and its unit test.
  • Removed the panel render from ResearchPageNew.
  • Added/updated Playwright E2E coverage to assert the panel no longer appears post-search.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
web/src/components/research/ResearchTrackContextPanel.tsx Deleted the Track Snapshot panel component.
web/src/components/research/ResearchTrackContextPanel.test.tsx Removed unit tests tied to the deleted panel.
web/src/components/research/ResearchPageNew.tsx Removed usage/import of the panel below the search box.
web/e2e/research.spec.ts Added E2E assertion that “Track Snapshot” isn’t rendered post-search.
web/.npm-cache/_update-notifier-last-checked A cache artifact appears to have been committed (should be removed/ignored).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@web/e2e/research.spec.ts`:
- Around line 34-43: The test races the post-search transition because it reads
body.textContent() directly; replace the manual snapshot of text with
Playwright's auto-retrying assertions: for each string in summaryHints (the
array defined in the test) call await expect(body).toContainText(hint) (or a
single expect with a combined regex) to wait for the UI to reach post-search,
and only after those awaits assert await expect(body).not.toContainText("Track
Snapshot"). Update references to body, summaryHints, textContent, and anyPresent
accordingly so the test waits for the post-search markers before asserting panel
removal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 808f25cc-2658-45e3-8b70-4f19fd92a537

📥 Commits

Reviewing files that changed from the base of the PR and between 3b4db94 and 5a1b01e.

📒 Files selected for processing (1)
  • web/e2e/research.spec.ts

Comment thread web/e2e/research.spec.ts Outdated
@jerry609
jerry609 merged commit 73d0168 into jerry609:dev Mar 13, 2026
11 checks passed
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