this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix 5 pre-existing web lint errors

- DeleteFolderConfirmDialog: remove redundant <DescendantCounts> type arg
and unused DescendantCounts interface
- TopBar: remove stale @typescript-eslint/unbound-method disable comment
- chapter.tsx: remove redundant <string> type arg from createContext
- pair.accept.lazy.tsx: add isLoading to handleApprove useCallback deps
- pair.request.lazy.tsx: convert let activePairInit to const ref-object
(satisfies functional/no-let while preserving reset semantics)

+7 -13
+1 -6
apps/web/src/components/cabinet/DeleteFolderConfirmDialog.tsx
··· 10 10 readonly onConfirm: (uri: string) => void; 11 11 } 12 12 13 - interface DescendantCounts { 14 - readonly documents: number; 15 - readonly directories: number; 16 - } 17 - 18 13 export const DeleteFolderConfirmDialog = forwardRef< 19 14 DeleteFolderDialogHandle, 20 15 DeleteFolderConfirmDialogProps 21 16 >(function DeleteFolderConfirmDialog({ onConfirm }, ref) { 22 17 const innerRef = useRef<ConfirmDialogHandle>(null); 23 - const [counts, setCounts] = useState<DescendantCounts>({ documents: 0, directories: 0 }); 18 + const [counts, setCounts] = useState({ documents: 0, directories: 0 }); 24 19 25 20 useImperativeHandle(ref, () => ({ 26 21 show: (uri: string, name: string, documents: number, directories: number) => {
-1
apps/web/src/components/cabinet/TopBar.tsx
··· 29 29 handleClear: handleSearchClear, 30 30 } = useSearchInput(); 31 31 const session = useAuthStore((s) => s.session); 32 - // eslint-disable-next-line @typescript-eslint/unbound-method -- Zustand actions don't use `this` 33 32 const logout = useAuthStore((s) => s.logout); 34 33 35 34 const active = session.status === "active" ? session : null;
+1 -1
apps/web/src/components/content/chapter.tsx
··· 73 73 74 74 /* ─── Platform toggle (Web App / CLI tabs) ─────────────────────────────────── */ 75 75 76 - const PlatformContext = createContext<string>("Web App"); 76 + const PlatformContext = createContext("Web App"); 77 77 78 78 interface PlatformToggleProps { 79 79 readonly children: ReactNode;
+1 -1
apps/web/src/routes/devices/pair.accept.lazy.tsx
··· 91 91 removeLoading("pair-accept"); 92 92 } 93 93 }, 94 - [addLoading, navigate, removeLoading], 94 + [addLoading, isLoading, navigate, removeLoading], 95 95 ); 96 96 97 97 return (
+4 -4
apps/web/src/routes/devices/pair.request.lazy.tsx
··· 17 17 // Module-level promise dedup: WASM async methods hold RefCell<&mut self>, 18 18 // so concurrent calls on the same context panic. StrictMode double-mounts 19 19 // would fire two createPairRequest calls — this ensures only one runs. 20 - let activePairInit: Promise<PairRequestResult> | null = null; 20 + const pairInitState = { current: null as Promise<PairRequestResult> | null }; 21 21 22 22 // --------------------------------------------------------------------------- 23 23 // Page — new device requesting identity from an existing device ··· 56 56 addLoading("pair-request-init"); 57 57 try { 58 58 // Deduplicate: StrictMode double-mount shares one WASM call. 59 - activePairInit ??= createPairRequest(); 60 - const pairResult = await activePairInit; 59 + pairInitState.current ??= createPairRequest(); 60 + const pairResult = await pairInitState.current; 61 61 ephemeralPrivKeyRef.current = pairResult.ephemeralPrivateKey; 62 62 63 63 if (cancelledRef.current) return; ··· 114 114 message: err instanceof Error ? err.message : String(err), 115 115 }); 116 116 } finally { 117 - activePairInit = null; 117 + pairInitState.current = null; 118 118 removeLoading("pair-request-init"); 119 119 } 120 120 }