diff --git a/.commentlint/frontend-baseline.json b/.commentlint/frontend-baseline.json index 9ae7ba2..42f3c98 100644 --- a/.commentlint/frontend-baseline.json +++ b/.commentlint/frontend-baseline.json @@ -323,1812 +323,6 @@ "kind": "function-expression", "name": "anonymous" }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 103, - "kind": "variable", - "name": "result" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 104, - "kind": "variable", - "name": "stored" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 109, - "kind": "variable", - "name": "runError" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 112, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 112, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 120, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 22, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 40, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 41, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 43, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 52, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 55, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 57, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 60, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 63, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 63, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 66, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 68, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 70, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 76, - "kind": "variable", - "name": "stored" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 80, - "kind": "variable", - "name": "saveError" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 83, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 91, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 93, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/accountAutomation/hooks.ts", - "line": 95, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/accountAutomation/state.test.ts", - "line": 19, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/accounts/runtime.test.ts", - "line": 14, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/runtime.test.ts", - "line": 15, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/runtime.test.ts", - "line": 34, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/runtime.test.ts", - "line": 41, - "kind": "variable", - "name": "result" - }, - { - "file": "app/features/accounts/runtime.test.ts", - "line": 54, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/state.test.ts", - "line": 32, - "kind": "variable", - "name": "currentGeneration" - }, - { - "file": "app/features/accounts/state.test.ts", - "line": 33, - "kind": "variable", - "name": "currentAccountId" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 107, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 108, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 108, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 114, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 139, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 143, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 148, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 150, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 156, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 171, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 181, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 188, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 196, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 213, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 221, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 227, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 229, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 235, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 249, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 256, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 261, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 271, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 292, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 301, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 308, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 314, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 325, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 332, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 332, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 72, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/accounts/submoduleHooks.ts", - "line": 81, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 140, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 141, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 144, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 145, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 147, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 150, - "kind": "variable", - "name": "page" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 152, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 153, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 154, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 156, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 162, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 163, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 164, - "kind": "variable", - "name": "load" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 167, - "kind": "variable", - "name": "[details, statuses]" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 171, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 171, - "kind": "variable", - "name": "withRuntime" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 176, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 176, - "kind": "variable", - "name": "enabled" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 177, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 177, - "kind": "variable", - "name": "sessionPages" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 180, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 181, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 182, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 183, - "kind": "variable", - "name": "stored" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 184, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 184, - "kind": "variable", - "name": "first" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 186, - "kind": "variable", - "name": "loadError" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 193, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 196, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 197, - "kind": "variable", - "name": "disposed" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 198, - "kind": "variable", - "name": "timer" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 199, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 200, - "kind": "variable", - "name": "poll" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 203, - "kind": "variable", - "name": "statuses" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 204, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 204, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 216, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 223, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 226, - "kind": "variable", - "name": "sessions" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 227, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 227, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 230, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 236, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 241, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 243, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 249, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 254, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 254, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 255, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 255, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 256, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 258, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 261, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 264, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 269, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 274, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 274, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 282, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 284, - "kind": "variable", - "name": "container" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 285, - "kind": "variable", - "name": "previousHeight" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 286, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 287, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 292, - "kind": "variable", - "name": "oldestID" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 293, - "kind": "variable", - "name": "page" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 295, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 298, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 301, - "kind": "variable", - "name": "loadError" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 309, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 310, - "kind": "variable", - "name": "disposed" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 311, - "kind": "variable", - "name": "reconnectTimer" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 312, - "kind": "variable", - "name": "retry" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 313, - "kind": "variable", - "name": "socket" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 314, - "kind": "variable", - "name": "connect" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 317, - "kind": "variable", - "name": "protocol" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 319, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 320, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 322, - "kind": "variable", - "name": "payload" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 323, - "kind": "variable", - "name": "message" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 325, - "kind": "variable", - "name": "accountID" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 326, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 327, - "kind": "variable", - "name": "rows" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 328, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 328, - "kind": "variable", - "name": "found" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 333, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 338, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 341, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 348, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 351, - "kind": "variable", - "name": "delay" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 354, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 357, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 365, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 366, - "kind": "variable", - "name": "container" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 368, - "kind": "variable", - "name": "distanceFromBottom" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 372, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 373, - "kind": "variable", - "name": "contextChanged" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 376, - "kind": "variable", - "name": "container" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 385, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 385, - "kind": "variable", - "name": "activeAccount" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 386, - "kind": "variable", - "name": "activeSessions" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 387, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 387, - "kind": "variable", - "name": "selectedSession" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 388, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 388, - "kind": "variable", - "name": "filteredSessions" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 389, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 389, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 389, - "kind": "variable", - "name": "unreadForAccount" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 392, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 394, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 396, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 398, - "kind": "variable", - "name": "accountID" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 402, - "kind": "variable", - "name": "page" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 404, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 405, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 406, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 407, - "kind": "variable", - "name": "loadError" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 415, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 417, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 419, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 424, - "kind": "variable", - "name": "result" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 428, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 429, - "kind": "variable", - "name": "sendError" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 440, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 442, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 444, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 449, - "kind": "variable", - "name": "result" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 452, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 453, - "kind": "variable", - "name": "sendError" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 467, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 468, - "kind": "variable", - "name": "text" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 474, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/hooks.ts", - "line": 480, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/state.test.ts", - "line": 24, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/chat/state.ts", - "line": 10, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/state.ts", - "line": 16, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/state.ts", - "line": 16, - "kind": "variable", - "name": "keys" - }, - { - "file": "app/features/chat/state.ts", - "line": 17, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/state.ts", - "line": 22, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/state.ts", - "line": 22, - "kind": "variable", - "name": "index" - }, - { - "file": "app/features/chat/state.ts", - "line": 24, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/chat/state.ts", - "line": 38, - "kind": "variable", - "name": "date" - }, - { - "file": "app/features/chat/state.ts", - "line": 39, - "kind": "variable", - "name": "today" - }, - { - "file": "app/features/chat/state.ts", - "line": 48, - "kind": "variable", - "name": "date" - }, - { - "file": "app/features/chat/state.ts", - "line": 5, - "kind": "variable", - "name": "keyword" - }, - { - "file": "app/features/chat/state.ts", - "line": 6, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 100, - "kind": "variable", - "name": "itemNames" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 101, - "kind": "variable", - "name": "analytics" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 102, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 102, - "kind": "variable", - "name": "chartData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 103, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 103, - "kind": "variable", - "name": "productSalesData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 104, - "kind": "variable", - "name": "colors" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 109, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 109, - "kind": "variable", - "name": "sourceData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 110, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 110, - "kind": "variable", - "name": "categoryData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 111, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 111, - "kind": "variable", - "name": "maxProductSales" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 13, - "kind": "member", - "name": "data" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 14, - "kind": "member", - "name": "status" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 15, - "kind": "member", - "name": "chartData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 16, - "kind": "member", - "name": "productSalesData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 17, - "kind": "member", - "name": "sourceData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 18, - "kind": "member", - "name": "categoryData" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 19, - "kind": "member", - "name": "maxProductSales" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 20, - "kind": "member", - "name": "trendPercent" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 21, - "kind": "member", - "name": "selectedRangeLabel" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 22, - "kind": "member", - "name": "refresh" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 33, - "kind": "variable", - "name": "{ range, customStartDate, customEndDate, customRangeVersion }" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 34, - "kind": "variable", - "name": "[overview, setOverview]" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 35, - "kind": "variable", - "name": "[rangeData, setRangeData]" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 36, - "kind": "variable", - "name": "[status, setStatus]" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 37, - "kind": "variable", - "name": "[refreshKey, setRefreshKey]" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 38, - "kind": "variable", - "name": "requestSequence" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 39, - "kind": "variable", - "name": "rangeSelection" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 45, - "kind": "variable", - "name": "refresh" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 47, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 51, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 52, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 53, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 57, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 60, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 61, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 63, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 65, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 68, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 69, - "kind": "variable", - "name": "dateRange" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 72, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 73, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 76, - "kind": "variable", - "name": "previousRange" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 77, - "kind": "variable", - "name": "sequence" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 78, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 79, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 84, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 87, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 88, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 9, - "kind": "member", - "name": "customRangeVersion" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 90, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 92, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/hooks.ts", - "line": 95, - "kind": "variable", - "name": "data" - }, - { - "file": "app/features/dashboard/state.ts", - "line": 109, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/state.ts", - "line": 135, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/state.ts", - "line": 171, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/dashboard/state.ts", - "line": 88, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 22, - "kind": "variable", - "name": "invalid" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 31, - "kind": "variable", - "name": "visible" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 36, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 42, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 43, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 44, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 45, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/rules/issueState.test.ts", - "line": 46, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 105, - "kind": "variable", - "name": "models" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 110, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 112, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 122, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 122, - "kind": "variable", - "name": "loadSettings" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 131, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 134, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 137, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 142, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 147, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 149, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 152, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 158, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 161, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 161, - "kind": "variable", - "name": "handleSave" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 172, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 180, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 180, - "kind": "variable", - "name": "handleCredentialsSave" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 206, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 207, - "kind": "variable", - "name": "error" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 218, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 72, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 88, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 91, - "kind": "variable", - "name": "controller" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 97, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "app/features/settings/hooks.ts", - "line": 97, - "kind": "variable", - "name": "loadAIModels" - }, { "file": "chatEmojis.test.tsx", "line": 10, @@ -2393,4878 +587,6 @@ "kind": "function-expression", "name": "anonymous" }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 102, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 12, - "kind": "member", - "name": "checked" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 12, - "kind": "member", - "name": "label" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 12, - "kind": "member", - "name": "onChange" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 12, - "kind": "variable", - "name": "Toggle" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 19, - "kind": "variable", - "name": "AccountAutomationModal" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 47, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 47, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 50, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 50, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 54, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 7, - "kind": "member", - "name": "account" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 72, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 72, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 77, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 77, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 8, - "kind": "member", - "name": "onClose" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 80, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 9, - "kind": "member", - "name": "onSaved" - }, - { - "file": "components/AccountAutomationModal.tsx", - "line": 95, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/accountBindings.test.ts", - "line": 13, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/accountBindings.test.ts", - "line": 4, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/accountBindings.test.ts", - "line": 5, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/accountBindings.test.ts", - "line": 9, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/accountBindings.ts", - "line": 1, - "kind": "variable", - "name": "shouldSaveNotificationBindings" - }, - { - "file": "components/AccountList.tsx", - "line": 151, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 158, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 160, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 197, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 197, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 199, - "kind": "variable", - "name": "error" - }, - { - "file": "components/AccountList.tsx", - "line": 217, - "kind": "variable", - "name": "error" - }, - { - "file": "components/AccountList.tsx", - "line": 267, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 269, - "kind": "variable", - "name": "accountId" - }, - { - "file": "components/AccountList.tsx", - "line": 27, - "kind": "variable", - "name": "AccountList" - }, - { - "file": "components/AccountList.tsx", - "line": 274, - "kind": "variable", - "name": "e" - }, - { - "file": "components/AccountList.tsx", - "line": 282, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 285, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 288, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 292, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 303, - "kind": "variable", - "name": "e" - }, - { - "file": "components/AccountList.tsx", - "line": 314, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 314, - "kind": "variable", - "name": "filteredAccounts" - }, - { - "file": "components/AccountList.tsx", - "line": 315, - "kind": "variable", - "name": "keyword" - }, - { - "file": "components/AccountList.tsx", - "line": 323, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 336, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 341, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 357, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 358, - "kind": "variable", - "name": "runtime" - }, - { - "file": "components/AccountList.tsx", - "line": 359, - "kind": "variable", - "name": "requiresLogin" - }, - { - "file": "components/AccountList.tsx", - "line": 420, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 431, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 439, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 446, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 453, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 460, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 467, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 474, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 510, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 511, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 512, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 512, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 610, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 698, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 700, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 737, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 759, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 771, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 782, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/AccountList.tsx", - "line": 797, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 107, - "kind": "variable", - "name": "error" - }, - { - "file": "components/CardList.tsx", - "line": 113, - "kind": "variable", - "name": "handleDelete" - }, - { - "file": "components/CardList.tsx", - "line": 118, - "kind": "variable", - "name": "error" - }, - { - "file": "components/CardList.tsx", - "line": 12, - "kind": "variable", - "name": "emptyAddForm" - }, - { - "file": "components/CardList.tsx", - "line": 125, - "kind": "variable", - "name": "handleAddCard" - }, - { - "file": "components/CardList.tsx", - "line": 135, - "kind": "variable", - "name": "payload" - }, - { - "file": "components/CardList.tsx", - "line": 158, - "kind": "variable", - "name": "error" - }, - { - "file": "components/CardList.tsx", - "line": 164, - "kind": "variable", - "name": "toggleCardStatus" - }, - { - "file": "components/CardList.tsx", - "line": 168, - "kind": "variable", - "name": "error" - }, - { - "file": "components/CardList.tsx", - "line": 173, - "kind": "variable", - "name": "copyCardID" - }, - { - "file": "components/CardList.tsx", - "line": 182, - "kind": "variable", - "name": "filteredCards" - }, - { - "file": "components/CardList.tsx", - "line": 183, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 187, - "kind": "variable", - "name": "downloadCardTemplate" - }, - { - "file": "components/CardList.tsx", - "line": 188, - "kind": "variable", - "name": "headers" - }, - { - "file": "components/CardList.tsx", - "line": 189, - "kind": "variable", - "name": "rows" - }, - { - "file": "components/CardList.tsx", - "line": 194, - "kind": "variable", - "name": "csv" - }, - { - "file": "components/CardList.tsx", - "line": 195, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 195, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 197, - "kind": "variable", - "name": "blob" - }, - { - "file": "components/CardList.tsx", - "line": 198, - "kind": "variable", - "name": "url" - }, - { - "file": "components/CardList.tsx", - "line": 199, - "kind": "variable", - "name": "link" - }, - { - "file": "components/CardList.tsx", - "line": 224, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 241, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 25, - "kind": "variable", - "name": "CardList" - }, - { - "file": "components/CardList.tsx", - "line": 258, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 26, - "kind": "variable", - "name": "{ cards, loadCards }" - }, - { - "file": "components/CardList.tsx", - "line": 27, - "kind": "variable", - "name": "[showEditModal, setShowEditModal]" - }, - { - "file": "components/CardList.tsx", - "line": 28, - "kind": "variable", - "name": "[showAddModal, setShowAddModal]" - }, - { - "file": "components/CardList.tsx", - "line": 281, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 285, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 285, - "kind": "variable", - "name": "lines" - }, - { - "file": "components/CardList.tsx", - "line": 29, - "kind": "variable", - "name": "[selectedCard, setSelectedCard]" - }, - { - "file": "components/CardList.tsx", - "line": 30, - "kind": "variable", - "name": "[editForm, setEditForm]" - }, - { - "file": "components/CardList.tsx", - "line": 307, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 31, - "kind": "variable", - "name": "[addForm, setAddForm]" - }, - { - "file": "components/CardList.tsx", - "line": 33, - "kind": "variable", - "name": "[typeFilter, setTypeFilter]" - }, - { - "file": "components/CardList.tsx", - "line": 34, - "kind": "variable", - "name": "[nameSearch, setNameSearch]" - }, - { - "file": "components/CardList.tsx", - "line": 342, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 355, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 36, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 36, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 362, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 37, - "kind": "variable", - "name": "batchState" - }, - { - "file": "components/CardList.tsx", - "line": 39, - "kind": "variable", - "name": "handleEdit" - }, - { - "file": "components/CardList.tsx", - "line": 391, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 407, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 416, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 437, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 447, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 459, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 470, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 479, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 495, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 511, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 517, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 532, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 545, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 559, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 575, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 586, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 604, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 633, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 648, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 65, - "kind": "variable", - "name": "handleSaveEdit" - }, - { - "file": "components/CardList.tsx", - "line": 659, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 667, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 675, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 692, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 700, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 707, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 713, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 722, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 729, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 735, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 739, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 748, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 752, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 762, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/CardList.tsx", - "line": 79, - "kind": "variable", - "name": "updateData" - }, - { - "file": "components/Chat.tsx", - "line": 122, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 127, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 128, - "kind": "variable", - "name": "outgoing" - }, - { - "file": "components/Chat.tsx", - "line": 129, - "kind": "variable", - "name": "system" - }, - { - "file": "components/Chat.tsx", - "line": 169, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 173, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 173, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 177, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 177, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 177, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 181, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 182, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 185, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 186, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 189, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 36, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 37, - "kind": "variable", - "name": "active" - }, - { - "file": "components/Chat.tsx", - "line": 38, - "kind": "variable", - "name": "unread" - }, - { - "file": "components/Chat.tsx", - "line": 39, - "kind": "variable", - "name": "online" - }, - { - "file": "components/Chat.tsx", - "line": 41, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 64, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 68, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 68, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 72, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 78, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 79, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Chat.tsx", - "line": 99, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.test.tsx", - "line": 10, - "kind": "variable", - "name": "globalStyles" - }, - { - "file": "components/Dashboard.test.tsx", - "line": 12, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.test.tsx", - "line": 13, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.test.tsx", - "line": 14, - "kind": "variable", - "name": "html" - }, - { - "file": "components/Dashboard.test.tsx", - "line": 22, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.test.tsx", - "line": 8, - "kind": "variable", - "name": "dashboardSource" - }, - { - "file": "components/Dashboard.test.tsx", - "line": 9, - "kind": "variable", - "name": "trendChartSource" - }, - { - "file": "components/Dashboard.tsx", - "line": 10, - "kind": "variable", - "name": "cssColor" - }, - { - "file": "components/Dashboard.tsx", - "line": 100, - "kind": "variable", - "name": "totalOrders" - }, - { - "file": "components/Dashboard.tsx", - "line": 101, - "kind": "variable", - "name": "totalAmount" - }, - { - "file": "components/Dashboard.tsx", - "line": 103, - "kind": "variable", - "name": "timeRangeOptions" - }, - { - "file": "components/Dashboard.tsx", - "line": 111, - "kind": "variable", - "name": "currentRangeDates" - }, - { - "file": "components/Dashboard.tsx", - "line": 117, - "kind": "variable", - "name": "normalizedSearchTerm" - }, - { - "file": "components/Dashboard.tsx", - "line": 118, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 118, - "kind": "variable", - "name": "filteredValidOrders" - }, - { - "file": "components/Dashboard.tsx", - "line": 148, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 151, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 166, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 17, - "kind": "member", - "name": "status" - }, - { - "file": "components/Dashboard.tsx", - "line": 173, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 177, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 177, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 18, - "kind": "variable", - "name": "styles" - }, - { - "file": "components/Dashboard.tsx", - "line": 227, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 28, - "kind": "variable", - "name": "labels" - }, - { - "file": "components/Dashboard.tsx", - "line": 282, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 287, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 300, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 329, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 376, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 45, - "kind": "member", - "name": "colorClass" - }, - { - "file": "components/Dashboard.tsx", - "line": 45, - "kind": "member", - "name": "icon" - }, - { - "file": "components/Dashboard.tsx", - "line": 45, - "kind": "member", - "name": "title" - }, - { - "file": "components/Dashboard.tsx", - "line": 45, - "kind": "member", - "name": "trend" - }, - { - "file": "components/Dashboard.tsx", - "line": 45, - "kind": "member", - "name": "value" - }, - { - "file": "components/Dashboard.tsx", - "line": 45, - "kind": "variable", - "name": "StatCard" - }, - { - "file": "components/Dashboard.tsx", - "line": 454, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 466, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 476, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Dashboard.tsx", - "line": 63, - "kind": "variable", - "name": "Dashboard" - }, - { - "file": "components/Dashboard.tsx", - "line": 64, - "kind": "variable", - "name": "[timeRange, setTimeRange]" - }, - { - "file": "components/Dashboard.tsx", - "line": 65, - "kind": "variable", - "name": "[customStartDate, setCustomStartDate]" - }, - { - "file": "components/Dashboard.tsx", - "line": 66, - "kind": "variable", - "name": "[customEndDate, setCustomEndDate]" - }, - { - "file": "components/Dashboard.tsx", - "line": 67, - "kind": "variable", - "name": "[searchTerm, setSearchTerm]" - }, - { - "file": "components/Dashboard.tsx", - "line": 68, - "kind": "variable", - "name": "[customRangeVersion, setCustomRangeVersion]" - }, - { - "file": "components/Dashboard.tsx", - "line": 69, - "kind": "variable", - "name": "dashboard" - }, - { - "file": "components/Dashboard.tsx", - "line": 70, - "kind": "variable", - "name": "{ data, status, chartData, productSalesData, sourceData: sourceDataData, categoryData: categoryDataData, maxProductSales, trendPercent, selectedRangeLabel, refresh }" - }, - { - "file": "components/Dashboard.tsx", - "line": 71, - "kind": "variable", - "name": "stats" - }, - { - "file": "components/Dashboard.tsx", - "line": 72, - "kind": "variable", - "name": "analytics" - }, - { - "file": "components/Dashboard.tsx", - "line": 73, - "kind": "variable", - "name": "previousAnalytics" - }, - { - "file": "components/Dashboard.tsx", - "line": 74, - "kind": "variable", - "name": "validOrders" - }, - { - "file": "components/Dashboard.tsx", - "line": 75, - "kind": "variable", - "name": "validOrdersTotal" - }, - { - "file": "components/Dashboard.tsx", - "line": 76, - "kind": "variable", - "name": "validOrdersTruncated" - }, - { - "file": "components/Dashboard.tsx", - "line": 77, - "kind": "variable", - "name": "ordersLoading" - }, - { - "file": "components/Dashboard.tsx", - "line": 78, - "kind": "variable", - "name": "loadError" - }, - { - "file": "components/Dashboard.tsx", - "line": 88, - "kind": "variable", - "name": "formatCurrency" - }, - { - "file": "components/ItemList.tsx", - "line": 1003, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 1038, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 1058, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 1069, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 114, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 119, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 119, - "kind": "variable", - "name": "previews" - }, - { - "file": "components/ItemList.tsx", - "line": 124, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 125, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 129, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 131, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 135, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 135, - "kind": "variable", - "name": "recoverable" - }, - { - "file": "components/ItemList.tsx", - "line": 136, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 139, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 142, - "kind": "variable", - "name": "handleSync" - }, - { - "file": "components/ItemList.tsx", - "line": 146, - "kind": "variable", - "name": "result" - }, - { - "file": "components/ItemList.tsx", - "line": 149, - "kind": "variable", - "name": "error" - }, - { - "file": "components/ItemList.tsx", - "line": 157, - "kind": "variable", - "name": "handleEdit" - }, - { - "file": "components/ItemList.tsx", - "line": 163, - "kind": "variable", - "name": "handleSaveEdit" - }, - { - "file": "components/ItemList.tsx", - "line": 177, - "kind": "variable", - "name": "error" - }, - { - "file": "components/ItemList.tsx", - "line": 183, - "kind": "variable", - "name": "handleDelete" - }, - { - "file": "components/ItemList.tsx", - "line": 187, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 187, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 188, - "kind": "variable", - "name": "error" - }, - { - "file": "components/ItemList.tsx", - "line": 195, - "kind": "variable", - "name": "handleAddItem" - }, - { - "file": "components/ItemList.tsx", - "line": 216, - "kind": "variable", - "name": "error" - }, - { - "file": "components/ItemList.tsx", - "line": 222, - "kind": "variable", - "name": "handlePublishItem" - }, - { - "file": "components/ItemList.tsx", - "line": 232, - "kind": "variable", - "name": "result" - }, - { - "file": "components/ItemList.tsx", - "line": 249, - "kind": "variable", - "name": "publishedItem" - }, - { - "file": "components/ItemList.tsx", - "line": 26, - "kind": "variable", - "name": "formatItemPrice" - }, - { - "file": "components/ItemList.tsx", - "line": 262, - "kind": "variable", - "name": "error" - }, - { - "file": "components/ItemList.tsx", - "line": 264, - "kind": "variable", - "name": "payload" - }, - { - "file": "components/ItemList.tsx", - "line": 27, - "kind": "variable", - "name": "value" - }, - { - "file": "components/ItemList.tsx", - "line": 275, - "kind": "variable", - "name": "downloadPublishTemplate" - }, - { - "file": "components/ItemList.tsx", - "line": 276, - "kind": "variable", - "name": "headers" - }, - { - "file": "components/ItemList.tsx", - "line": 282, - "kind": "variable", - "name": "rows" - }, - { - "file": "components/ItemList.tsx", - "line": 286, - "kind": "variable", - "name": "csv" - }, - { - "file": "components/ItemList.tsx", - "line": 287, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 287, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 289, - "kind": "variable", - "name": "blob" - }, - { - "file": "components/ItemList.tsx", - "line": 290, - "kind": "variable", - "name": "url" - }, - { - "file": "components/ItemList.tsx", - "line": 291, - "kind": "variable", - "name": "link" - }, - { - "file": "components/ItemList.tsx", - "line": 300, - "kind": "variable", - "name": "openAddModal" - }, - { - "file": "components/ItemList.tsx", - "line": 301, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 305, - "kind": "variable", - "name": "openPublishModal" - }, - { - "file": "components/ItemList.tsx", - "line": 306, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 310, - "kind": "variable", - "name": "locateForPublish" - }, - { - "file": "components/ItemList.tsx", - "line": 311, - "kind": "variable", - "name": "cookieId" - }, - { - "file": "components/ItemList.tsx", - "line": 315, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 317, - "kind": "variable", - "name": "locations" - }, - { - "file": "components/ItemList.tsx", - "line": 32, - "kind": "variable", - "name": "ItemList" - }, - { - "file": "components/ItemList.tsx", - "line": 321, - "kind": "variable", - "name": "error" - }, - { - "file": "components/ItemList.tsx", - "line": 324, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 33, - "kind": "variable", - "name": "[items, setItems]" - }, - { - "file": "components/ItemList.tsx", - "line": 330, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 330, - "kind": "variable", - "name": "rulesForItem" - }, - { - "file": "components/ItemList.tsx", - "line": 333, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 334, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 336, - "kind": "variable", - "name": "accountMap" - }, - { - "file": "components/ItemList.tsx", - "line": 337, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 337, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 34, - "kind": "variable", - "name": "[shippingRules, setShippingRules]" - }, - { - "file": "components/ItemList.tsx", - "line": 340, - "kind": "variable", - "name": "visibleItems" - }, - { - "file": "components/ItemList.tsx", - "line": 341, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 341, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 344, - "kind": "variable", - "name": "accountName" - }, - { - "file": "components/ItemList.tsx", - "line": 345, - "kind": "variable", - "name": "account" - }, - { - "file": "components/ItemList.tsx", - "line": 346, - "kind": "variable", - "name": "name" - }, - { - "file": "components/ItemList.tsx", - "line": 349, - "kind": "variable", - "name": "accountNickname" - }, - { - "file": "components/ItemList.tsx", - "line": 35, - "kind": "variable", - "name": "[accounts, setAccounts]" - }, - { - "file": "components/ItemList.tsx", - "line": 350, - "kind": "variable", - "name": "account" - }, - { - "file": "components/ItemList.tsx", - "line": 36, - "kind": "variable", - "name": "[selectedAccount, setSelectedAccount]" - }, - { - "file": "components/ItemList.tsx", - "line": 37, - "kind": "variable", - "name": "[accountFilter, setAccountFilter]" - }, - { - "file": "components/ItemList.tsx", - "line": 373, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 376, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 38, - "kind": "variable", - "name": "[loading, setLoading]" - }, - { - "file": "components/ItemList.tsx", - "line": 39, - "kind": "variable", - "name": "[publishing, setPublishing]" - }, - { - "file": "components/ItemList.tsx", - "line": 393, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 396, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 40, - "kind": "variable", - "name": "[showEditModal, setShowEditModal]" - }, - { - "file": "components/ItemList.tsx", - "line": 41, - "kind": "variable", - "name": "[showAddModal, setShowAddModal]" - }, - { - "file": "components/ItemList.tsx", - "line": 42, - "kind": "variable", - "name": "[showPublishModal, setShowPublishModal]" - }, - { - "file": "components/ItemList.tsx", - "line": 425, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 43, - "kind": "variable", - "name": "[locationLoading, setLocationLoading]" - }, - { - "file": "components/ItemList.tsx", - "line": 433, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 44, - "kind": "variable", - "name": "[publishLocations, setPublishLocations]" - }, - { - "file": "components/ItemList.tsx", - "line": 443, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 444, - "kind": "variable", - "name": "linkedRules" - }, - { - "file": "components/ItemList.tsx", - "line": 445, - "kind": "variable", - "name": "hasRule" - }, - { - "file": "components/ItemList.tsx", - "line": 45, - "kind": "variable", - "name": "[publishLocation, setPublishLocation]" - }, - { - "file": "components/ItemList.tsx", - "line": 450, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 457, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 46, - "kind": "variable", - "name": "[selectedItem, setSelectedItem]" - }, - { - "file": "components/ItemList.tsx", - "line": 47, - "kind": "variable", - "name": "[editForm, setEditForm]" - }, - { - "file": "components/ItemList.tsx", - "line": 48, - "kind": "variable", - "name": "[addForm, setAddForm]" - }, - { - "file": "components/ItemList.tsx", - "line": 490, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 516, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 521, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 522, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 523, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 524, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 544, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 55, - "kind": "variable", - "name": "[publishForm, setPublishForm]" - }, - { - "file": "components/ItemList.tsx", - "line": 551, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 553, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 559, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 563, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 568, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 572, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 593, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 603, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 609, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 615, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 619, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 624, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 629, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 633, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 637, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 648, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 654, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 658, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 659, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 66, - "kind": "member", - "name": "key" - }, - { - "file": "components/ItemList.tsx", - "line": 66, - "kind": "member", - "name": "url" - }, - { - "file": "components/ItemList.tsx", - "line": 66, - "kind": "variable", - "name": "[publishImagePreviews, setPublishImagePreviews]" - }, - { - "file": "components/ItemList.tsx", - "line": 673, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 678, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 69, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 70, - "kind": "variable", - "name": "itemsList" - }, - { - "file": "components/ItemList.tsx", - "line": 705, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 736, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 743, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 75, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 761, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 762, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 773, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 792, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 804, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 808, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 809, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 81, - "kind": "variable", - "name": "{\n showBatchModal,\n setShowBatchModal,\n batchLoading,\n batchPhase,\n batchFile,\n setBatchFile,\n batchImagesZip,\n setBatchImagesZip,\n batchCategoryKeyword,\n setBatchCategoryKeyword,\n batchCategoryLoading,\n batchFallbackCategory,\n setBatchFallbackCategory,\n batchPreview,\n batchDetail,\n recentBatch,\n setRecentBatch,\n batchLocations,\n batchLocation,\n setBatchLocations,\n setBatchLocation,\n openBatchModal,\n handleRecommendBatchCategory,\n openRecentBatchResult,\n handlePreviewBatch,\n handleStartBatch,\n handleCancelBatch,\n abandonBatchPreview,\n closeBatchModal,\n handleRetryBatchFailed,\n }" - }, - { - "file": "components/ItemList.tsx", - "line": 822, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 833, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 896, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/ItemList.tsx", - "line": 941, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/latestRequest.test.ts", - "line": 4, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/latestRequest.test.ts", - "line": 5, - "kind": "variable", - "name": "commit" - }, - { - "file": "components/latestRequest.ts", - "line": 1, - "kind": "variable", - "name": "commitIfLatest" - }, - { - "file": "components/OrderList.tsx", - "line": 104, - "kind": "variable", - "name": "e" - }, - { - "file": "components/OrderList.tsx", - "line": 11, - "kind": "member", - "name": "status" - }, - { - "file": "components/OrderList.tsx", - "line": 11, - "kind": "variable", - "name": "StatusBadge" - }, - { - "file": "components/OrderList.tsx", - "line": 111, - "kind": "variable", - "name": "handleViewDetail" - }, - { - "file": "components/OrderList.tsx", - "line": 116, - "kind": "variable", - "name": "handleEdit" - }, - { - "file": "components/OrderList.tsx", - "line": 12, - "kind": "variable", - "name": "styles" - }, - { - "file": "components/OrderList.tsx", - "line": 121, - "kind": "variable", - "name": "handleSaveEdit" - }, - { - "file": "components/OrderList.tsx", - "line": 159, - "kind": "variable", - "name": "error" - }, - { - "file": "components/OrderList.tsx", - "line": 165, - "kind": "variable", - "name": "handleSyncSingle" - }, - { - "file": "components/OrderList.tsx", - "line": 168, - "kind": "variable", - "name": "result" - }, - { - "file": "components/OrderList.tsx", - "line": 174, - "kind": "variable", - "name": "error" - }, - { - "file": "components/OrderList.tsx", - "line": 182, - "kind": "variable", - "name": "handleDelete" - }, - { - "file": "components/OrderList.tsx", - "line": 188, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 192, - "kind": "variable", - "name": "error" - }, - { - "file": "components/OrderList.tsx", - "line": 22, - "kind": "variable", - "name": "labels" - }, - { - "file": "components/OrderList.tsx", - "line": 251, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 308, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 324, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 331, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 338, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 346, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 368, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 368, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 375, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 375, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 39, - "kind": "variable", - "name": "OrderList" - }, - { - "file": "components/OrderList.tsx", - "line": 392, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 44, - "kind": "variable", - "name": "{ orders, accounts, filter, setFilter, accountFilter, setAccountFilter, searchText, setSearchText, page, setPage, totalPages, loading, loadOrders, accountName, accountNickname, getItemNameById }" - }, - { - "file": "components/OrderList.tsx", - "line": 45, - "kind": "variable", - "name": "[showDetailModal, setShowDetailModal]" - }, - { - "file": "components/OrderList.tsx", - "line": 46, - "kind": "variable", - "name": "[showEditModal, setShowEditModal]" - }, - { - "file": "components/OrderList.tsx", - "line": 47, - "kind": "variable", - "name": "[selectedOrder, setSelectedOrder]" - }, - { - "file": "components/OrderList.tsx", - "line": 48, - "kind": "variable", - "name": "[editingOrder, setEditingOrder]" - }, - { - "file": "components/OrderList.tsx", - "line": 484, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 49, - "kind": "variable", - "name": "[showShipModal, setShowShipModal]" - }, - { - "file": "components/OrderList.tsx", - "line": 491, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 50, - "kind": "variable", - "name": "[shipOrderId, setShipOrderId]" - }, - { - "file": "components/OrderList.tsx", - "line": 51, - "kind": "variable", - "name": "[shipLoading, setShipLoading]" - }, - { - "file": "components/OrderList.tsx", - "line": 517, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 52, - "kind": "member", - "name": "message" - }, - { - "file": "components/OrderList.tsx", - "line": 52, - "kind": "member", - "name": "success" - }, - { - "file": "components/OrderList.tsx", - "line": 52, - "kind": "variable", - "name": "[shipResult, setShipResult]" - }, - { - "file": "components/OrderList.tsx", - "line": 53, - "kind": "variable", - "name": "[syncingOrderId, setSyncingOrderId]" - }, - { - "file": "components/OrderList.tsx", - "line": 530, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 54, - "kind": "variable", - "name": "[deletingOrderId, setDeletingOrderId]" - }, - { - "file": "components/OrderList.tsx", - "line": 550, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 586, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 605, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 628, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 647, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 656, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 668, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 677, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 687, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 698, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 707, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/OrderList.tsx", - "line": 73, - "kind": "variable", - "name": "handleSync" - }, - { - "file": "components/OrderList.tsx", - "line": 75, - "kind": "variable", - "name": "result" - }, - { - "file": "components/OrderList.tsx", - "line": 80, - "kind": "variable", - "name": "error" - }, - { - "file": "components/OrderList.tsx", - "line": 86, - "kind": "variable", - "name": "handleShip" - }, - { - "file": "components/OrderList.tsx", - "line": 92, - "kind": "variable", - "name": "executeShip" - }, - { - "file": "components/OrderList.tsx", - "line": 96, - "kind": "variable", - "name": "res" - }, - { - "file": "components/OrderList.tsx", - "line": 97, - "kind": "variable", - "name": "result" - }, - { - "file": "components/qrPolling.test.ts", - "line": 100, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 102, - "kind": "member", - "name": "status" - }, - { - "file": "components/qrPolling.test.ts", - "line": 102, - "kind": "variable", - "name": "resolveStatus" - }, - { - "file": "components/qrPolling.test.ts", - "line": 103, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 103, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 103, - "kind": "member", - "name": "status" - }, - { - "file": "components/qrPolling.test.ts", - "line": 103, - "kind": "variable", - "name": "checkStatus" - }, - { - "file": "components/qrPolling.test.ts", - "line": 106, - "kind": "variable", - "name": "poller" - }, - { - "file": "components/qrPolling.test.ts", - "line": 123, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 124, - "kind": "variable", - "name": "gate" - }, - { - "file": "components/qrPolling.test.ts", - "line": 125, - "kind": "variable", - "name": "first" - }, - { - "file": "components/qrPolling.test.ts", - "line": 126, - "kind": "variable", - "name": "second" - }, - { - "file": "components/qrPolling.test.ts", - "line": 13, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 135, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 137, - "kind": "variable", - "name": "onPollError" - }, - { - "file": "components/qrPolling.test.ts", - "line": 138, - "kind": "variable", - "name": "observedSignal" - }, - { - "file": "components/qrPolling.test.ts", - "line": 139, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 139, - "kind": "variable", - "name": "checkStatus" - }, - { - "file": "components/qrPolling.test.ts", - "line": 141, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 141, - "kind": "member", - "name": "status" - }, - { - "file": "components/qrPolling.test.ts", - "line": 142, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 145, - "kind": "variable", - "name": "poller" - }, - { - "file": "components/qrPolling.test.ts", - "line": 15, - "kind": "variable", - "name": "checkStatus" - }, - { - "file": "components/qrPolling.test.ts", - "line": 16, - "kind": "variable", - "name": "handlers" - }, - { - "file": "components/qrPolling.test.ts", - "line": 21, - "kind": "variable", - "name": "poller" - }, - { - "file": "components/qrPolling.test.ts", - "line": 31, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 33, - "kind": "variable", - "name": "checkStatus" - }, - { - "file": "components/qrPolling.test.ts", - "line": 36, - "kind": "variable", - "name": "onSuccess" - }, - { - "file": "components/qrPolling.test.ts", - "line": 37, - "kind": "variable", - "name": "onTerminalError" - }, - { - "file": "components/qrPolling.test.ts", - "line": 38, - "kind": "variable", - "name": "poller" - }, - { - "file": "components/qrPolling.test.ts", - "line": 4, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 65, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.test.ts", - "line": 67, - "kind": "variable", - "name": "checkStatus" - }, - { - "file": "components/qrPolling.test.ts", - "line": 74, - "kind": "variable", - "name": "onVerificationRequired" - }, - { - "file": "components/qrPolling.test.ts", - "line": 75, - "kind": "variable", - "name": "onPollError" - }, - { - "file": "components/qrPolling.test.ts", - "line": 76, - "kind": "variable", - "name": "poller" - }, - { - "file": "components/qrPolling.test.ts", - "line": 8, - "kind": "variable", - "name": "flushMicrotasks" - }, - { - "file": "components/qrPolling.ts", - "line": 109, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.ts", - "line": 11, - "kind": "member", - "name": "setInterval" - }, - { - "file": "components/qrPolling.ts", - "line": 12, - "kind": "member", - "name": "clearInterval" - }, - { - "file": "components/qrPolling.ts", - "line": 16, - "kind": "member", - "name": "onSuccess" - }, - { - "file": "components/qrPolling.ts", - "line": 17, - "kind": "member", - "name": "onScanned" - }, - { - "file": "components/qrPolling.ts", - "line": 18, - "kind": "member", - "name": "onVerificationRequired" - }, - { - "file": "components/qrPolling.ts", - "line": 19, - "kind": "member", - "name": "onTerminalError" - }, - { - "file": "components/qrPolling.ts", - "line": 2, - "kind": "member", - "name": "status" - }, - { - "file": "components/qrPolling.ts", - "line": 20, - "kind": "member", - "name": "onPollError" - }, - { - "file": "components/qrPolling.ts", - "line": 23, - "kind": "variable", - "name": "terminalQRStatuses" - }, - { - "file": "components/qrPolling.ts", - "line": 28, - "kind": "variable", - "name": "generation" - }, - { - "file": "components/qrPolling.ts", - "line": 3, - "kind": "member", - "name": "cookies" - }, - { - "file": "components/qrPolling.ts", - "line": 30, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.ts", - "line": 34, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.ts", - "line": 37, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.ts", - "line": 4, - "kind": "member", - "name": "unb" - }, - { - "file": "components/qrPolling.ts", - "line": 41, - "kind": "variable", - "name": "createQRLoginPoller" - }, - { - "file": "components/qrPolling.ts", - "line": 47, - "kind": "variable", - "name": "interval" - }, - { - "file": "components/qrPolling.ts", - "line": 48, - "kind": "variable", - "name": "requestController" - }, - { - "file": "components/qrPolling.ts", - "line": 49, - "kind": "variable", - "name": "inFlightGeneration" - }, - { - "file": "components/qrPolling.ts", - "line": 5, - "kind": "member", - "name": "verification_url" - }, - { - "file": "components/qrPolling.ts", - "line": 50, - "kind": "variable", - "name": "generation" - }, - { - "file": "components/qrPolling.ts", - "line": 52, - "kind": "variable", - "name": "stop" - }, - { - "file": "components/qrPolling.ts", - "line": 6, - "kind": "member", - "name": "verification_screenshot" - }, - { - "file": "components/qrPolling.ts", - "line": 62, - "kind": "variable", - "name": "start" - }, - { - "file": "components/qrPolling.ts", - "line": 69, - "kind": "variable", - "name": "currentGeneration" - }, - { - "file": "components/qrPolling.ts", - "line": 7, - "kind": "member", - "name": "face_qr_url" - }, - { - "file": "components/qrPolling.ts", - "line": 71, - "kind": "variable", - "name": "signal" - }, - { - "file": "components/qrPolling.ts", - "line": 72, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.ts", - "line": 75, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/qrPolling.ts", - "line": 77, - "kind": "variable", - "name": "statusRes" - }, - { - "file": "components/qrPolling.ts", - "line": 95, - "kind": "variable", - "name": "error" - }, - { - "file": "components/RiskVerificationPanel.test.tsx", - "line": 6, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/RiskVerificationPanel.test.tsx", - "line": 7, - "kind": "variable", - "name": "html" - }, - { - "file": "components/RiskVerificationPanel.tsx", - "line": 5, - "kind": "member", - "name": "faceQrUrl" - }, - { - "file": "components/RiskVerificationPanel.tsx", - "line": 6, - "kind": "member", - "name": "verificationScreenshot" - }, - { - "file": "components/RiskVerificationPanel.tsx", - "line": 9, - "kind": "variable", - "name": "RiskVerificationPanel" - }, - { - "file": "components/Rules.tsx", - "line": 100, - "kind": "variable", - "name": "[editingAutomationRule, setEditingAutomationRule]" - }, - { - "file": "components/Rules.tsx", - "line": 101, - "kind": "variable", - "name": "[editingReplyRule, setEditingReplyRule]" - }, - { - "file": "components/Rules.tsx", - "line": 102, - "kind": "variable", - "name": "[defaultForm, setDefaultForm]" - }, - { - "file": "components/Rules.tsx", - "line": 1020, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1032, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1033, - "kind": "variable", - "name": "meta" - }, - { - "file": "components/Rules.tsx", - "line": 1034, - "kind": "variable", - "name": "Icon" - }, - { - "file": "components/Rules.tsx", - "line": 1035, - "kind": "variable", - "name": "selected" - }, - { - "file": "components/Rules.tsx", - "line": 1040, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1060, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1083, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 109, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 109, - "kind": "variable", - "name": "selectedAccount" - }, - { - "file": "components/Rules.tsx", - "line": 1092, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1102, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 111, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1111, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1115, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 112, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 112, - "kind": "variable", - "name": "timer" - }, - { - "file": "components/Rules.tsx", - "line": 116, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1163, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1174, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1183, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 119, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1194, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1198, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1198, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 120, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1210, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1219, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 123, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1230, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 124, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1240, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1242, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1266, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 127, - "kind": "variable", - "name": "visibleAutomationRules" - }, - { - "file": "components/Rules.tsx", - "line": 128, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 128, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1281, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1296, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1308, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1309, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1311, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 132, - "kind": "variable", - "name": "visibleAutomationIssues" - }, - { - "file": "components/Rules.tsx", - "line": 133, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1330, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1339, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1351, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 137, - "kind": "variable", - "name": "visibleDefaultAccounts" - }, - { - "file": "components/Rules.tsx", - "line": 1373, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 138, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 138, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1387, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1391, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1391, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1400, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1401, - "kind": "variable", - "name": "type" - }, - { - "file": "components/Rules.tsx", - "line": 142, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 142, - "kind": "variable", - "name": "automationPageNumbers" - }, - { - "file": "components/Rules.tsx", - "line": 1421, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1432, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 144, - "kind": "variable", - "name": "first" - }, - { - "file": "components/Rules.tsx", - "line": 1442, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 145, - "kind": "variable", - "name": "last" - }, - { - "file": "components/Rules.tsx", - "line": 1451, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 146, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1480, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 149, - "kind": "variable", - "name": "hasAutomationListFilters" - }, - { - "file": "components/Rules.tsx", - "line": 1494, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1498, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1511, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1522, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 153, - "kind": "variable", - "name": "clearAutomationListFilters" - }, - { - "file": "components/Rules.tsx", - "line": 1533, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1547, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 1554, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 161, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 161, - "kind": "variable", - "name": "modalAccountItems" - }, - { - "file": "components/Rules.tsx", - "line": 162, - "kind": "variable", - "name": "cookieID" - }, - { - "file": "components/Rules.tsx", - "line": 163, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 166, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 166, - "kind": "variable", - "name": "selectedRuleItem" - }, - { - "file": "components/Rules.tsx", - "line": 168, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 171, - "kind": "variable", - "name": "isMultiSpecRule" - }, - { - "file": "components/Rules.tsx", - "line": 172, - "kind": "variable", - "name": "currentTrigger" - }, - { - "file": "components/Rules.tsx", - "line": 173, - "kind": "variable", - "name": "currentMeta" - }, - { - "file": "components/Rules.tsx", - "line": 174, - "kind": "variable", - "name": "reviewConfig" - }, - { - "file": "components/Rules.tsx", - "line": 176, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 176, - "kind": "variable", - "name": "buildAutomationDraft" - }, - { - "file": "components/Rules.tsx", - "line": 181, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 181, - "kind": "variable", - "name": "item" - }, - { - "file": "components/Rules.tsx", - "line": 182, - "kind": "variable", - "name": "itemLabel" - }, - { - "file": "components/Rules.tsx", - "line": 199, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 199, - "kind": "variable", - "name": "openAutomationRule" - }, - { - "file": "components/Rules.tsx", - "line": 200, - "kind": "variable", - "name": "trigger" - }, - { - "file": "components/Rules.tsx", - "line": 205, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 206, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 211, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 213, - "kind": "variable", - "name": "cancelled" - }, - { - "file": "components/Rules.tsx", - "line": 215, - "kind": "variable", - "name": "openLinkedRule" - }, - { - "file": "components/Rules.tsx", - "line": 220, - "kind": "variable", - "name": "[ruleList, itemList, cardList]" - }, - { - "file": "components/Rules.tsx", - "line": 223, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 232, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 232, - "kind": "variable", - "name": "rule" - }, - { - "file": "components/Rules.tsx", - "line": 240, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 240, - "kind": "variable", - "name": "item" - }, - { - "file": "components/Rules.tsx", - "line": 252, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 264, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 267, - "kind": "variable", - "name": "openNewAutomationRule" - }, - { - "file": "components/Rules.tsx", - "line": 276, - "kind": "variable", - "name": "handleTriggerChange" - }, - { - "file": "components/Rules.tsx", - "line": 278, - "kind": "variable", - "name": "currentCardID" - }, - { - "file": "components/Rules.tsx", - "line": 279, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 280, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 283, - "kind": "variable", - "name": "itemLabel" - }, - { - "file": "components/Rules.tsx", - "line": 299, - "kind": "variable", - "name": "handleAutomationItemChange" - }, - { - "file": "components/Rules.tsx", - "line": 301, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 301, - "kind": "variable", - "name": "item" - }, - { - "file": "components/Rules.tsx", - "line": 305, - "kind": "variable", - "name": "itemLabel" - }, - { - "file": "components/Rules.tsx", - "line": 317, - "kind": "variable", - "name": "displayVariants" - }, - { - "file": "components/Rules.tsx", - "line": 321, - "kind": "variable", - "name": "updateVariant" - }, - { - "file": "components/Rules.tsx", - "line": 323, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 323, - "kind": "variable", - "name": "next" - }, - { - "file": "components/Rules.tsx", - "line": 333, - "kind": "variable", - "name": "appendDeliveryContent" - }, - { - "file": "components/Rules.tsx", - "line": 335, - "kind": "variable", - "name": "previous" - }, - { - "file": "components/Rules.tsx", - "line": 349, - "kind": "variable", - "name": "handleSaveAutomationRule" - }, - { - "file": "components/Rules.tsx", - "line": 351, - "kind": "variable", - "name": "trigger" - }, - { - "file": "components/Rules.tsx", - "line": 357, - "kind": "variable", - "name": "variants" - }, - { - "file": "components/Rules.tsx", - "line": 359, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 363, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 370, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 370, - "kind": "variable", - "name": "text" - }, - { - "file": "components/Rules.tsx", - "line": 377, - "kind": "variable", - "name": "saveVariants" - }, - { - "file": "components/Rules.tsx", - "line": 379, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 388, - "kind": "variable", - "name": "succeeded" - }, - { - "file": "components/Rules.tsx", - "line": 407, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 411, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 415, - "kind": "variable", - "name": "handleDeleteAutomation" - }, - { - "file": "components/Rules.tsx", - "line": 421, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 426, - "kind": "variable", - "name": "handleToggleAutomation" - }, - { - "file": "components/Rules.tsx", - "line": 430, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 435, - "kind": "variable", - "name": "handleResolveRunIssue" - }, - { - "file": "components/Rules.tsx", - "line": 436, - "kind": "variable", - "name": "prompt" - }, - { - "file": "components/Rules.tsx", - "line": 445, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 450, - "kind": "variable", - "name": "handleResolveDeferredIssue" - }, - { - "file": "components/Rules.tsx", - "line": 455, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 460, - "kind": "variable", - "name": "handleAddReplyRule" - }, - { - "file": "components/Rules.tsx", - "line": 477, - "kind": "variable", - "name": "handleSaveReplyRule" - }, - { - "file": "components/Rules.tsx", - "line": 479, - "kind": "variable", - "name": "hasReplyContent" - }, - { - "file": "components/Rules.tsx", - "line": 48, - "kind": "variable", - "name": "[activeTab, setActiveTab]" - }, - { - "file": "components/Rules.tsx", - "line": 487, - "kind": "variable", - "name": "succeeded" - }, - { - "file": "components/Rules.tsx", - "line": 49, - "kind": "variable", - "name": "[selectedAccountId, setSelectedAccountId]" - }, - { - "file": "components/Rules.tsx", - "line": 494, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 497, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 50, - "kind": "variable", - "name": "[automationSearch, setAutomationSearch]" - }, - { - "file": "components/Rules.tsx", - "line": 501, - "kind": "variable", - "name": "handleDeleteReply" - }, - { - "file": "components/Rules.tsx", - "line": 507, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 51, - "kind": "variable", - "name": "[debouncedAutomationSearch, setDebouncedAutomationSearch]" - }, - { - "file": "components/Rules.tsx", - "line": 512, - "kind": "variable", - "name": "openDefaultReplyModal" - }, - { - "file": "components/Rules.tsx", - "line": 518, - "kind": "variable", - "name": "data" - }, - { - "file": "components/Rules.tsx", - "line": 52, - "kind": "variable", - "name": "[automationTriggerFilter, setAutomationTriggerFilter]" - }, - { - "file": "components/Rules.tsx", - "line": 53, - "kind": "variable", - "name": "[automationStatusFilter, setAutomationStatusFilter]" - }, - { - "file": "components/Rules.tsx", - "line": 538, - "kind": "variable", - "name": "handleSaveDefaultReply" - }, - { - "file": "components/Rules.tsx", - "line": 54, - "kind": "variable", - "name": "[automationPage, setAutomationPage]" - }, - { - "file": "components/Rules.tsx", - "line": 549, - "kind": "variable", - "name": "succeeded" - }, - { - "file": "components/Rules.tsx", - "line": 55, - "kind": "variable", - "name": "[automationPageSize, setAutomationPageSize]" - }, - { - "file": "components/Rules.tsx", - "line": 561, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 564, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 568, - "kind": "variable", - "name": "handleDeleteDefaultReply" - }, - { - "file": "components/Rules.tsx", - "line": 57, - "kind": "variable", - "name": "rulesData" - }, - { - "file": "components/Rules.tsx", - "line": 574, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 579, - "kind": "variable", - "name": "handleClearDefaultReplyRecords" - }, - { - "file": "components/Rules.tsx", - "line": 584, - "kind": "variable", - "name": "error" - }, - { - "file": "components/Rules.tsx", - "line": 589, - "kind": "variable", - "name": "primaryActionLabel" - }, - { - "file": "components/Rules.tsx", - "line": 605, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 612, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 624, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 624, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 639, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 640, - "kind": "variable", - "name": "Icon" - }, - { - "file": "components/Rules.tsx", - "line": 644, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 662, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 663, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 674, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 675, - "kind": "variable", - "name": "meta" - }, - { - "file": "components/Rules.tsx", - "line": 676, - "kind": "variable", - "name": "Icon" - }, - { - "file": "components/Rules.tsx", - "line": 68, - "kind": "variable", - "name": "{\n automationRules,\n automationIssues,\n replyRules,\n defaultReplies,\n accounts,\n cards,\n items,\n loading,\n setLoading,\n automationTotal,\n automationTotalPages,\n automationTriggerCounts,\n setAutomationRules,\n setCards,\n setItems,\n loadReferenceData,\n loadAutomationRules,\n loadReplyRules,\n loadDefaultReplies,\n refresh,\n }" - }, - { - "file": "components/Rules.tsx", - "line": 681, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 705, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 706, - "kind": "variable", - "name": "meta" - }, - { - "file": "components/Rules.tsx", - "line": 707, - "kind": "variable", - "name": "Icon" - }, - { - "file": "components/Rules.tsx", - "line": 732, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 744, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 751, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 757, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 797, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 798, - "kind": "variable", - "name": "meta" - }, - { - "file": "components/Rules.tsx", - "line": 799, - "kind": "variable", - "name": "Icon" - }, - { - "file": "components/Rules.tsx", - "line": 824, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 831, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 837, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 859, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 865, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 873, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 873, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 880, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 885, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 896, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 896, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 91, - "kind": "variable", - "name": "[showAutomationModal, setShowAutomationModal]" - }, - { - "file": "components/Rules.tsx", - "line": 917, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 92, - "kind": "variable", - "name": "[showReplyModal, setShowReplyModal]" - }, - { - "file": "components/Rules.tsx", - "line": 93, - "kind": "variable", - "name": "[showDefaultModal, setShowDefaultModal]" - }, - { - "file": "components/Rules.tsx", - "line": 930, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 939, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 957, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 958, - "kind": "variable", - "name": "defaultReply" - }, - { - "file": "components/Rules.tsx", - "line": 959, - "kind": "variable", - "name": "enabled" - }, - { - "file": "components/Rules.tsx", - "line": 983, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 992, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Rules.tsx", - "line": 997, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 114, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 139, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 152, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 158, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 172, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 173, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 177, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 186, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 186, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 196, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 200, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 218, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 262, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 274, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 280, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 293, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 324, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 337, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 342, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 355, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 360, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 370, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 64, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 86, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 89, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Settings.tsx", - "line": 99, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Sidebar.tsx", - "line": 12, - "kind": "member", - "name": "activeTab" - }, - { - "file": "components/Sidebar.tsx", - "line": 13, - "kind": "member", - "name": "isAdmin" - }, - { - "file": "components/Sidebar.tsx", - "line": 14, - "kind": "member", - "name": "collapsed" - }, - { - "file": "components/Sidebar.tsx", - "line": 15, - "kind": "member", - "name": "onToggleCollapsed" - }, - { - "file": "components/Sidebar.tsx", - "line": 16, - "kind": "member", - "name": "onNavigate" - }, - { - "file": "components/Sidebar.tsx", - "line": 17, - "kind": "member", - "name": "onLogout" - }, - { - "file": "components/Sidebar.tsx", - "line": 20, - "kind": "variable", - "name": "Sidebar" - }, - { - "file": "components/Sidebar.tsx", - "line": 23, - "kind": "variable", - "name": "[buildInfo, setBuildInfo]" - }, - { - "file": "components/Sidebar.tsx", - "line": 25, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Sidebar.tsx", - "line": 29, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Sidebar.tsx", - "line": 33, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Sidebar.tsx", - "line": 36, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Sidebar.tsx", - "line": 39, - "kind": "variable", - "name": "menuItems" - }, - { - "file": "components/Sidebar.tsx", - "line": 50, - "kind": "variable", - "name": "displayVersion" - }, - { - "file": "components/Sidebar.tsx", - "line": 67, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/Sidebar.tsx", - "line": 68, - "kind": "variable", - "name": "Icon" - }, - { - "file": "components/Sidebar.tsx", - "line": 69, - "kind": "variable", - "name": "active" - }, - { - "file": "components/Sidebar.tsx", - "line": 77, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 10, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 11, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 20, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 22, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 23, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 26, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 4, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 6, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 7, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/sidebarState.test.ts", - "line": 8, - "kind": "variable", - "name": "values" - }, - { - "file": "components/sidebarState.ts", - "line": 1, - "kind": "variable", - "name": "storageKey" - }, - { - "file": "components/sidebarState.ts", - "line": 11, - "kind": "variable", - "name": "writeSidebarCollapsed" - }, - { - "file": "components/sidebarState.ts", - "line": 3, - "kind": "variable", - "name": "readSidebarCollapsed" - }, - { - "file": "components/SquareQRCode.test.tsx", - "line": 6, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/SquareQRCode.test.tsx", - "line": 7, - "kind": "variable", - "name": "html" - }, - { - "file": "components/SquareQRCode.tsx", - "line": 4, - "kind": "member", - "name": "src" - }, - { - "file": "components/SquareQRCode.tsx", - "line": 5, - "kind": "member", - "name": "alt" - }, - { - "file": "components/SquareQRCode.tsx", - "line": 6, - "kind": "member", - "name": "className" - }, - { - "file": "components/SquareQRCode.tsx", - "line": 9, - "kind": "variable", - "name": "SquareQRCode" - }, - { - "file": "components/YdisksLogo.test.tsx", - "line": 14, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/YdisksLogo.test.tsx", - "line": 15, - "kind": "variable", - "name": "html" - }, - { - "file": "components/YdisksLogo.test.tsx", - "line": 6, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/YdisksLogo.test.tsx", - "line": 7, - "kind": "function-expression", - "name": "anonymous" - }, - { - "file": "components/YdisksLogo.test.tsx", - "line": 8, - "kind": "variable", - "name": "html" - }, - { - "file": "components/YdisksLogo.tsx", - "line": 12, - "kind": "variable", - "name": "YdisksLogo" - }, - { - "file": "components/YdisksLogo.tsx", - "line": 20, - "kind": "variable", - "name": "YdisksBrandIcon" - }, - { - "file": "components/YdisksLogo.tsx", - "line": 4, - "kind": "member", - "name": "className" - }, - { - "file": "components/YdisksLogo.tsx", - "line": 8, - "kind": "member", - "name": "sizeClass" - }, - { - "file": "components/YdisksLogo.tsx", - "line": 9, - "kind": "member", - "name": "logoClassName" - }, { "file": "dateRange.test.ts", "line": 11, diff --git a/docs/architecture/refactoring-master-plan.md b/docs/architecture/refactoring-master-plan.md index 15bd3a6..bc21af6 100644 --- a/docs/architecture/refactoring-master-plan.md +++ b/docs/architecture/refactoring-master-plan.md @@ -626,3 +626,4 @@ npm --prefix frontend run build | 2026-08-15 | 完成阶段 9 第四个 PR 切片“旧路由与剩余兼容字段最终审计” | 新增 API 兼容边界清单,明确旧服务端入口的保留条件、复用 handler 约束和删除证据要求;新增 React 架构测试,禁止生产 API 适配层重新调用未版本化 `/api/...` 路径;服务端新旧入口契约测试继续覆盖兼容行为,前端 185 个测试、类型检查和注释门禁通过并合并为一个可回滚提交 | 阶段 10:注释基线清零与严格门禁 | | 2026-08-15 | 完成阶段 10 第一个 PR 切片“前端共享 types.ts 注释基线清零” | 为分页、会话、账号、聊天、订单、卡券、商品、自动化规则、统计、设置、AI、默认回复和通知 DTO 的全部字段补齐准确中文注释,解释字段职责、敏感性、状态和时间/数量单位;`frontend/types.ts` 历史注释基线清零,前端注释门禁、类型检查、185 个测试和生产构建通过并合并为一个可回滚提交 | 阶段 10:前端 services/api.ts 注释基线清零 | | 2026-08-15 | 完成阶段 10 第二个 PR 切片“前端 services/api.ts 注释基线清零” | 为 API 适配层全部导出函数、局部变量、请求参数和内联响应字段补齐中文注释,明确认证、账号、聊天、订单、商品、卡密、自动化、设置和通知接口的数据职责;增强注释检查器对调用参数、类型字面量和循环变量内联注释的识别能力,`services/api.ts` 注释基线清零;前端注释门禁、类型检查和 185 个测试通过并合并为一个可回滚提交 | 阶段 10:前端 components/hooks 注释基线按领域清零 | +| 2026-08-15 | 完成阶段 10 第三个 PR 切片“前端 components/hooks 注释基线按领域清零” | 为账号、聊天、仪表盘、设置、规则、商品、卡密、订单、通知和二维码等组件、Hook、状态模块及其测试补齐函数、变量、回调和字段中文注释;补强注释检查器对箭头函数主体内联注释的识别,保持路由源码断言和 JSX 行为不变;目标目录注释基线清零,前端注释门禁、类型检查、185 个测试和生产构建通过并合并为一个可回滚提交 | 阶段 10:Go 核心领域注释基线按领域清零 | diff --git a/frontend/app/features/accountAutomation/hooks.ts b/frontend/app/features/accountAutomation/hooks.ts index b7a0669..688438f 100644 --- a/frontend/app/features/accountAutomation/hooks.ts +++ b/frontend/app/features/accountAutomation/hooks.ts @@ -19,7 +19,7 @@ export type UseAccountAutomationResult = AccountAutomationState & { /** 管理账号自动评价和自动擦亮的设置、执行、取消与重试。 */ export const useAccountAutomation = ({ account, onSaved }: AccountAutomationOptions): UseAccountAutomationResult => { // form 保存当前账号任务设置草稿。 - const [form, setForm] = useState(() => buildAccountTaskDefaults(account)); + const [form, setForm] = useState(/* 当前回调处理用户交互或异步状态变化。 */ () => buildAccountTaskDefaults(account)); // loading 表示账号任务设置是否正在读取。 const [loading, setLoading] = useState(true); // saving 表示任务设置是否正在保存。 @@ -37,9 +37,11 @@ export const useAccountAutomation = ({ account, onSaved }: AccountAutomationOpti // requestController 保存当前账号任务请求控制器。 const requestController = useRef(null); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { + // sequence 请求序号。 const sequence = ++requestSequence.current; requestController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); requestController.current = controller; setForm(buildAccountTaskDefaults(account)); @@ -49,38 +51,41 @@ export const useAccountAutomation = ({ account, onSaved }: AccountAutomationOpti setRunning(''); setRetryAction(null); setLoading(true); - getAccountTaskSettings(account.id, { signal: controller.signal }).then(settings => { + getAccountTaskSettings(account.id, { signal: controller.signal }).then(/* 当前回调处理异步操作结果。 */ settings => { if (!isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal)) return; setForm(settings); - }).catch(loadError => { + }).catch(/* 当前回调处理异步操作结果。 */ loadError => { if (isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal) && !isAccountTaskAbortError(loadError)) setError(accountTaskErrorMessage(loadError, '加载任务设置失败')); - }).finally(() => { + }).finally(/* 当前回调处理异步操作结果。 */ () => { if (isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal)) setLoading(false); }); - return () => controller.abort(); + return /* 当前回调处理用户交互或异步状态变化。 */ () => controller.abort(); }, [account.id]); - useEffect(() => () => requestController.current?.abort(), []); + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => /* 当前回调同步 React 副作用和资源生命周期。 */ () => requestController.current?.abort(), []); /** 保存任务设置并在成功后同步账号列表。 */ - const save = useCallback(async (): Promise => { + const save = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!canStartAccountTask(saving, running)) return; + // sequence 请求序号。 const sequence = ++requestSequence.current; requestController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); requestController.current = controller; setSaving(true); setError(''); setRetryAction(null); try { + // stored 已保存数据。 const stored = await updateAccountTaskSettings(account.id, form, { signal: controller.signal }); if (!isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal)) return; setForm(stored); onSaved(stored); - } catch (saveError) { + } catch (/* saveError 表示保存错误。 */ saveError) { if (isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal) && !isAccountTaskAbortError(saveError)) { setError(accountTaskErrorMessage(saveError, '保存失败')); - setRetryAction(() => save); + setRetryAction(/* 当前回调处理用户交互或异步状态变化。 */ () => save); } } finally { if (isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal)) setSaving(false); @@ -88,10 +93,12 @@ export const useAccountAutomation = ({ account, onSaved }: AccountAutomationOpti }, [account.id, form, onSaved, running, saving]); /** 保存设置后立即执行指定账号任务并刷新结果。 */ - const run = useCallback(async (taskType: AccountTaskType): Promise => { + const run = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (taskType: AccountTaskType): Promise => { if (!canStartAccountTask(saving, running) || !account.enabled) return; + // sequence 请求序号。 const sequence = ++requestSequence.current; requestController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); requestController.current = controller; setRunning(taskType); @@ -100,16 +107,18 @@ export const useAccountAutomation = ({ account, onSaved }: AccountAutomationOpti setRetryAction(null); try { await updateAccountTaskSettings(account.id, form, { signal: controller.signal }); + // result 处理结果。 const result = await runAccountTask(account.id, taskType, { signal: controller.signal }); + // stored 已保存数据。 const stored = await getAccountTaskSettings(account.id, { signal: controller.signal }); if (!isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal)) return; setSummary(result.summary); setForm(stored); onSaved(stored); - } catch (runError) { + } catch (/* runError 表示执行错误。 */ runError) { if (isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal) && !isAccountTaskAbortError(runError)) { setError(accountTaskErrorMessage(runError, '任务执行失败')); - setRetryAction(() => () => run(taskType)); + setRetryAction(/* 当前回调处理用户交互或异步状态变化。 */ () => /* 当前回调处理用户交互或异步状态变化。 */ () => run(taskType)); } } finally { if (isCurrentAccountTaskRequest(requestSequence.current, sequence, controller.signal)) setRunning(''); @@ -117,7 +126,7 @@ export const useAccountAutomation = ({ account, onSaved }: AccountAutomationOpti }, [account.enabled, account.id, form, onSaved, running, saving]); /** 重试最近一次保存或执行动作。 */ - const retry = useCallback(async (): Promise => { + const retry = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (retryAction) await retryAction(); }, [retryAction]); diff --git a/frontend/app/features/accountAutomation/state.test.ts b/frontend/app/features/accountAutomation/state.test.ts index 030152f..aa95bbe 100644 --- a/frontend/app/features/accountAutomation/state.test.ts +++ b/frontend/app/features/accountAutomation/state.test.ts @@ -16,6 +16,7 @@ test('账号任务默认设置继承账号配置并保持安全文案', test('账号任务阻断重复提交并拒绝过期响应', // 动作边界测试验证保存或执行中不会重复发起任务,账号切换后的旧响应不能写入。 () => { + // controller 请求取消控制器。 const controller = new AbortController(); expect(canStartAccountTask(false, '')).toBe(true); expect(canStartAccountTask(true, '')).toBe(false); diff --git a/frontend/app/features/accounts/runtime.test.ts b/frontend/app/features/accounts/runtime.test.ts index f252bd0..56ebea7 100644 --- a/frontend/app/features/accounts/runtime.test.ts +++ b/frontend/app/features/accounts/runtime.test.ts @@ -11,8 +11,8 @@ const account = (overrides: Partial = {}): AccountDetail => ({ ...overrides, }); -describe('Accounts runtime state', () => { - test('最新在线状态替换风控恢复中的旧提示', () => { +describe('Accounts runtime state', /* 当前回调处理用户交互或异步状态变化。 */ () => { + test('最新在线状态替换风控恢复中的旧提示', /* 当前回调处理用户交互或异步状态变化。 */ () => { // result 是合并当前运行状态后的账号列表。 const result = mergeAccountRuntimeStatuses([account({ runtime_state: 'connecting', @@ -31,13 +31,14 @@ describe('Accounts runtime state', () => { expect(result[0]).toMatchObject({ runtime_state: 'online', runtime_message: '消息服务连接正常', runtime_connected: true }); }); - test('晚到达的旧状态响应不会覆盖当前账号状态', () => { + test('晚到达的旧状态响应不会覆盖当前账号状态', /* 当前回调处理用户交互或异步状态变化。 */ () => { // current 是当前页面已经展示的较新账号状态。 const current = account({ runtime_state: 'online', runtime_message: '消息服务连接正常', runtime_updated_at: '2026-07-13T13:16:02+08:00', }); + // result 处理结果。 const result = mergeAccountRuntimeStatuses([current], { 'account-1': { state: 'connecting', @@ -51,7 +52,7 @@ describe('Accounts runtime state', () => { expect(result[0]).toBe(current); }); - test('缺少对应运行状态时保留原账号对象', () => { + test('缺少对应运行状态时保留原账号对象', /* 当前回调处理用户交互或异步状态变化。 */ () => { // current 是没有新运行状态可合并的账号对象。 const current = account(); expect(mergeAccountRuntimeStatuses([current], {})[0]).toBe(current); diff --git a/frontend/app/features/accounts/state.test.ts b/frontend/app/features/accounts/state.test.ts index 7a15cfa..73dfa6e 100644 --- a/frontend/app/features/accounts/state.test.ts +++ b/frontend/app/features/accounts/state.test.ts @@ -29,7 +29,9 @@ test('账号切换后只接受当前请求代次和账号的响应', test('编辑子模块共享同一账号边界,旧绑定、AI 和密码登录响应全部失效', // 三类异步子模块都使用相同的代次与账号判定,防止旧弹窗响应污染新账号。 () => { + // currentGeneration 当前请求代次,负责当前功能中的对应处理。 const currentGeneration = 4; + // currentAccountId 当前账号标识,负责当前功能中的对应处理。 const currentAccountId = 'account-4'; expect(isCurrentAccountRequest(3, currentGeneration, 'account-3', currentAccountId)).toBe(false); expect(isCurrentAccountRequest(currentGeneration, currentGeneration, currentAccountId, currentAccountId)).toBe(true); diff --git a/frontend/app/features/accounts/submoduleHooks.ts b/frontend/app/features/accounts/submoduleHooks.ts index a994fee..53acf5e 100644 --- a/frontend/app/features/accounts/submoduleHooks.ts +++ b/frontend/app/features/accounts/submoduleHooks.ts @@ -69,7 +69,7 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 清理密码登录轮询定时器。 */ // clearPasswordTimerCallback 是 React 稳定的定时器清理函数。 - const clearPasswordTimer = useCallback(() => { + const clearPasswordTimer = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ () => { if (passwordTimer.current !== null) { window.clearTimeout(passwordTimer.current); passwordTimer.current = null; @@ -78,7 +78,7 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 加载当前账号通知渠道和绑定关系,并隔离过期响应。 */ // loadNotificationBindingsCallback 是通知绑定加载回调。 - const loadNotificationBindings = useCallback(async (accountId: string): Promise => { + const loadNotificationBindings = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (accountId: string): Promise => { // sequence 是通知绑定请求的递增代次。 const sequence = ++bindingsSequence.current; bindingsAbort.current?.abort(); @@ -104,14 +104,14 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 切换一个通知渠道绑定。 */ // toggleNotificationChannelCallback 是通知渠道切换回调。 - const toggleNotificationChannel = useCallback((channelId: number) => { - setSelectedChannelIds(current => current.includes(channelId) ? current.filter(id => id !== channelId) : [...current, channelId]); + const toggleNotificationChannel = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ (channelId: number) => { + setSelectedChannelIds(/* 当前回调处理集合中的单个元素。 */ current => current.includes(channelId) ? current.filter(/* 当前回调处理集合中的单个元素。 */ id => id !== channelId) : [...current, channelId]); setBindingsDirty(true); }, []); /** 打开账号编辑弹窗并并行读取绑定和长登录状态。 */ // openEditModalCallback 是账号编辑弹窗打开回调。 - const openEditModal = useCallback(async (account: AccountDetail): Promise => { + const openEditModal = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (account: AccountDetail): Promise => { // longLoginRequest 是当前长登录读取请求代次。 const longLoginRequest = ++longLoginSequence.current; longLoginAbort.current?.abort(); @@ -136,24 +136,24 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 切换官方长登录设置。 */ // handleLongLoginToggleCallback 是长登录设置切换回调。 - const handleLongLoginToggle = useCallback(async (): Promise => { + const handleLongLoginToggle = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!editingAccount || longLogin.loading || longLogin.saving || !longLogin.canOpen) return; // enabled 是本次准备提交的长登录开关值。 const enabled = !longLogin.enabled; - setLongLogin(current => ({ ...current, saving: true, error: '' })); + setLongLogin(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, saving: true, error: '' })); try { // result 保存长登录设置接口返回值。 const result = await setLongLoginSettings(editingAccount.id, enabled); setLongLogin({ loading: false, saving: false, canOpen: result.can_open_long_login, enabled: result.enabled, error: '' }); - } catch (error) { + } catch (/* error 表示错误。 */ error) { // error 保存长登录设置保存失败原因。 - setLongLogin(current => ({ ...current, saving: false, error: error instanceof Error ? error.message : '保存登录信息设置失败' })); + setLongLogin(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, saving: false, error: error instanceof Error ? error.message : '保存登录信息设置失败' })); } }, [editingAccount, longLogin]); /** 打开 AI 设置并隔离过期账号响应。 */ // openAIModalCallback 是 AI 设置弹窗打开回调。 - const openAIModal = useCallback(async (account: AccountDetail): Promise => { + const openAIModal = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (account: AccountDetail): Promise => { // sequence 是 AI 设置请求的递增代次。 const sequence = ++aiSequence.current; aiAbort.current?.abort(); @@ -168,7 +168,7 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct const settings = await getAccountAISettings(account.id, { signal: controller.signal }); if (!isCurrentAccountRequest(sequence, aiSequence.current, account.id, account.id)) return; setAiSettings({ ai_enabled: settings.ai_enabled ?? false, max_discount_percent: settings.max_discount_percent ?? 10, max_discount_amount: settings.max_discount_amount ?? 100, max_bargain_rounds: settings.max_bargain_rounds ?? 3, custom_prompts: settings.custom_prompts ?? '' }); - } catch (error) { + } catch (/* error 表示错误。 */ error) { // error 保存 AI 设置读取失败原因。 if (isCurrentAccountRequest(sequence, aiSequence.current, account.id, account.id)) console.error('加载 AI 设置失败:', error); } finally { @@ -178,14 +178,14 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 保存 AI 设置并刷新账号列表。 */ // handleSaveAISettingsCallback 是 AI 设置保存回调。 - const handleSaveAISettings = useCallback(async (): Promise => { + const handleSaveAISettings = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!editingAccount || saving) return; setSaving(true); try { await updateAccountAISettings(editingAccount.id, aiSettings); setActiveModal(null); await loadAccounts(); - } catch (error) { + } catch (/* error 表示错误。 */ error) { // error 保存 AI 设置保存失败原因。 console.error('更新 AI 设置失败:', error); } finally { setSaving(false); } @@ -193,7 +193,7 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 保存账号编辑表单和通知绑定。 */ // handleSaveEditCallback 是账号编辑表单保存回调。 - const handleSaveEdit = useCallback(async (): Promise => { + const handleSaveEdit = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!editingAccount || saving) return; setSaving(true); try { @@ -210,7 +210,7 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct if (Object.keys(payload).length > 0) await updateAccountSettings(editingAccount.id, payload); setActiveModal(null); await loadAccounts(); - } catch (error) { + } catch (/* error 表示错误。 */ error) { // error 保存账号编辑保存失败原因。 console.error('更新账号失败:', error); } finally { setSaving(false); } @@ -218,21 +218,21 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 按当前暂停时长重新暂停账号。 */ // handleRestartPauseCallback 是重新暂停账号回调。 - const handleRestartPause = useCallback(async (): Promise => { + const handleRestartPause = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!editingAccount || editForm.pause_duration <= 0 || saving) return; setSaving(true); try { // result 保存重新暂停接口返回的账号状态。 const result = await updateAccountPauseDuration(editingAccount.id, editForm.pause_duration); - setEditingAccount(current => current ? { ...current, pause_duration: editForm.pause_duration, paused: result?.paused === true, paused_until: Number(result?.paused_until || 0) } : current); + setEditingAccount(/* 当前回调处理用户交互或异步状态变化。 */ current => current ? { ...current, pause_duration: editForm.pause_duration, paused: result?.paused === true, paused_until: Number(result?.paused_until || 0) } : current); await loadAccounts(); - } catch (error) { console.error('重新暂停失败:', error); } + } catch (/* error 表示错误。 */ error) { console.error('重新暂停失败:', error); } finally { setSaving(false); } }, [editForm.pause_duration, editingAccount, loadAccounts, saving, setEditingAccount]); /** 按账号和请求代次轮询密码登录状态。 */ // pollPasswordLoginCallback 是密码登录状态轮询回调。 - const pollPasswordLogin = useCallback(async (sessionId: string, generation: number, accountId: string): Promise => { + const pollPasswordLogin = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (sessionId: string, generation: number, accountId: string): Promise => { passwordAbort.current?.abort(); // controller 控制当前密码登录状态查询的取消。 const controller = new AbortController(); @@ -246,19 +246,19 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct if (result.status === 'success') { clearPasswordTimer(); setPasswordLoginView(nextView); - setEditForm(current => ({ ...current, login_password: '', showLoginPassword: false })); + setEditForm(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, login_password: '', showLoginPassword: false })); await loadAccounts(); return; } if (result.status === 'processing' || result.status === 'verification_required') { setPasswordLoginView(nextView); clearPasswordTimer(); - passwordTimer.current = window.setTimeout(() => void pollPasswordLogin(sessionId, generation, accountId), 1500); + passwordTimer.current = window.setTimeout(/* 当前回调处理用户交互或异步状态变化。 */ () => void pollPasswordLogin(sessionId, generation, accountId), 1500); return; } clearPasswordTimer(); setPasswordLoginView(nextView); - } catch (error) { + } catch (/* error 表示错误。 */ error) { // error 保存密码登录状态查询失败原因。 if (!isCurrentAccountRequest(generation, passwordGeneration.current, accountId, passwordAccount.current)) return; clearPasswordTimer(); @@ -268,7 +268,7 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 启动账号密码登录刷新授权。 */ // handlePasswordLoginCallback 是密码登录启动回调。 - const handlePasswordLogin = useCallback(async (): Promise => { + const handlePasswordLogin = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!editingAccount) return; // accountName 是本次登录使用的闲鱼账号名。 const accountName = editForm.username.trim(); @@ -289,7 +289,7 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct if (!result.success || !result.session_id) throw new Error(result.message || '无法启动密码登录'); setPasswordLoginView({ sessionId: result.session_id, status: 'processing', message: result.message || '登录处理中', qrCodeUrl: '' }); await pollPasswordLogin(result.session_id, generation, editingAccount.id); - } catch (error) { + } catch (/* error 表示错误。 */ error) { // error 保存密码登录启动失败原因。 if (!isCurrentAccountRequest(generation, passwordGeneration.current, editingAccount.id, passwordAccount.current)) return; setPasswordLoginView({ sessionId: '', status: 'failed', message: error instanceof Error ? error.message : '启动密码登录失败', qrCodeUrl: '' }); @@ -298,20 +298,20 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 取消当前密码登录会话。 */ // handleCancelPasswordLoginCallback 是密码登录取消回调。 - const handleCancelPasswordLogin = useCallback(async (): Promise => { + const handleCancelPasswordLogin = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { // sessionId 是当前待取消的密码登录会话。 const sessionId = passwordLoginView.sessionId; passwordGeneration.current += 1; passwordAccount.current = ''; passwordAbort.current?.abort(); clearPasswordTimer(); - if (sessionId) await cancelPasswordLogin(sessionId).catch(() => undefined); + if (sessionId) await cancelPasswordLogin(sessionId).catch(/* 当前回调处理异步操作结果。 */ () => undefined); setPasswordLoginView({ sessionId: '', status: 'idle', message: '', qrCodeUrl: '' }); }, [clearPasswordTimer, passwordLoginView.sessionId]); /** 关闭编辑弹窗并取消未完成的子模块请求。 */ // closeEditModalCallback 是编辑弹窗关闭回调。 - const closeEditModal = useCallback(async (): Promise => { + const closeEditModal = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { bindingsAbort.current?.abort(); longLoginSequence.current += 1; longLoginAbort.current?.abort(); @@ -322,14 +322,14 @@ export const useAccountSubmodules = ({ editingAccount, setEditingAccount, setAct /** 关闭 AI 设置弹窗并取消读取请求。 */ // closeAIModalCallback 是 AI 设置弹窗关闭回调。 - const closeAIModal = useCallback(() => { + const closeAIModal = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ () => { aiSequence.current += 1; aiAbort.current?.abort(); setActiveModal(null); }, [setActiveModal]); // cleanupSubmodulesEffect 在 Hook 卸载时取消所有子模块请求。 - useEffect(() => () => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => /* 当前回调同步 React 副作用和资源生命周期。 */ () => { bindingsAbort.current?.abort(); longLoginAbort.current?.abort(); aiAbort.current?.abort(); diff --git a/frontend/app/features/chat/hooks.ts b/frontend/app/features/chat/hooks.ts index be573d8..08ae0d5 100644 --- a/frontend/app/features/chat/hooks.ts +++ b/frontend/app/features/chat/hooks.ts @@ -137,71 +137,87 @@ export const useChat = (): UseChatResult => { // sendController 保存当前消息发送控制器。 const sendController = useRef(null); - useEffect(() => { activeAccountRef.current = activeAccountID; }, [activeAccountID]); - useEffect(() => { activeChatRef.current = activeChatID; }, [activeChatID]); + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { activeAccountRef.current = activeAccountID; }, [activeAccountID]); + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { activeChatRef.current = activeChatID; }, [activeChatID]); /** 刷新指定账号的联系人列表,并丢弃过期响应。 */ - const reloadSessions = useCallback(async (accountID: string): Promise => { + const reloadSessions = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (accountID: string): Promise => { + // sequence 请求序号。 const sequence = ++sessionSequence.current; sessionController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); sessionController.current = controller; try { + // page 页码。 const page = await getChatSessionPage(accountID, undefined, { signal: controller.signal }, true); if (!isCurrentChatRequest(sessionSequence.current, sequence, controller.signal)) return []; - setSessionsByAccount(current => ({ ...current, [accountID]: page.sessions })); - setContactCursors(current => ({ ...current, [accountID]: page.next_cursor })); - setHasMoreContacts(current => ({ ...current, [accountID]: page.has_more })); + setSessionsByAccount(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, [accountID]: page.sessions })); + setContactCursors(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, [accountID]: page.next_cursor })); + setHasMoreContacts(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, [accountID]: page.has_more })); return page.sessions; - } catch (error) { + } catch (/* error 表示错误。 */ error) { if (isCurrentChatRequest(sessionSequence.current, sequence, controller.signal) && !isChatAbortError(error)) setError(error instanceof Error ? error.message : '同步会话失败'); return []; } }, []); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { + // controller 请求取消控制器。 const controller = new AbortController(); + // load 加载当前数据。 const load = async (): Promise => { setLoading(true); try { + // [details, 解构得到当前 Hook 返回的状态和操作函数。 const [details, statuses] = await Promise.all([ getAccountDetails({ signal: controller.signal }), getAccountRuntimeStatuses({ signal: controller.signal }), ]); - const withRuntime = details.map(account => ({ + // withRuntime with运行状态,负责当前功能中的对应处理。 + const withRuntime = details.map(/* 当前回调处理集合中的单个元素。 */ account => ({ ...account, runtime_state: statuses[account.id]?.state || (account.enabled ? 'connecting' : 'disabled'), runtime_connected: statuses[account.id]?.connected === true, })); - const enabled = withRuntime.filter(account => account.enabled); - const sessionPages = await Promise.all(enabled.map(async account => [account.id, await getChatSessionPage(account.id, undefined, { signal: controller.signal })] as const)); + // enabled 启用状态。 + const enabled = withRuntime.filter(/* 当前回调处理集合中的单个元素。 */ account => account.enabled); + // sessionPages 会话Pages,负责当前功能中的对应处理。 + const sessionPages = await Promise.all(enabled.map(/* 当前回调处理集合中的单个元素。 */ async account => [account.id, await getChatSessionPage(account.id, undefined, { signal: controller.signal })] as const)); if (controller.signal.aborted) return; setAccounts(enabled); - setSessionsByAccount(Object.fromEntries(sessionPages.map(([id, page]) => [id, page.sessions]))); - setContactCursors(Object.fromEntries(sessionPages.map(([id, page]) => [id, page.next_cursor]))); - setHasMoreContacts(Object.fromEntries(sessionPages.map(([id, page]) => [id, page.has_more]))); + setSessionsByAccount(Object.fromEntries(sessionPages.map(/* 当前回调处理集合中的单个元素。 */ ([id, page]) => [id, page.sessions]))); + setContactCursors(Object.fromEntries(sessionPages.map(/* 当前回调处理集合中的单个元素。 */ ([id, page]) => [id, page.next_cursor]))); + setHasMoreContacts(Object.fromEntries(sessionPages.map(/* 当前回调处理集合中的单个元素。 */ ([id, page]) => [id, page.has_more]))); + // stored 已保存数据。 const stored = window.localStorage.getItem('ydisks.chat.account.v1') || ''; - const first = enabled.some(account => account.id === stored) ? stored : enabled[0]?.id || ''; + // first 首项。 + const first = enabled.some(/* 当前回调处理集合中的单个元素。 */ account => account.id === stored) ? stored : enabled[0]?.id || ''; setActiveAccountID(first); - } catch (loadError) { + } catch (/* loadError 表示加载错误。 */ loadError) { if (!controller.signal.aborted) setError(loadError instanceof Error ? loadError.message : '加载聊天数据失败'); } finally { if (!controller.signal.aborted) setLoading(false); } }; void load(); - return () => controller.abort(); + return /* 当前回调处理用户交互或异步状态变化。 */ () => controller.abort(); }, []); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { + // disposed disposed,负责当前功能中的对应处理。 let disposed = false; + // timer 定时器。 let timer = 0; + // controller 请求取消控制器。 let controller: AbortController | null = null; + // poll 轮询函数。 const poll = async (): Promise => { controller = new AbortController(); try { + // statuses statuses,负责当前功能中的对应处理。 const statuses = await getAccountRuntimeStatuses({ signal: controller.signal, timeoutMs: 10_000 }); - if (!disposed) setAccounts(current => current.map(account => ({ + if (!disposed) setAccounts(/* 当前回调处理集合中的单个元素。 */ current => current.map(/* 当前回调处理集合中的单个元素。 */ account => ({ ...account, runtime_state: statuses[account.id]?.state || account.runtime_state, runtime_connected: statuses[account.id]?.connected ?? account.runtime_connected, @@ -213,65 +229,68 @@ export const useChat = (): UseChatResult => { } }; timer = window.setTimeout(poll, 3_000); - return () => { + return /* 当前回调处理用户交互或异步状态变化。 */ () => { disposed = true; window.clearTimeout(timer); controller?.abort(); }; }, []); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { if (!activeAccountID) return; window.localStorage.setItem('ydisks.chat.account.v1', activeAccountID); + // sessions 会话列表。 const sessions = sessionsByAccount[activeAccountID] || []; - setActiveChatID(current => sessions.some(session => session.chat_id === current) ? current : sessions[0]?.chat_id || ''); + setActiveChatID(/* 当前回调处理集合中的单个元素。 */ current => sessions.some(/* 当前回调处理集合中的单个元素。 */ session => session.chat_id === current) ? current : sessions[0]?.chat_id || ''); }, [activeAccountID, sessionsByAccount]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { if (!activeAccountID || refreshedAccountsRef.current.has(activeAccountID)) return; refreshedAccountsRef.current.add(activeAccountID); void reloadSessions(activeAccountID); }, [activeAccountID, reloadSessions]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { if (!activeAccountID || !activeChatID) { setMessages([]); return; } + // sequence 请求序号。 const sequence = ++messageSequence.current; messageController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); messageController.current = controller; setMessagesLoading(true); void Promise.all([ getChatMessagePage(activeAccountID, activeChatID, undefined, undefined, { signal: controller.signal }), markChatRead(activeAccountID, activeChatID, { signal: controller.signal }), - ]).then(([page]) => { + ]).then(/* 当前回调处理用户交互或异步状态变化。 */ ([page]) => { if (!isCurrentChatRequest(messageSequence.current, sequence, controller.signal)) return; setMessages(page.messages); setHasOlder(page.has_more); setHistoryCursor(page.next_cursor); - if (page.session) setSessionsByAccount(current => ({ ...current, [activeAccountID]: (current[activeAccountID] || []).map(session => session.chat_id === page.session?.chat_id ? page.session! : session) })); - setSessionsByAccount(current => ({ ...current, [activeAccountID]: (current[activeAccountID] || []).map(session => session.chat_id === activeChatID ? { ...session, unread_count: 0 } : session) })); - }).catch(loadError => { + if (page.session) setSessionsByAccount(/* 当前回调处理集合中的单个元素。 */ current => ({ ...current, [activeAccountID]: (current[activeAccountID] || []).map(/* 当前回调处理集合中的单个元素。 */ session => session.chat_id === page.session?.chat_id ? page.session! : session) })); + setSessionsByAccount(/* 当前回调处理集合中的单个元素。 */ current => ({ ...current, [activeAccountID]: (current[activeAccountID] || []).map(/* 当前回调处理集合中的单个元素。 */ session => session.chat_id === activeChatID ? { ...session, unread_count: 0 } : session) })); + }).catch(/* 当前回调处理用户交互或异步状态变化。 */ loadError => { if (isCurrentChatRequest(messageSequence.current, sequence, controller.signal) && !isChatAbortError(loadError)) setError(loadError instanceof Error ? loadError.message : '加载消息失败'); - }).finally(() => { + }).finally(/* 当前回调处理用户交互或异步状态变化。 */ () => { if (isCurrentChatRequest(messageSequence.current, sequence, controller.signal)) setMessagesLoading(false); }); - return () => controller.abort(); + return /* 当前回调处理用户交互或异步状态变化。 */ () => controller.abort(); }, [activeAccountID, activeChatID]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { contactController.current?.abort(); contactSequence.current += 1; }, [activeAccountID]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { sendController.current?.abort(); sendSequence.current += 1; }, [activeAccountID, activeChatID]); - useEffect(() => () => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => /* 当前回调同步 React 副作用和资源生命周期。 */ () => { sessionController.current?.abort(); messageController.current?.abort(); contactController.current?.abort(); @@ -279,26 +298,32 @@ export const useChat = (): UseChatResult => { }, []); /** 加载当前会话更早消息并保持滚动位置。 */ - const loadOlderMessages = useCallback(async (): Promise => { + const loadOlderMessages = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!activeAccountID || !activeChatID || olderLoading || !hasOlder) return; + // container 容器。 const container = scrollRef.current; + // previousHeight 上一项高度,负责当前功能中的对应处理。 const previousHeight = container?.scrollHeight || 0; + // sequence 请求序号。 const sequence = messageSequence.current; + // controller 请求取消控制器。 const controller = new AbortController(); skipNextMessageScrollRef.current = true; setOlderLoading(true); setError(''); try { + // oldestID 最早标识,负责当前功能中的对应处理。 const oldestID = messages[0]?.id; + // page 页码。 const page = await getChatMessagePage(activeAccountID, activeChatID, historyCursor, oldestID, { signal: controller.signal }); if (!isCurrentChatRequest(messageSequence.current, sequence, controller.signal)) return; - setMessages(current => mergeOlderMessages(current, page.messages)); + setMessages(/* 当前回调处理用户交互或异步状态变化。 */ current => mergeOlderMessages(current, page.messages)); setHasOlder(page.has_more); setHistoryCursor(page.next_cursor); - requestAnimationFrame(() => { + requestAnimationFrame(/* 当前回调处理用户交互或异步状态变化。 */ () => { if (container) container.scrollTop += container.scrollHeight - previousHeight; }); - } catch (loadError) { + } catch (/* loadError 表示加载错误。 */ loadError) { skipNextMessageScrollRef.current = false; if (!isChatAbortError(loadError)) setError(loadError instanceof Error ? loadError.message : '加载历史消息失败'); } finally { @@ -306,55 +331,67 @@ export const useChat = (): UseChatResult => { } }, [activeAccountID, activeChatID, hasOlder, historyCursor, messages, olderLoading]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { + // disposed disposed,负责当前功能中的对应处理。 let disposed = false; + // reconnectTimer reconnect定时器,负责当前功能中的对应处理。 let reconnectTimer = 0; + // retry 重试当前操作。 let retry = 0; + // socket WebSocket 连接。 let socket: WebSocket | null = null; + // connect 连接。 const connect = (): void => { if (disposed) return; setLiveState('connecting'); + // protocol 连接协议。 const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'; socket = new WebSocket(`${protocol}//${window.location.host}/api/v1/chat/ws`); - socket.onopen = () => { retry = 0; setLiveState('online'); }; - socket.onmessage = event => { + socket.onopen = /* 当前回调处理用户交互或异步状态变化。 */ () => { retry = 0; setLiveState('online'); }; + socket.onmessage = /* 当前回调处理用户交互或异步状态变化。 */ event => { try { + // payload 请求载荷。 const payload = JSON.parse(event.data); + // message 消息。 const message = payload.message as ChatMessage | undefined; if (!message) return; + // accountID 账号标识。 const accountID = message.account_id; - setSessionsByAccount(current => { + setSessionsByAccount(/* 当前回调处理用户交互或异步状态变化。 */ current => { + // rows 行数据。 const rows = current[accountID] || []; - const found = rows.some(row => row.chat_id === message.chat_id); + // found 匹配结果。 + const found = rows.some(/* 当前回调处理集合中的单个元素。 */ row => row.chat_id === message.chat_id); if (!found) { void reloadSessions(accountID); return current; } - return { ...current, [accountID]: rows.map(row => row.chat_id === message.chat_id ? { + return { ...current, [accountID]: rows.map(/* 当前回调处理集合中的单个元素。 */ row => row.chat_id === message.chat_id ? { ...row, last_message: message.content, last_message_at: message.sent_at, unread_count: message.direction === 'incoming' && (activeAccountRef.current !== accountID || activeChatRef.current !== message.chat_id) ? row.unread_count + 1 : row.unread_count, - } : row).sort((a, b) => b.last_message_at - a.last_message_at) }; + } : row).sort(/* 当前回调处理集合中的单个元素。 */ (a, b) => b.last_message_at - a.last_message_at) }; }); if (activeAccountRef.current === accountID && activeChatRef.current === message.chat_id) { - setMessages(current => mergeLiveMessage(current, message)); + setMessages(/* 当前回调处理用户交互或异步状态变化。 */ current => mergeLiveMessage(current, message)); if (message.direction === 'incoming') void markChatRead(accountID, message.chat_id); } } catch { // 忽略非聊天格式的 WebSocket 帧,后续 REST 查询会恢复权威状态。 } }; - socket.onclose = () => { + socket.onclose = /* 当前回调处理用户交互或异步状态变化。 */ () => { if (disposed) return; setLiveState('offline'); + // delay 延迟。 const delay = Math.min(15_000, 1_000 * 2 ** Math.min(retry++, 4)); reconnectTimer = window.setTimeout(connect, delay); }; - socket.onerror = () => socket?.close(); + socket.onerror = /* 当前回调处理用户交互或异步状态变化。 */ () => socket?.close(); }; connect(); - return () => { + return /* 当前回调处理用户交互或异步状态变化。 */ () => { disposed = true; window.clearTimeout(reconnectTimer); socket?.close(); @@ -362,17 +399,21 @@ export const useChat = (): UseChatResult => { }, [reloadSessions]); /** 根据滚动位置决定新消息是否自动滚到底部。 */ - const handleMessageScroll = useCallback(() => { + const handleMessageScroll = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ () => { + // container 容器。 const container = scrollRef.current; if (!container) return; + // distanceFromBottom 距离FromBottom,负责当前功能中的对应处理。 const distanceFromBottom = container.scrollHeight - container.scrollTop - container.clientHeight; shouldScrollToBottomRef.current = distanceFromBottom <= 48; }, []); - useLayoutEffect(() => { + useLayoutEffect(/* 当前回调处理用户交互或异步状态变化。 */ () => { + // contextChanged 上下文Changed,负责当前功能中的对应处理。 const contextChanged = scrollContextRef.current.accountID !== activeAccountID || scrollContextRef.current.chatID !== activeChatID; scrollContextRef.current = { accountID: activeAccountID, chatID: activeChatID }; if (contextChanged) shouldScrollToBottomRef.current = true; + // container 容器。 const container = scrollRef.current; if (!container) return; if (skipNextMessageScrollRef.current) { @@ -382,29 +423,38 @@ export const useChat = (): UseChatResult => { if (messagesLoading || shouldScrollToBottomRef.current) container.scrollTop = container.scrollHeight; }, [activeAccountID, activeChatID, messages, messagesLoading]); - const activeAccount = accounts.find(account => account.id === activeAccountID); + // activeAccount 当前状态账号,负责当前功能中的对应处理。 + const activeAccount = accounts.find(/* 当前回调处理集合中的单个元素。 */ account => account.id === activeAccountID); + // activeSessions 当前状态会话列表,负责当前功能中的对应处理。 const activeSessions = sessionsByAccount[activeAccountID] || []; - const selectedSession = activeSessions.find(session => session.chat_id === activeChatID); - const filteredSessions = useMemo(() => filterChatSessions(activeSessions, search, unreadOnly), [activeSessions, search, unreadOnly]); - const unreadForAccount = useCallback((accountID: string) => (sessionsByAccount[accountID] || []).reduce((sum, session) => sum + session.unread_count, 0), [sessionsByAccount]); + // selectedSession 处理当前选择(ed会话)。 + const selectedSession = activeSessions.find(/* 当前回调处理集合中的单个元素。 */ session => session.chat_id === activeChatID); + // filteredSessions 过滤后的会话列表,负责当前功能中的对应处理。 + const filteredSessions = useMemo(/* 当前回调计算并缓存派生数据。 */ () => filterChatSessions(activeSessions, search, unreadOnly), [activeSessions, search, unreadOnly]); + // unreadForAccount unreadFor账号,负责当前功能中的对应处理。 + const unreadForAccount = useCallback(/* 当前回调处理集合中的单个元素。 */ (accountID: string) => (sessionsByAccount[accountID] || []).reduce(/* 当前回调处理集合中的单个元素。 */ (sum, session) => sum + session.unread_count, 0), [sessionsByAccount]); /** 加载当前账号下一页联系人。 */ - const loadMoreContacts = useCallback(async (): Promise => { + const loadMoreContacts = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (!activeAccountID || contactsLoading || !hasMoreContacts[activeAccountID]) return; + // sequence 请求序号。 const sequence = ++contactSequence.current; contactController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); contactController.current = controller; + // accountID 账号标识。 const accountID = activeAccountID; setContactsLoading(true); setError(''); try { + // page 页码。 const page = await getChatSessionPage(accountID, contactCursors[accountID], { signal: controller.signal }, true); if (!isCurrentChatRequest(contactSequence.current, sequence, controller.signal)) return; - setSessionsByAccount(current => ({ ...current, [accountID]: page.sessions })); - setContactCursors(current => ({ ...current, [accountID]: page.next_cursor })); - setHasMoreContacts(current => ({ ...current, [accountID]: page.has_more })); - } catch (loadError) { + setSessionsByAccount(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, [accountID]: page.sessions })); + setContactCursors(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, [accountID]: page.next_cursor })); + setHasMoreContacts(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, [accountID]: page.has_more })); + } catch (/* loadError 表示加载错误。 */ loadError) { if (isCurrentChatRequest(contactSequence.current, sequence, controller.signal) && !isChatAbortError(loadError)) setError(loadError instanceof Error ? loadError.message : '加载历史联系人失败'); } finally { if (isCurrentChatRequest(contactSequence.current, sequence, controller.signal)) setContactsLoading(false); @@ -412,21 +462,24 @@ export const useChat = (): UseChatResult => { }, [activeAccountID, contactCursors, contactsLoading, hasMoreContacts]); /** 发送文本消息并记录失败重试数据。 */ - const sendText = useCallback(async (text: string, rememberRetry: boolean): Promise => { + const sendText = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (text: string, rememberRetry: boolean): Promise => { if (!selectedSession || !activeAccountID || sending) return; + // sequence 请求序号。 const sequence = ++sendSequence.current; sendController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); sendController.current = controller; setSending(true); setError(''); try { + // result 处理结果。 const result = await sendChatMessage({ account_id: activeAccountID, chat_id: selectedSession.chat_id, buyer_id: selectedSession.buyer_id, buyer_name: selectedSession.buyer_name, item_id: selectedSession.item_id, item_title: selectedSession.item_title, text }, { signal: controller.signal }); if (!isCurrentChatRequest(sendSequence.current, sequence, controller.signal)) return; setDraft(''); setRetryText(null); - setMessages(current => mergeLiveMessage(current, result.message)); - } catch (sendError) { + setMessages(/* 当前回调处理用户交互或异步状态变化。 */ current => mergeLiveMessage(current, result.message)); + } catch (/* sendError 表示发送错误。 */ sendError) { if (isCurrentChatRequest(sendSequence.current, sequence, controller.signal)) { if (rememberRetry) setRetryText(text); if (!isChatAbortError(sendError)) setError(sendError instanceof Error ? sendError.message : '消息发送失败'); @@ -437,20 +490,23 @@ export const useChat = (): UseChatResult => { }, [activeAccountID, selectedSession, sending]); /** 发送图片消息并记录失败重试数据。 */ - const sendImage = useCallback(async (file: File, rememberRetry: boolean): Promise => { + const sendImage = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (file: File, rememberRetry: boolean): Promise => { if (!selectedSession || !activeAccountID || sending) return; + // sequence 请求序号。 const sequence = ++sendSequence.current; sendController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); sendController.current = controller; setSending(true); setError(''); try { + // result 处理结果。 const result = await sendChatImage({ account_id: activeAccountID, chat_id: selectedSession.chat_id, buyer_id: selectedSession.buyer_id, buyer_name: selectedSession.buyer_name, buyer_avatar_url: selectedSession.buyer_avatar_url, item_id: selectedSession.item_id, item_title: selectedSession.item_title, image: file }, { signal: controller.signal }); if (!isCurrentChatRequest(sendSequence.current, sequence, controller.signal)) return; setRetryImage(null); - setMessages(current => mergeLiveMessage(current, result.message)); - } catch (sendError) { + setMessages(/* 当前回调处理用户交互或异步状态变化。 */ current => mergeLiveMessage(current, result.message)); + } catch (/* sendError 表示发送错误。 */ sendError) { if (isCurrentChatRequest(sendSequence.current, sequence, controller.signal)) { if (rememberRetry) setRetryImage(file); if (!isChatAbortError(sendError)) setError(sendError instanceof Error ? sendError.message : '图片发送失败'); @@ -464,20 +520,21 @@ export const useChat = (): UseChatResult => { }, [activeAccountID, selectedSession, sending]); /** 处理文本发送按钮和 Enter 快捷键。 */ - const handleSend = useCallback(async (): Promise => { + const handleSend = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { + // text 文本。 const text = draft.trim(); if (!text || !selectedSession || !activeAccountID || sending) return; await sendText(text, true); }, [activeAccountID, draft, selectedSession, sendText, sending]); /** 处理图片选择并发送。 */ - const handleImage = useCallback(async (file?: File): Promise => { + const handleImage = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (file?: File): Promise => { if (!file || !selectedSession || !activeAccountID || sending) return; await sendImage(file, true); }, [activeAccountID, selectedSession, sendImage, sending]); /** 重试最近一次失败的文本或图片发送。 */ - const retrySend = useCallback(async (): Promise => { + const retrySend = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (): Promise => { if (retryText) await sendText(retryText, false); else if (retryImage) await sendImage(retryImage, false); }, [retryImage, retryText, sendImage, sendText]); diff --git a/frontend/app/features/chat/state.test.ts b/frontend/app/features/chat/state.test.ts index 8578173..d693121 100644 --- a/frontend/app/features/chat/state.test.ts +++ b/frontend/app/features/chat/state.test.ts @@ -21,6 +21,7 @@ test('Chat 会话筛选和历史消息合并保持账号内顺序', test('Chat 实时消息替换同键记录并拒绝过期请求', // 请求边界测试验证实时回执不会产生重复消息,切换会话后的旧请求不能写入。 () => { + // controller 请求取消控制器。 const controller = new AbortController(); expect(mergeLiveMessage([messageFixture], { ...messageFixture, content: '新消息' })[0].content).toBe('新消息'); expect(isCurrentChatRequest(3, 3, controller.signal)).toBe(true); diff --git a/frontend/app/features/chat/state.ts b/frontend/app/features/chat/state.ts index 2331507..c1cc64b 100644 --- a/frontend/app/features/chat/state.ts +++ b/frontend/app/features/chat/state.ts @@ -2,26 +2,29 @@ import type { ChatMessage, ChatSession } from '../../../types'; /** 按搜索条件筛选会话列表。 */ export const filterChatSessions = (sessions: ChatSession[], search: string, unreadOnly: boolean): ChatSession[] => { + // keyword 搜索关键词。 const keyword = search.trim().toLowerCase(); - return sessions.filter(session => { + return sessions.filter(/* 当前回调处理集合中的单个元素。 */ session => { if (unreadOnly && session.unread_count <= 0) return false; if (!keyword) return true; return [session.buyer_name, session.buyer_id, session.item_title, session.last_message] - .some(value => (value || '').toLowerCase().includes(keyword)); + .some(/* 当前回调处理集合中的单个元素。 */ value => (value || '').toLowerCase().includes(keyword)); }); }; /** 合并历史消息并按消息键去重。 */ export const mergeOlderMessages = (current: ChatMessage[], older: ChatMessage[]): ChatMessage[] => { - const keys = new Set(current.map(message => message.message_key)); - return [...older.filter(message => !keys.has(message.message_key)), ...current]; + // keys keys,负责当前功能中的对应处理。 + const keys = new Set(current.map(/* 当前回调处理集合中的单个元素。 */ message => message.message_key)); + return [...older.filter(/* 当前回调处理集合中的单个元素。 */ message => !keys.has(message.message_key)), ...current]; }; /** 合并实时消息并替换同消息键的临时记录。 */ export const mergeLiveMessage = (current: ChatMessage[], incoming: ChatMessage): ChatMessage[] => { - const index = current.findIndex(message => message.message_key === incoming.message_key); + // index 当前索引。 + const index = current.findIndex(/* 当前回调处理用户交互或异步状态变化。 */ message => message.message_key === incoming.message_key); if (index < 0) return [...current, incoming]; - return current.map((message, currentIndex) => currentIndex === index ? incoming : message); + return current.map(/* 当前回调处理集合中的单个元素。 */ (message, currentIndex) => currentIndex === index ? incoming : message); }; /** 判断 Chat 请求响应是否仍属于当前账号和会话。 */ @@ -35,7 +38,9 @@ export const isChatAbortError = (error: unknown): boolean => error instanceof Er /** 将聊天时间戳格式化为列表时间。 */ export const formatClock = (value: number): string => { if (!value) return ''; + // date 日期。 const date = new Date(value < 10_000_000_000 ? value * 1000 : value); + // today 今天日期。 const today = new Date(); if (date.toDateString() === today.toDateString()) { return date.toLocaleTimeString('zh-CN', { hour: '2-digit', minute: '2-digit', hour12: false }); @@ -45,6 +50,7 @@ export const formatClock = (value: number): string => { /** 将聊天时间戳格式化为消息详情时间。 */ export const messageTime = (value: number): string => { + // date 日期。 const date = new Date(value < 10_000_000_000 ? value * 1000 : value); return date.toLocaleString('zh-CN', { month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', hour12: false }); }; diff --git a/frontend/app/features/dashboard/hooks.ts b/frontend/app/features/dashboard/hooks.ts index c6184f9..3bc0e1b 100644 --- a/frontend/app/features/dashboard/hooks.ts +++ b/frontend/app/features/dashboard/hooks.ts @@ -6,20 +6,20 @@ import { getDashboardStats, getItems, getOrderAnalytics, getValidOrders } from ' import type { DashboardData, DashboardRangeSelection, DashboardStatus } from './types'; /** Dashboard Hook 的输入参数。 */ -export type UseDashboardOptions = DashboardRangeSelection & { customRangeVersion: number }; +export type UseDashboardOptions = DashboardRangeSelection & { /** customRangeVersion 表示自定义范围版本。 */ customRangeVersion: number }; /** Dashboard Hook 暴露给页面的可视化数据与操作。 */ export type UseDashboardResult = { - data: DashboardData | null; - status: DashboardStatus; - chartData: ReturnType; - productSalesData: ReturnType; - sourceData: ReturnType; - categoryData: ReturnType; - maxProductSales: number; - trendPercent: string | null; - selectedRangeLabel: string; - refresh: () => void; + /** data 表示返回数据。 */ data: DashboardData | null; + /** status 表示状态。 */ status: DashboardStatus; + /** chartData 表示图表数据。 */ chartData: ReturnType; + /** productSalesData 表示商品销量数据。 */ productSalesData: ReturnType; + /** sourceData 表示来源统计数据。 */ sourceData: ReturnType; + /** categoryData 表示分类统计数据。 */ categoryData: ReturnType; + /** maxProductSales 表示最大商品销量。 */ maxProductSales: number; + /** trendPercent 表示趋势Percent。 */ trendPercent: string | null; + /** selectedRangeLabel 表示选中范围Label。 */ selectedRangeLabel: string; + /** refresh 表示刷新函数。 */ refresh: () => void; }; /** 判断请求错误是否来自用户主动取消。 */ @@ -30,85 +30,107 @@ const errorMessage = (error: unknown, fallback: string): string => error instanc /** 加载 Dashboard 概览、趋势和订单明细,并隔离过期响应。 */ export const useDashboard = (options: UseDashboardOptions): UseDashboardResult => { + // { 解构得到当前 Hook 返回的状态和操作函数。 const { range, customStartDate, customEndDate, customRangeVersion } = options; + // [overview, 解构得到当前 Hook 返回的状态和操作函数。 const [overview, setOverview] = useState | null>(null); + // [rangeData, 解构得到当前 Hook 返回的状态和操作函数。 const [rangeData, setRangeData] = useState | null>(null); + // [status, 解构得到当前 Hook 返回的状态和操作函数。 const [status, setStatus] = useState({ overview: 'idle', range: 'idle', error: '' }); + // [refreshKey, 解构得到当前 Hook 返回的状态和操作函数。 const [refreshKey, setRefreshKey] = useState(0); + // requestSequence 请求请求序号,负责当前功能中的对应处理。 const requestSequence = useRef(0); + // rangeSelection 范围选择,负责当前功能中的对应处理。 const rangeSelection = useMemo( // selection 是当前时间范围的不可变快照。 () => ({ range, customStartDate, customEndDate }), [customEndDate, customStartDate, range], ); + // refresh 刷新当前数据。 const refresh = useCallback( // 重新加载按钮回调只递增版本号,实际请求由两个 effect 统一管理。 - () => setRefreshKey(value => value + 1), + () => setRefreshKey(/* 当前回调处理用户交互或异步状态变化。 */ value => value + 1), [], ); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { + // controller 请求取消控制器。 const controller = new AbortController(); - setStatus(current => ({ ...current, overview: 'loading', error: '' })); + setStatus(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, overview: 'loading', error: '' })); Promise.all([ getDashboardStats({ signal: controller.signal }), getItems(undefined, { signal: controller.signal }), - ]).then(([stats, items]) => { + ]).then(/* 当前回调处理用户交互或异步状态变化。 */ ([stats, items]) => { if (controller.signal.aborted) return; setOverview({ stats, items, itemNames: buildItemNameMap(items) }); - setStatus(current => ({ ...current, overview: 'success' })); - }).catch(error => { + setStatus(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, overview: 'success' })); + }).catch(/* 当前回调处理用户交互或异步状态变化。 */ error => { if (controller.signal.aborted || isAbortError(error)) return; - setStatus(current => ({ ...current, overview: 'error', error: errorMessage(error, '概览加载失败') })); + setStatus(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, overview: 'error', error: errorMessage(error, '概览加载失败') })); }); - return () => controller.abort(); + return /* 当前回调处理用户交互或异步状态变化。 */ () => controller.abort(); }, [refreshKey]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { + // dateRange 日期范围,负责当前功能中的对应处理。 let dateRange; try { dateRange = getDateRange(range, new Date(), customStartDate, customEndDate); - } catch (error) { - setStatus(current => ({ ...current, range: 'error', error: errorMessage(error, '日期范围无效') })); + } catch (/* error 表示错误。 */ error) { + setStatus(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, range: 'error', error: errorMessage(error, '日期范围无效') })); return; } + // previousRange 上一项范围,负责当前功能中的对应处理。 const previousRange = getPreviousDateRange(dateRange); + // sequence 请求序号。 const sequence = ++requestSequence.current; + // controller 请求取消控制器。 const controller = new AbortController(); - setStatus(current => ({ ...current, range: 'loading', error: '' })); + setStatus(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, range: 'loading', error: '' })); Promise.all([ getOrderAnalytics({ start_date: dateRange.startDate, end_date: dateRange.endDate }, { signal: controller.signal }), getOrderAnalytics({ start_date: previousRange.startDate, end_date: previousRange.endDate }, { signal: controller.signal }), getValidOrders({ start_date: dateRange.startDate, end_date: dateRange.endDate }, { signal: controller.signal }), - ]).then(([analytics, previousAnalytics, validOrders]) => { + ]).then(/* 当前回调处理用户交互或异步状态变化。 */ ([analytics, previousAnalytics, validOrders]) => { if (!isCurrentDashboardRequest(requestSequence.current, sequence, controller.signal)) return; setRangeData({ analytics, previousAnalytics, validOrders, dateRange }); - setStatus(current => ({ ...current, range: 'success' })); - }).catch(error => { + setStatus(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, range: 'success' })); + }).catch(/* 当前回调处理用户交互或异步状态变化。 */ error => { if (!isCurrentDashboardRequest(requestSequence.current, sequence, controller.signal) || isAbortError(error)) return; - setStatus(current => ({ ...current, range: 'error', error: errorMessage(error, '经营数据加载失败') })); + setStatus(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, range: 'error', error: errorMessage(error, '经营数据加载失败') })); }); - return () => controller.abort(); + return /* 当前回调处理用户交互或异步状态变化。 */ () => controller.abort(); }, [customRangeVersion, range, refreshKey]); + // data 数据。 const data = useMemo( // dashboardData 只有在概览和时间范围请求都成功后才对页面可见。 () => overview && rangeData ? { ...overview, ...rangeData } : null, [overview, rangeData], ); + // itemNames 商品Names,负责当前功能中的对应处理。 const itemNames = overview?.itemNames || {}; + // analytics 统计分析数据。 const analytics = rangeData?.analytics || null; - const chartData = useMemo(() => analytics ? buildChartData(analytics) : [], [analytics]); - const productSalesData = useMemo(() => analytics ? buildProductSalesData(analytics, itemNames) : [], [analytics, itemNames]); + // chartData 图表数据,负责当前功能中的对应处理。 + const chartData = useMemo(/* 当前回调计算并缓存派生数据。 */ () => analytics ? buildChartData(analytics) : [], [analytics]); + // productSalesData productSales数据,负责当前功能中的对应处理。 + const productSalesData = useMemo(/* 当前回调计算并缓存派生数据。 */ () => analytics ? buildProductSalesData(analytics, itemNames) : [], [analytics, itemNames]); + // colors 颜色列表。 const colors = useMemo( // colors 是图表使用的主题颜色序列。 () => ['rgb(var(--color-brand))', 'rgb(var(--color-brand-highlight))', 'rgb(var(--color-success-500))', 'rgb(var(--color-warning-500))', 'rgb(var(--color-accent-500))'], [], ); - const sourceData = useMemo(() => analytics ? buildSourceData(analytics, itemNames, colors) : [], [analytics, colors, itemNames]); - const categoryData = useMemo(() => analytics ? buildCategoryData(analytics, itemNames, colors) : [], [analytics, colors, itemNames]); - const maxProductSales = useMemo(() => getMaxProductSales(productSalesData), [productSalesData]); + // sourceData 来源数据,负责当前功能中的对应处理。 + const sourceData = useMemo(/* 当前回调计算并缓存派生数据。 */ () => analytics ? buildSourceData(analytics, itemNames, colors) : [], [analytics, colors, itemNames]); + // categoryData 分类数据,负责当前功能中的对应处理。 + const categoryData = useMemo(/* 当前回调计算并缓存派生数据。 */ () => analytics ? buildCategoryData(analytics, itemNames, colors) : [], [analytics, colors, itemNames]); + // maxProductSales 最大值ProductSales,负责当前功能中的对应处理。 + const maxProductSales = useMemo(/* 当前回调计算并缓存派生数据。 */ () => getMaxProductSales(productSalesData), [productSalesData]); return { data, diff --git a/frontend/app/features/dashboard/state.ts b/frontend/app/features/dashboard/state.ts index 56ddf90..4718527 100644 --- a/frontend/app/features/dashboard/state.ts +++ b/frontend/app/features/dashboard/state.ts @@ -85,7 +85,7 @@ export const buildProductSalesData = (analytics: OrderAnalytics, itemNames: Reco return { name: itemName.length > 12 ? `${itemName.substring(0, 12)}...` : itemName, sales: item.order_count }; }, ) - .sort((left, right) => right.sales - left.sales) + .sort(/* 当前回调处理集合中的单个元素。 */ (left, right) => right.sales - left.sales) .slice(0, 10) ); @@ -106,7 +106,7 @@ export const buildSourceData = (analytics: OrderAnalytics, itemNames: Record right.value - left.value) + .sort(/* 当前回调处理集合中的单个元素。 */ (left, right) => right.value - left.value) .slice(0, 6) .map( // item 是截取后的商品占比数据,index 用于选择稳定颜色。 @@ -132,7 +132,7 @@ export const buildCategoryData = (analytics: OrderAnalytics, itemNames: Record right.value - left.value) + .sort(/* 当前回调处理集合中的单个元素。 */ (left, right) => right.value - left.value) .slice(0, 5) .map( // item 是截取后的金额排行数据,index 用于选择稳定颜色。 @@ -168,7 +168,7 @@ export const getRangeLabel = (selection: DashboardRangeSelection): string => { }; /** 计算销量排行中用于进度条归一化的最大值。 */ -export const getMaxProductSales = (productSales: DashboardProductPoint[]): number => Math.max(...productSales.map(item => item.sales), 1); +export const getMaxProductSales = (productSales: DashboardProductPoint[]): number => Math.max(...productSales.map(/* 当前回调处理集合中的单个元素。 */ item => item.sales), 1); /** 判断旧的日期范围请求结果是否仍然可以写入当前页面。 */ export const isCurrentDashboardRequest = (currentSequence: number, requestSequence: number, signal: AbortSignal): boolean => ( diff --git a/frontend/app/features/rules/issueState.test.ts b/frontend/app/features/rules/issueState.test.ts index f1c94e7..37171a6 100644 --- a/frontend/app/features/rules/issueState.test.ts +++ b/frontend/app/features/rules/issueState.test.ts @@ -19,6 +19,7 @@ const issue = (cookieID: string, allowed: AutomationRunIssue['allowed_resolution test('规则异常处理动作遵循后端允许列表', // 只有后端明确允许的人工动作才能被页面提交。 () => { + // invalid 无效数据。 const invalid = issue('a', ['cancel']); expect(canResolveAutomationIssue(invalid, 'cancel')).toBe(true); expect(canResolveAutomationIssue(invalid, 'continue')).toBe(false); @@ -28,22 +29,23 @@ test('规则异常处理动作遵循后端允许列表', test('规则异常按账号筛选后再决定是否展示面板', // 异常面板只展示当前账号的运行异常和延迟任务。 () => { + // visible 可见数据。 const visible = filterAutomationIssues({ runs: [issue('a', ['cancel']), issue('b', ['retry', 'cancel'])], pending_tasks: [] }, 'missing'); expect(visible.runs).toEqual([]); expect(visible.pending_tasks).toEqual([]); }); -test('规则列表不因异常接口失败而停止加载', async () => { +test('规则列表不因异常接口失败而停止加载', /* 当前回调处理用户交互或异步状态变化。 */ async () => { // receivedRules 保存主规则列表加载器收到的结果。 const receivedRules: string[][] = []; // errors 保存异常接口失败后的错误回调。 const errors: unknown[] = []; await loadAutomationPageData({ - loadRules: async () => ['rule'], - loadIssues: async () => { throw new Error('issues unavailable'); }, - onRules: rules => receivedRules.push(rules), - onIssues: () => { throw new Error('must not receive issues'); }, - onIssuesError: error => errors.push(error), + loadRules: /* 当前回调处理用户交互或异步状态变化。 */ async () => ['rule'], + loadIssues: /* 当前回调处理用户交互或异步状态变化。 */ async () => { throw new Error('issues unavailable'); }, + onRules: /* 当前回调处理用户交互或异步状态变化。 */ rules => receivedRules.push(rules), + onIssues: /* 当前回调处理用户交互或异步状态变化。 */ () => { throw new Error('must not receive issues'); }, + onIssuesError: /* 当前回调处理用户交互或异步状态变化。 */ error => errors.push(error), }); expect(receivedRules).toEqual([['rule']]); expect(errors).toHaveLength(1); diff --git a/frontend/app/features/settings/hooks.ts b/frontend/app/features/settings/hooks.ts index 2e47305..7b91f36 100644 --- a/frontend/app/features/settings/hooks.ts +++ b/frontend/app/features/settings/hooks.ts @@ -69,7 +69,7 @@ export const useSettings = (): UseSettingsResult => { // credentialsMessage 保存登录凭据操作提示。 const [credentialsMessage, setCredentialsMessage] = useState(null); // credentials 保存登录凭据编辑草稿。 - const [credentials, setCredentials] = useState(() => createCredentials()); + const [credentials, setCredentials] = useState(/* 当前回调处理用户交互或异步状态变化。 */ () => createCredentials()); // requestStatus 表示最近一次设置请求的阶段。 const [requestStatus, setRequestStatus] = useState('idle'); // modelPickerRef 指向模型选择器根节点。 @@ -85,16 +85,18 @@ export const useSettings = (): UseSettingsResult => { settingsRef.current = settings; /** 取消当前设置请求并创建新的请求控制器。 */ - const beginRequest = useCallback(() => { + const beginRequest = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ () => { // controller 是本次请求的取消控制器。 requestController.current?.abort(); + // controller 请求取消控制器。 const controller = new AbortController(); requestController.current = controller; requestSequence.current += 1; return { controller, sequence: requestSequence.current }; }, []); - const loadAIModels = useCallback(async (source?: SystemSettings | null, openAfterLoad = false, signal?: AbortSignal) => { + // loadAIModels 加载当前数据(AIModels)。 + const loadAIModels = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (source?: SystemSettings | null, openAfterLoad = false, signal?: AbortSignal) => { // current 是本次模型发现使用的配置快照。 const current = source || settingsRef.current; // baseUrl 是兼容模型发现接口的服务地址。 @@ -102,14 +104,15 @@ export const useSettings = (): UseSettingsResult => { setModelsLoading(true); setModelError(''); try { + // models 模型列表。 const models = await fetchAIModels(baseUrl, current?.ai_api_key || '', { signal }); if (signal?.aborted) return; setAiModels(models); setModelDropdownOpen(openAfterLoad && models.length > 0); if (!current?.ai_model && models.length > 0) { - setSettings(previous => previous ? { ...previous, ai_model: models[0] } : previous); + setSettings(/* 当前回调处理用户交互或异步状态变化。 */ previous => previous ? { ...previous, ai_model: models[0] } : previous); } - } catch (error) { + } catch (/* error 表示错误。 */ error) { if (signal?.aborted || isSettingsAbortError(error)) return; setAiModels([]); setModelDropdownOpen(false); @@ -119,7 +122,8 @@ export const useSettings = (): UseSettingsResult => { } }, []); - const loadSettings = useCallback(() => { + // loadSettings 加载当前数据(设置)。 + const loadSettings = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ () => { // request 是本次设置读取的代次与控制器。 const { controller, sequence } = beginRequest(); setLoading(true); @@ -128,37 +132,38 @@ export const useSettings = (): UseSettingsResult => { Promise.all([ getSystemSettings({ signal: controller.signal }), verifySession({ signal: controller.signal }), - ]).then(([data, session]) => { + ]).then(/* 当前回调处理用户交互或异步状态变化。 */ ([data, session]) => { if (!isCurrentSettingsRequest(requestSequence.current, sequence, controller.signal)) return; setSettings(data); - if (session.username) setCredentials(previous => ({ ...previous, new_username: session.username || '' })); + if (session.username) setCredentials(/* 当前回调处理用户交互或异步状态变化。 */ previous => ({ ...previous, new_username: session.username || '' })); void loadAIModels(data, false, controller.signal); setRequestStatus('success'); - }).catch(error => { + }).catch(/* 当前回调处理用户交互或异步状态变化。 */ error => { if (!isCurrentSettingsRequest(requestSequence.current, sequence, controller.signal) || isSettingsAbortError(error)) return; setSettings(null); setLoadError(settingsErrorMessage(error, '加载配置失败')); setRequestStatus('error'); - }).finally(() => { + }).finally(/* 当前回调处理用户交互或异步状态变化。 */ () => { if (isCurrentSettingsRequest(requestSequence.current, sequence, controller.signal)) setLoading(false); }); }, [beginRequest, loadAIModels]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { loadSettings(); - return () => requestController.current?.abort(); + return /* 当前回调处理用户交互或异步状态变化。 */ () => requestController.current?.abort(); }, [loadSettings]); - useEffect(() => { + useEffect(/* 当前回调同步 React 副作用和资源生命周期。 */ () => { // handlePointerDown 负责点击模型选择器外部时关闭下拉框。 const handlePointerDown = (event: MouseEvent) => { if (!modelPickerRef.current?.contains(event.target as Node)) setModelDropdownOpen(false); }; document.addEventListener('mousedown', handlePointerDown); - return () => document.removeEventListener('mousedown', handlePointerDown); + return /* 当前回调处理用户交互或异步状态变化。 */ () => document.removeEventListener('mousedown', handlePointerDown); }, []); - const handleSave = useCallback(async () => { + // handleSave 处理当前用户操作(Save)。 + const handleSave = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async () => { // handleSave 提交当前配置草稿并保护过期响应。 if (!settings || saving) return; // request 是本次保存动作的代次与控制器。 @@ -169,7 +174,7 @@ export const useSettings = (): UseSettingsResult => { await updateSystemSettings(buildPersistableSettings(settings), { signal: controller.signal }); if (!isCurrentSettingsRequest(requestSequence.current, sequence, controller.signal)) return; window.alert('系统配置已保存'); - } catch (error) { + } catch (/* error 表示错误。 */ error) { if (!isCurrentSettingsRequest(requestSequence.current, sequence, controller.signal) || isSettingsAbortError(error)) return; setSaveError(settingsErrorMessage(error, '保存配置失败')); } finally { @@ -177,7 +182,8 @@ export const useSettings = (): UseSettingsResult => { } }, [beginRequest, saving, settings]); - const handleCredentialsSave = useCallback(async (event: React.FormEvent) => { + // handleCredentialsSave 处理当前用户操作(CredentialsSave)。 + const handleCredentialsSave = useCallback(/* 当前回调封装可复用的交互处理逻辑。 */ async (event: React.FormEvent) => { // handleCredentialsSave 校验并提交登录凭据表单。 event.preventDefault(); setCredentialsMessage(null); @@ -203,8 +209,8 @@ export const useSettings = (): UseSettingsResult => { return; } setCredentialsMessage(createCredentialsMessage('success', result.message || '登录凭据已更新')); - window.setTimeout(() => window.location.reload(), 1400); - } catch (error) { + window.setTimeout(/* 当前回调处理用户交互或异步状态变化。 */ () => window.location.reload(), 1400); + } catch (/* error 表示错误。 */ error) { if (!isCurrentSettingsRequest(requestSequence.current, sequence, controller.signal) || isSettingsAbortError(error)) return; setCredentialsMessage(createCredentialsMessage('error', settingsErrorMessage(error, '登录凭据更新失败'))); } finally { @@ -215,7 +221,7 @@ export const useSettings = (): UseSettingsResult => { return { settings, loading, loadError, saving, saveError, aiModels, modelsLoading, modelError, modelDropdownOpen, showApiKey, showCaptchaSecret, showCurrentPassword, showNewPassword, credentialsSaving, credentialsMessage, - credentials, requestStatus, modelPickerRef, loadSettings, loadAIModels: (source, openAfterLoad) => void loadAIModels(source, openAfterLoad), + credentials, requestStatus, modelPickerRef, loadSettings, loadAIModels: /* 当前回调处理用户交互或异步状态变化。 */ (source, openAfterLoad) => void loadAIModels(source, openAfterLoad), handleSave, handleCredentialsSave, setSettings, setModelDropdownOpen, setShowApiKey, setShowCaptchaSecret, setShowCurrentPassword, setShowNewPassword, setCredentials, setCredentialsMessage, }; diff --git a/frontend/components/AccountAutomationModal.tsx b/frontend/components/AccountAutomationModal.tsx index c0317df..4af41c3 100644 --- a/frontend/components/AccountAutomationModal.tsx +++ b/frontend/components/AccountAutomationModal.tsx @@ -4,18 +4,20 @@ import { AccountDetail, AccountTaskSettings } from '../types'; import { useAccountAutomation } from '../app/features/accountAutomation/hooks'; interface Props { - account: AccountDetail; - onClose: () => void; - onSaved: (settings: AccountTaskSettings) => void; + /** account 表示账号。 */ account: AccountDetail; + /** onClose 表示关闭弹窗的回调。 */ onClose: () => void; + /** onSaved 表示保存完成后的回调。 */ onSaved: (settings: AccountTaskSettings) => void; } -const Toggle: React.FC<{checked: boolean; onChange: () => void; label: string}> = ({ checked, onChange, label }) => ( +// Toggle 渲染可复用的开关控件。 +const Toggle: React.FC<{/** checked 表示开关当前是否选中。 */ checked: boolean; /** onChange 表示开关状态变化的回调。 */ onChange: () => void; /** label 表示控件的无障碍名称。 */ label: string}> = ({ checked, onChange, label }) => ( ); +// AccountAutomationModal 渲染账号自动化设置弹窗。 const AccountAutomationModal: React.FC = ({ account, onClose, onSaved }) => { // automationState 是账号任务 feature Hook 提供的表单和动作状态。 const { form, loading, saving, running, error, summary, retryAvailable, setForm, save, run, retry } = useAccountAutomation({ account, onSaved }); @@ -44,14 +46,14 @@ const AccountAutomationModal: React.FC = ({ account, onClose, onSaved })

自动评价

持续扫描待评价订单,按订单执行;不是每日任务。

- setForm(current => ({ ...current, auto_rate_enabled: !current.auto_rate_enabled }))} label="自动评价" /> + setForm(/* 当前回调处理用户交互或异步状态变化。 */ current => ({ ...current, auto_rate_enabled: !current.auto_rate_enabled }))} label="自动评价" /> -