chore: update copyright year to 2026#174
Conversation
Update all license headers from 2024-2025 to 2024-2026 and update license.sh to handle the new year range.
📝 WalkthroughWalkthroughBulk copyright year update across the entire codebase from 2024-2025 to 2024-2026, with minimal license header additions in a few utility and configuration files. No functional code changes. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
web/src/components/speedtest/traceroute/hooks/useServerData.ts (1)
7-7: Update@tanstack/react-queryto the latest version (5.90.20).The project uses
@tanstack/react-query5.90.16, but version 5.90.20 (released January 23, 2026) is the current stable release. No security vulnerabilities are known for 5.90.16, but updating to the latest patch version is recommended to receive the latest bug fixes and improvements.
🧹 Nitpick comments (2)
web/src/components/speedtest/traceroute/hooks/useServerData.ts (2)
27-36: Consider removing type assertions and handling loading/error states.The
as { data: Server[] }type assertions on lines 30 and 36 suggest a typing workaround. React Query v5 should provide proper typing without manual assertions. Additionally, the code doesn't handle loading or error states from these queries, which could affect UX if server fetching fails or is slow.♻️ Proposed refactor to leverage React Query's built-in state handling
// Fetch speedtest servers - const { data: speedtestServers = [] } = useQuery({ + const { data: speedtestServers = [], isLoading: isLoadingSpeedtest } = useQuery({ queryKey: ["servers", "speedtest"], queryFn: () => getServers("speedtest"), - }) as { data: Server[] }; + }); // Fetch librespeed servers - const { data: librespeedServers = [] } = useQuery({ + const { data: librespeedServers = [], isLoading: isLoadingLibrespeed } = useQuery({ queryKey: ["servers", "librespeed"], queryFn: () => getServers("librespeed"), - }) as { data: Server[] }; + });Then expose loading state in the return object for upstream components to handle.
39-53: Unify data fetching by migrating iperf to React Query.The iperf server fetching uses
useEffect+fetchwhile speedtest and librespeed use React Query. This inconsistency makes the codebase harder to maintain and prevents iperf from benefiting from React Query's built-in caching, automatic retries, and deduplication.♻️ Proposed migration to React Query for consistency
- // Fetch iperf servers - useEffect(() => { - const fetchIperfServers = async () => { - try { - const response = await fetch(getApiUrl("/iperf/servers")); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - const data = await response.json(); - setIperfServers(data || []); - } catch (error) { - console.error("Failed to fetch iperf servers:", error); - } - }; - fetchIperfServers(); - }, []); + // Fetch iperf servers + const { data: iperfServers = [] } = useQuery({ + queryKey: ["servers", "iperf"], + queryFn: async () => { + const response = await fetch(getApiUrl("/iperf/servers")); + if (!response.ok) { + throw new Error(`HTTP error! status: ${response.status}`); + } + return response.json(); + }, + });Remove the
iperfServersstate declaration on line 24 since React Query manages this state.
Summary
2024-2025to2024-2026across 197 source fileslicense.shto use2024-2026in header templates and handle2024-2025->2024-2026transitions in the year update functionTest plan
./license.sh falsesuccessfullygit diffSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.