-
Notifications
You must be signed in to change notification settings - Fork 62
refactor: update styles and prompt selection logic (#103) #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -95,7 +95,17 @@ export const GeneralToolCard = ({ | |||||||||||
| // When there is a message, show the compact card with collapsible content | ||||||||||||
| return ( | ||||||||||||
| <div className={cn("tool-card noselect compact", { animated: animated })}> | ||||||||||||
| <div className="flex items-center gap-1 cursor-pointer" role="button" tabIndex={0} onClick={toggleCollapse} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { toggleCollapse(); } }}> | ||||||||||||
| <div | ||||||||||||
| className="flex items-center gap-1 cursor-pointer" | ||||||||||||
| role="button" | ||||||||||||
| tabIndex={0} | ||||||||||||
| onClick={toggleCollapse} | ||||||||||||
| onKeyDown={(e) => { | ||||||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||||||
|
||||||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === " ") { | |
| e.preventDefault(); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -41,7 +41,11 @@ export const FilterControls = ({ | |||||||
| role="button" | ||||||||
| tabIndex={0} | ||||||||
| onClick={() => setIsSuggestionsExpanded(!isSuggestionsExpanded)} | ||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { setIsSuggestionsExpanded(!isSuggestionsExpanded); } }} | ||||||||
| onKeyDown={(e) => { | ||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||
|
||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,7 +43,11 @@ export const GenerateCitationsCard = ({ functionName, message, preparing, animat | |||||||
| role="button" | ||||||||
| tabIndex={0} | ||||||||
| onClick={() => setIsMetadataCollapsed(!isMetadataCollapsed)} | ||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { setIsMetadataCollapsed(!isMetadataCollapsed); } }} | ||||||||
| onKeyDown={(e) => { | ||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||
|
||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,7 +43,11 @@ export const OnlineSearchPapersCard = ({ functionName, message, preparing, anima | |||||||
| role="button" | ||||||||
| tabIndex={0} | ||||||||
| onClick={() => setIsMetadataCollapsed(!isMetadataCollapsed)} | ||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { setIsMetadataCollapsed(!isMetadataCollapsed); } }} | ||||||||
| onKeyDown={(e) => { | ||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||
|
||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -84,7 +84,11 @@ export const ReviewPaperCard = ({ functionName, message, preparing, animated }: | |||||||
| role="button" | ||||||||
| tabIndex={0} | ||||||||
| onClick={() => setIsMetadataCollapsed(!isMetadataCollapsed)} | ||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { setIsMetadataCollapsed(!isMetadataCollapsed); } }} | ||||||||
| onKeyDown={(e) => { | ||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||
|
||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -51,7 +51,11 @@ export const SearchRelevantPapersCard = ({ functionName, message, preparing, ani | |||||||||||
| role="button" | ||||||||||||
| tabIndex={0} | ||||||||||||
| onClick={() => setIsMetadataCollapsed(!isMetadataCollapsed)} | ||||||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { setIsMetadataCollapsed(!isMetadataCollapsed); } }} | ||||||||||||
| onKeyDown={(e) => { | ||||||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||||||
|
||||||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === " ") { | |
| e.preventDefault(); | |
| } |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === " ") { | |
| e.preventDefault(); | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,7 +43,11 @@ export const VerifyCitationsCard = ({ functionName, message, preparing, animated | |||||||||||
| role="button" | ||||||||||||
| tabIndex={0} | ||||||||||||
| onClick={() => setIsMetadataCollapsed(!isMetadataCollapsed)} | ||||||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { setIsMetadataCollapsed(!isMetadataCollapsed); } }} | ||||||||||||
| onKeyDown={(e) => { | ||||||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||||||
|
||||||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === " ") { | |
| e.preventDefault(); | |
| } |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -43,7 +43,11 @@ export const XtraMcpGenericCard = ({ functionName, message, preparing, animated | |||||||||||
| role="button" | ||||||||||||
| tabIndex={0} | ||||||||||||
| onClick={() => setIsMetadataCollapsed(!isMetadataCollapsed)} | ||||||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { setIsMetadataCollapsed(!isMetadataCollapsed); } }} | ||||||||||||
| onKeyDown={(e) => { | ||||||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||||||
|
||||||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === " ") { | |
| e.preventDefault(); | |
| } |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -205,7 +205,11 @@ function OnboardingStep({ step, imageUrl, imageError, onImageClick, onImageError | |||||||
| role="button" | ||||||||
| tabIndex={0} | ||||||||
| onClick={onImageClick} | ||||||||
| onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { onImageClick(); } }} | ||||||||
| onKeyDown={(e) => { | ||||||||
| if (e.key === "Enter" || e.key === " ") { | ||||||||
|
||||||||
| if (e.key === "Enter" || e.key === " ") { | |
| if (e.key === "Enter" || e.key === " ") { | |
| e.preventDefault(); |
Copilot
AI
Feb 18, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing e.preventDefault() call when handling Space key. When Space is pressed on an element with role="button", the browser will scroll the page by default. Add e.preventDefault() inside the if statement to prevent unwanted scrolling behavior.