Skip to content

fix(web): 按 Copilot 评论修复列表/详情错误态与移除剩余 emoji#16

Merged
chenchenchenchencj merged 1 commit into
masterfrom
cccc
Mar 7, 2026
Merged

fix(web): 按 Copilot 评论修复列表/详情错误态与移除剩余 emoji#16
chenchenchenchencj merged 1 commit into
masterfrom
cccc

Conversation

@chenchenchenchencj

Copy link
Copy Markdown
Collaborator

Made-with: Cursor

Copilot AI review requested due to automatic review settings March 7, 2026 07:57
@chenchenchenchencj chenchenchenchencj merged commit 5eebcd8 into master Mar 7, 2026
5 checks passed

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

This PR addresses two categories of bugs: (1) stale error/data state in detail and list pages when navigating between routes, and (2) replacement of remaining emoji characters with consistent Lucide SVG icons.

Changes:

  • State reset before API calls in GeneDetail, GenomeDetail, and TemplateDetail: previously setVersionsError(null) was placed after the catch callback of the first API call, meaning it would have been synchronously overwritten before any async result. Now all four states (error, entity, versions, versionsError) are reset at the top of the effect before the API calls.
  • setTotalPages(0) added to error handlers in Browse, GenomeBrowse, and TemplateBrowse so pagination controls are hidden on error, plus setFederatedSources reset in Browse.
  • Emoji → Lucide icons in Home.tsx and CategoryNav.tsx category grids/buttons, and GenomeBrowse.tsx empty-state placeholder, using the existing LucideIcon dynamic component.

Reviewed changes

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

Show a summary per file
File Description
GeneDetail.tsx Resets error, gene, versions, and versionsError before each API fetch
GenomeDetail.tsx Same state-reset fix as GeneDetail
TemplateDetail.tsx Same state-reset fix; also moves setVersionsError(null) to before API calls
Browse.tsx Adds setTotalPages(0) and setFederatedSources reset in the federated-search error handler; adds setTotalPages(0) in the list error handler
GenomeBrowse.tsx Adds setTotalPages(0) in error handler; replaces 🧫 emoji with FlaskConical icon
TemplateBrowse.tsx Adds setTotalPages(0) in error handler
Home.tsx Replaces emoji icons in category grid with LucideIcon component
CategoryNav.tsx Replaces emoji icons in category buttons with LucideIcon component

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

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