-
Notifications
You must be signed in to change notification settings - Fork 126
Refactor chat shortcuts and notifications, fix linting issues #1830
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
Open
TanCodeX
wants to merge
5
commits into
durdana3105:main
Choose a base branch
from
TanCodeX:refactor/remove-duplicate-toast-provider
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5c3e2ce
refactor: update chat shortcut initialization and add Supabase type d…
TanCodeX 79a805d
refactor: standardize on sonner for toast notifications and remove ol…
TanCodeX 2e16db3
chore: fix all linting errors and warnings
TanCodeX a5b7992
Merge branch 'main' into refactor/remove-duplicate-toast-provider
TanCodeX e3039e2
Merge branch 'main' into refactor/remove-duplicate-toast-provider
TanCodeX File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import fs from 'fs'; | ||
| import path from 'path'; | ||
|
|
||
| // Fix toast dependencies | ||
| const toastFiles = [ | ||
| 'src/components/FocusTimer.tsx', | ||
| 'src/components/GroupPomodoro.tsx', | ||
| 'src/hooks/useCreateSession.ts', | ||
| 'src/hooks/useSessions.ts', | ||
| 'src/hooks/useSkillEndorsements.ts', | ||
| 'src/pages/Portfolio.tsx', | ||
| 'src/pages/ReviewSubmission.tsx' | ||
| ]; | ||
|
|
||
| for(const file of toastFiles) { | ||
| let content = fs.readFileSync(file, 'utf-8'); | ||
| content = content.replace(/(?<=(\[|,)\s*)toast(?=\s*(,|\]))/g, ''); | ||
| content = content.replace(/,\s*,/g, ','); | ||
| content = content.replace(/\[\s*,/g, '['); | ||
| content = content.replace(/,\s*\]/g, ']'); | ||
| fs.writeFileSync(file, content, 'utf-8'); | ||
| } | ||
|
|
||
| // Fix fast refresh warnings | ||
| const fastRefreshFiles = [ | ||
| 'src/components/markdown/MarkdownRenderer.tsx', | ||
| 'src/components/theme-provider.tsx', | ||
| 'src/components/ui/sonner.tsx' | ||
| ]; | ||
|
|
||
| for(const file of fastRefreshFiles) { | ||
| let content = fs.readFileSync(file, 'utf-8'); | ||
| if (!content.includes('eslint-disable-next-line react-refresh/only-export-components') && !content.includes('eslint-disable react-refresh/only-export-components')) { | ||
| content = `/* eslint-disable react-refresh/only-export-components */\n` + content; | ||
| fs.writeFileSync(file, content, 'utf-8'); | ||
| } | ||
| } | ||
|
|
||
| // Fix seedTestimonials dependency | ||
| const testimonialsFile = 'src/components/landing/Testimonials.tsx'; | ||
| let testContent = fs.readFileSync(testimonialsFile, 'utf-8'); | ||
| testContent = testContent.replace(/\[searchTerm, categoryFilter\]/g, '[searchTerm, categoryFilter, seedTestimonials]'); | ||
| fs.writeFileSync(testimonialsFile, testContent, 'utf-8'); |
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
Repository: durdana3105/peer-learning
Length of output: 42061
Replace the remaining
anyusagesThe
no-explicit-anysuppressions were removed, but these files still contain explicitanytypes/casts:src/components/FloatingAI.tsx:useState<any[]>src/components/NotificationsDropdown.tsx:(supabase as any)/payload: anysrc/components/Room/ChatBox.tsx:messages: any[]src/components/Room/InviteMenu.tsx:(supabase.rpc as any)src/features/notifications/pushNotifications.ts:(supabase as any)src/features/notifications/useNotifications.ts:(supabase as any)src/hooks/useRoomChat.ts:useState<any[]>/as anysrc/hooks/useRoomDetails.ts:useState<any>/as anysrc/pages/Discover.tsx: multipleanyusages📍 Affects 9 files
src/components/FloatingAI.tsx#L1-L1(this comment)src/components/NotificationsDropdown.tsx#L1-L1src/components/Room/ChatBox.tsx#L12-L13src/components/Room/InviteMenu.tsx#L17-L18src/features/notifications/pushNotifications.ts#L1-L1src/features/notifications/useNotifications.ts#L1-L1src/hooks/useRoomChat.ts#L7-L13src/hooks/useRoomChat.ts#L33-L34src/hooks/useRoomDetails.ts#L8-L16src/pages/Discover.tsx#L1-L1🤖 Prompt for AI Agents