Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 7
Integrate Resolution Search and UI Improvements#478
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
6eeae28160e082ae085cf73c385c1508c04c8c028be2c061543179e77d45e02562383144e86b60a480186acfbe58ae549a3495da1ba36e586431b418a04d4910ab3fe250283e6554775e95a25bf80c87fc4278e9813d264c868dcd3b5ed273984b9bf45f68767c26d5a842df1184f6789377934895bf37dc345b986013ed2ba1f9ea77a5d45814452307738bdf52ed9dda7a32af8012e23a1d3fa9bf40dd519390File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -9,7 +9,7 @@ import { useActions, useUIState } from 'ai/rsc' | ||
| import { AI } from '@/app/actions' | ||
| import { nanoid } from 'nanoid' | ||
| import { UserMessage } from './user-message' | ||
| import { toast } from 'react-toastify' | ||
| import { toast } from 'sonner' | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash# Verify Toaster component is mounted in the app
rg -n "Toaster" --type=tsx --type=ts -g '!node_modules'Repository: QueueLab/QCX Length of output: 83 🏁 Script executed: # Check for any remaining react-toastify imports
rg -n "react-toastify" --type=tsx --type=ts -g '!node_modules'Repository: QueueLab/QCX Length of output: 83 🏁 Script executed: # Verify the migration in the file
rg -n "from 'sonner'" --type=tsx --type=ts -g '!node_modules'Repository: QueueLab/QCX Length of output: 83 🏁 Script executed: #!/bin/bash# Search for Toaster component in TypeScript/React files
rg -n "Toaster" --type-add 'web:*.{ts,tsx,js,jsx}' -t web -g '!node_modules'Repository: QueueLab/QCX Length of output: 970 🏁 Script executed: # Search for react-toastify to ensure it was fully removed
rg "react-toastify" -g '!node_modules'Repository: QueueLab/QCX Length of output: 558 🏁 Script executed: # Search for sonner imports
rg "from ['\"]sonner['\"]" -g '!node_modules'Repository: QueueLab/QCX Length of output: 382 🏁 Script executed: # List the app entry/layout files to check for Toaster
fd -e tsx -e ts . -path '*/app*' -o -path '*/layout*' -o -path '*/main*' -o -path '*/index*'| head -20Repository: QueueLab/QCX Length of output: 224 Complete the sonner migration across the codebase. The migration from 🤖 Prompt for AI Agents | ||
| import { useSettingsStore } from '@/lib/store/settings' | ||
| import { useMapData } from './map/map-data-context' | ||
| @@ -37,7 +37,11 @@ export function HeaderSearchButton() { | ||
| const handleResolutionSearch = async () => { | ||
| if (mapProvider === 'mapbox' && !map) { | ||
| toast.error('Map is not available yet. Please wait for it to load.') | ||
| toast.error('Mapbox is not available yet. Please wait for it to load.') | ||
| return | ||
| } | ||
| if (mapProvider === 'google' && !mapData.cameraState) { | ||
| toast.error('Google Maps state is not available yet.') | ||
| return | ||
| } | ||
| if (!actions) { | ||
| @@ -73,7 +77,7 @@ export function HeaderSearchButton() { | ||
| const { center, range } = mapData.cameraState | ||
| const zoom = Math.round(Math.log2(40000000 / (range || 1))); | ||
| let staticMapUrl = `https://maps.googleapis.com/maps/api/staticmap?center=${center.lat},${center.lng}&zoom=${zoom}&size=640x480&maptype=satellite&key=${apiKey}`; | ||
| let staticMapUrl = `https://maps.googleapis.com/maps/api/staticmap?center=${center.lat},${center.lng}&zoom=${zoom}&size=640x480&scale=2&maptype=satellite&key=${apiKey}`; | ||
| const response = await fetch(staticMapUrl); | ||
| if (!response.ok) { | ||
| @@ -107,7 +111,7 @@ export function HeaderSearchButton() { | ||
| variant="ghost" | ||
| size="icon" | ||
| onClick={handleResolutionSearch} | ||
| disabled={isAnalyzing || !map || !actions} | ||
| disabled={isAnalyzing || !actions || (mapProvider === 'mapbox' && !map) || (mapProvider === 'google' && !mapData.cameraState)} | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Disable logic consistency is good but verbose. The disable condition is duplicated between desktop and mobile buttons. Consider extracting to a computed variable for maintainability. ♻️ Extract shared disable condition+ const isDisabled = isAnalyzing || !actions || (mapProvider === 'mapbox' && !map) || (mapProvider === 'google' && !mapData.cameraState)+
const desktopButton = (
<Button
variant="ghost"
size="icon"
onClick={handleResolutionSearch}
- disabled={isAnalyzing || !actions || (mapProvider === 'mapbox' && !map) || (mapProvider === 'google' && !mapData.cameraState)}+ disabled={isDisabled}
title="Analyze current map view"
>And similarly for Also applies to: 126-126 🤖 Prompt for AI Agents | ||
| title="Analyze current map view" | ||
| > | ||
| {isAnalyzing ? ( | ||
| @@ -119,9 +123,8 @@ export function HeaderSearchButton() { | ||
| ) | ||
| const mobileButton = ( | ||
| <Button variant="ghost" size="sm" onClick={handleResolutionSearch} disabled={isAnalyzing || !map || !actions}> | ||
| <Search className="h-4 w-4 mr-2" /> | ||
| Search | ||
| <Button variant="ghost" size="icon" onClick={handleResolutionSearch} disabled={isAnalyzing || !actions || (mapProvider === 'mapbox' && !map) || (mapProvider === 'google' && !mapData.cameraState)}> | ||
| <Search className="h-[1.2rem] w-[1.2rem]" /> | ||
| </Button> | ||
| ) | ||
Uh oh!
There was an error while loading. Please reload this page.
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.
The LICENSE boilerplate line is being edited to a specific person/year. This may be legally incorrect if the project is not solely authored/owned by that person, and it may conflict with repository ownership/CLA expectations.
This is not a code issue but it is a release-blocking compliance risk if inaccurate.
Suggestion
Confirm the correct copyright holder for the repository (individual vs organization) and ensure this line matches the project’s legal ownership and contribution model. If this was accidental, revert this line and manage attribution via
NOTICE/AUTHORSinstead.Reply with "@CharlieHelps yes please" if you'd like me to add a commit reverting the LICENSE line pending confirmation.