diff --git a/src/contexts/UrlContextProvider.tsx b/src/contexts/UrlContextProvider.tsx index 5b4b3cd2..f7862382 100644 --- a/src/contexts/UrlContextProvider.tsx +++ b/src/contexts/UrlContextProvider.tsx @@ -209,7 +209,9 @@ const getWindowUrlHashParams = () => { const hashParam = hashParams.get(hashParamName); if (null !== hashParam) { const parsed = Number(hashParam); - urlHashParams[HASH_PARAM_NAMES.LOG_EVENT_NUM] = Number.isNaN(parsed) ? + + // FIXME: hashParamName type + urlHashParams[hashParamName] = Number.isNaN(parsed) ? null : parsed; } diff --git a/src/services/decoders/JsonlDecoder/index.ts b/src/services/decoders/JsonlDecoder/index.ts index 5ea0f626..a1baa1bd 100644 --- a/src/services/decoders/JsonlDecoder/index.ts +++ b/src/services/decoders/JsonlDecoder/index.ts @@ -131,7 +131,9 @@ class JsonlDecoder implements Decoder { const mid = Math.floor((low + high) / 2); const midTimestamp = BigInt(this.#logEvents[mid].timestamp.valueOf()); - if (midTimestamp === timestamp) { + console.log(`midTimestamp: ${midTimestamp}, mid: ${mid}, low: ${low}, high: ${high}`); + if (midTimestamp == timestamp) { + console.error(`result recorded: ${mid}`); result = mid; low = mid + 1; } else if (midTimestamp < timestamp) { diff --git a/src/typings/worker.ts b/src/typings/worker.ts index 2ccbe1a5..b33da6b0 100644 --- a/src/typings/worker.ts +++ b/src/typings/worker.ts @@ -40,7 +40,7 @@ enum CURSOR_CODE { type CursorArgMap = { [CURSOR_CODE.LAST_EVENT]: null; [CURSOR_CODE.EVENT_NUM]: { eventNum: number }; - [CURSOR_CODE.TIMESTAMP]: { timestamp: number }; + [CURSOR_CODE.TIMESTAMP]: { timestamp: bigint }; [CURSOR_CODE.PAGE_NUM]: { pageNum: number, eventPositionOnPage: EVENT_POSITION_ON_PAGE }; };