fix(web): 按 Copilot 评论修复列表/详情错误态与移除剩余 emoji#16
Merged
Conversation
Made-with: Cursor
There was a problem hiding this comment.
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, andTemplateDetail: previouslysetVersionsError(null)was placed after thecatchcallback 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 inBrowse,GenomeBrowse, andTemplateBrowseso pagination controls are hidden on error, plussetFederatedSourcesreset inBrowse.- Emoji → Lucide icons in
Home.tsxandCategoryNav.tsxcategory grids/buttons, andGenomeBrowse.tsxempty-state placeholder, using the existingLucideIcondynamic 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Made-with: Cursor