Commit Graph
23 Commits
Author SHA1 Message Date
SukkaandCopilot e9d63aee5e perf(ip-info-card): reduce IP API load even more (#6263)
* refactor(ip-info-card): reduce retry, use succeed as lastFetchTs

* refactor(ip-info-card): stop countdown during revalidation

* perf(ip-info-card): avoid aggressive schedule revalidation

* perf(ip-info-card): try stop interval on window minimized

* perf(ip-info-card): only mutate after card scroll into view once

* perf(ip-info-card): interval only when card has been visible

* chore: add more debug information

* Update src/components/home/ip-info-card.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: reset countdown state after mutate finishes

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-06 09:09:36 +00:00
SukkaandCopilot 90e193099f refactor(ip-info-card): make ip info card much better (#6226)
* perf(ip-info-card): make ip info card much better

* fix(ip-info-card): remove unused useEffect deps

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* refactor(ip-info-card): use `async-retry`, bail out non-2XX resp

* feat(ip-info-card): add new backend

* feat(ip-info-card): only revalidate when window is visible

* perf(ip-info-card): reduce re-renders when window is hidden

* fix(ip-info-card): remove `mutate` from `useEffect` arg

* Update src/components/home/ip-info-card.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: drop AbortSignal.timeout for old safati compat

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-04 01:40:13 +00:00
SukkaandSlinetrac 8e48e4ed10 chore(eslint): add eslint-plugin-react-compiler (#5918)
* chore(eslint): add `eslint-plugin-react-compiler`

* refactor: fix eslint warnings and avoid in-render mutations

---------

Co-authored-by: Slinetrac <realakayuki@gmail.com>
2025-12-22 12:51:20 +08:00
Sukka dfcdb33e58 chore: use vite-swc-react (#5246) 2025-10-30 10:19:29 +08:00
Sukka 0c88568cd7 chore: make eslint happy (part 1) (#4890) 2025-09-30 14:19:49 +08:00
Sukka fb5d5a7d37 chore(eslint): replace eslint-plugin-react w/ eslint-react (#4844)
* chore(eslint): replace `eslint-plugin-react` w/ `eslint-react`

* chore(eslint): replace `eslint-plugin-import` w/ `import-x`
2025-09-24 13:25:22 +08:00
954ff53d9b refactor: use React in its intended way (#3963)
* refactor: replace `useEffect` w/ `useLocalStorage`

* refactor: replace `useEffect` w/ `useSWR`

* refactor: replace `useEffect` and `useSWR`. clean up `useRef`

* refactor: use `requestIdleCallback`

* refactor: replace `useEffect` w/ `useMemo`

* fix: clean up `useEffect`

* refactor: replace `useEffect` w/ `useSWR`

* refactor: remove unused `useCallback`

* refactor: enhance performance and memory management in frontend processes

* refactor: improve pre-push script structure and readability

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
Co-authored-by: Tunglies <tunglies.dev@outlook.com>
2025-07-02 23:34:13 +08:00
Sukka c17ea74856 chore: drop fs-extra (#1739)
nb!
2024-09-20 02:01:36 +08:00
Sukka 607aa78059 fix(#1387): avoid catastrophic backtracking (#1396) 2024-07-14 12:26:02 +08:00
Sukka 6e374bcd4e ci: speed up cargo install by enabling cache (webview2) (#1283) 2024-07-01 14:23:21 +08:00
Sukka 28f3044bdd ci: speed up cargo install by enabling cache (#1279) 2024-06-30 17:21:55 +08:00
Sukka b6ea73af83 fix(#1226): missing conn unsub (#1228) 2024-06-17 13:36:35 +08:00
Sukka 1fa3ffb1ff refactor(connections): use swr subscription (#1226) 2024-06-17 13:14:36 +08:00
Sukka 18f0177fce refactor(log): use swr subscription (#1220) 2024-06-17 10:48:37 +08:00
Sukka a9149fb92e feat: add a wrapper around sockette w/ error retry (#1219)
* feat: add a wrapper around sockette w/ error retry

* chore: use import path alias

* perf: reduce retry
2024-06-16 18:25:33 +08:00
Sukka 6cdf199531 ci(alpha): avoid race by cancel non-latest concurrent runs (#1213) 2024-06-16 01:10:30 +08:00
Sukka 44dc7fe24a fix: hide save button in readonly editor view (#1208) 2024-06-15 19:24:26 +08:00
Sukka 455892b414 fix(#1203): correct types (#1207) 2024-06-15 19:23:58 +08:00
Sukka 4f5227782a perf: replace Array#map Array#filter chain w/ Array#reduce (#1203) 2024-06-15 12:22:33 +08:00
Sukka 9f76e0e056 chore: use swr subscription for layout traffic / memory (#1202)
* chore: update swr to 2

* refactor: use swr subscription for memory & traffic

* refactor: introduce `sockette`
2024-06-14 18:23:29 +08:00
Sukka 3a9a1439d9 refactor: simplify useConnectionSetting (#1141) 2024-06-07 17:23:53 +08:00
Sukka 2725322fd5 refactor: replace recoil (#1137) 2024-06-07 12:27:37 +08:00
Sukka 2333271c20 fix(#1126): add Object.hasOwn polyfill (#1127) 2024-06-05 00:12:06 +08:00