Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 15 additions & 129 deletions src/components/AppController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,156 +3,35 @@ import React, {
useRef,
} from "react";

import useLogFileManagerProxyStore from "../stores/logFileManagerProxyStore";
import useLogFileStore from "../stores/logFileStore";
import {handleErrorWithNotification} from "../stores/notificationStore";
import useQueryStore from "../stores/queryStore";
import useViewStore from "../stores/viewStore";
import {Nullable} from "../typings/common";
import {
CURSOR_CODE,
CursorType,
} from "../typings/worker";
import {clamp} from "../utils/math.ts";
import {
getWindowUrlHashParams,
getWindowUrlSearchParams,
updateUrlIfEventOnPage,
updateWindowUrlHashParams,
URL_HASH_PARAMS_DEFAULT,
URL_SEARCH_PARAMS_DEFAULT,
} from "../utils/url";
import {
updateQueryHashParams,
updateViewHashParams,
} from "../utils/url/urlHash";


/**
* Determines the cursor for navigating log events based on URL hash parameters.
*
* @param params An object containing the following properties:
* @param params.isPrettified Whether the log view is in prettified mode.
* @param params.logEventNum The log event number from the URL hash.
* @param params.timestamp The timestamp from the URL hash.
* @return `CursorType` object if a navigation action is needed, or `null` if no action is required.
*/
const getCursorFromHashParams = ({isPrettified, logEventNum, timestamp}: {
isPrettified: boolean; logEventNum: number; timestamp: number;
}): Nullable<CursorType> => {
const {numEvents} = useLogFileStore.getState();
if (0 === numEvents) {
updateWindowUrlHashParams({logEventNum: URL_HASH_PARAMS_DEFAULT.logEventNum});

return null;
}

const {
isPrettified: prevIsPrettified, updateIsPrettified, updateLogEventNum,
} = useViewStore.getState();
const clampedLogEventNum = clamp(logEventNum, 1, numEvents);

if (isPrettified !== prevIsPrettified) {
updateIsPrettified(isPrettified);

return {
code: CURSOR_CODE.EVENT_NUM,
args: {eventNum: clampedLogEventNum},
};
}

if (timestamp !== URL_HASH_PARAMS_DEFAULT.timestamp) {
return {
code: CURSOR_CODE.TIMESTAMP,
args: {timestamp: timestamp},
};
} else if (logEventNum !== URL_HASH_PARAMS_DEFAULT.logEventNum) {
updateLogEventNum(logEventNum);
const {beginLineNumToLogEventNum} = useViewStore.getState();
const logEventNumsOnPage: number[] = Array.from(beginLineNumToLogEventNum.values());
if (updateUrlIfEventOnPage(clampedLogEventNum, logEventNumsOnPage)) {
// No need to request a new page since the log event is on the current page.
return null;
}

return {
code: CURSOR_CODE.EVENT_NUM,
args: {eventNum: clampedLogEventNum},
};
}

// If we reach here, we have no valid cursor.
return null;
};

/**
* Updates view-related states from URL hash parameters.
* NOTE: this may modify the URL parameters.
*/
const updateViewHashParams = () => {
const {isPrettified, logEventNum, timestamp} = getWindowUrlHashParams();
updateWindowUrlHashParams({
isPrettified: URL_HASH_PARAMS_DEFAULT.isPrettified,
timestamp: URL_HASH_PARAMS_DEFAULT.timestamp,
});

const cursor = getCursorFromHashParams({isPrettified, logEventNum, timestamp});
if (null === cursor) {
// If no cursor was set, we can return early.
return;
}

(async () => {
const {logFileManagerProxy} = useLogFileManagerProxyStore.getState();
const {updatePageData} = useViewStore.getState();
const pageData = await logFileManagerProxy.loadPage(cursor, isPrettified);
updatePageData(pageData);
})().catch(handleErrorWithNotification);
};

/**
* Updates query-related states from URL hash parameters.
* NOTE: this may modify the URL parameters.
*
* @return Whether any query-related parameters were modified.
*/
const updateQueryHashParams = () => {
const {queryIsCaseSensitive, queryIsRegex, queryString} = getWindowUrlHashParams();
updateWindowUrlHashParams({queryIsCaseSensitive, queryIsRegex, queryString});

const {
queryIsCaseSensitive: currentQueryIsCaseSensitive,
queryIsRegex: currentQueryIsRegex,
queryString: currentQueryString,
setQueryIsCaseSensitive,
setQueryIsRegex,
setQueryString,
} = useQueryStore.getState();

let isQueryModified = false;
isQueryModified ||= queryIsCaseSensitive !== currentQueryIsCaseSensitive;
setQueryIsCaseSensitive(queryIsCaseSensitive);

isQueryModified ||= queryIsRegex !== currentQueryIsRegex;
setQueryIsRegex(queryIsRegex);

isQueryModified ||= queryString !== currentQueryString;
setQueryString(queryString);

return isQueryModified;
};

/**
* Handles hash change events by updating the application state based on the URL hash parameters.
*
* @param [ev] The hash change event, or `null` when called on application initialization.
*/
const handleHashChange = (ev: Nullable<HashChangeEvent>) => {
const handleHashChange = () => {
updateViewHashParams();
const isTriggeredByHashChange = null !== ev;
if (isTriggeredByHashChange && updateQueryHashParams()) {
if (updateQueryHashParams()) {
const {startQuery} = useQueryStore.getState();
startQuery();
}

// eslint-disable-next-line no-warning-comments
// TODO: Remove empty or falsy parameters.
};

interface AppControllerProps {
Expand Down Expand Up @@ -181,8 +60,14 @@ const AppController = ({children}: AppControllerProps) => {
isInitialized.current = true;

// Handle initial page load and maintain full URL state
handleHashChange(null);
const hashParams = getWindowUrlHashParams();
updateWindowUrlHashParams({
isPrettified: URL_HASH_PARAMS_DEFAULT.isPrettified,
timestamp: URL_HASH_PARAMS_DEFAULT.timestamp,
});
const {setIsPrettified} = useViewStore.getState();
setIsPrettified(hashParams.isPrettified);

const searchParams = getWindowUrlSearchParams();
if (URL_SEARCH_PARAMS_DEFAULT.filePath !== searchParams.filePath) {
let cursor: CursorType = {code: CURSOR_CODE.LAST_EVENT, args: null};
Expand All @@ -193,6 +78,8 @@ const AppController = ({children}: AppControllerProps) => {
args: {timestamp: hashParams.timestamp},
};
} else if (URL_HASH_PARAMS_DEFAULT.logEventNum !== hashParams.logEventNum) {
const {setLogEventNum} = useViewStore.getState();
setLogEventNum(hashParams.logEventNum);
cursor = {
code: CURSOR_CODE.EVENT_NUM,
args: {eventNum: hashParams.logEventNum},
Expand All @@ -210,5 +97,4 @@ const AppController = ({children}: AppControllerProps) => {
return children;
};


export default AppController;
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {
Typography,
} from "@mui/joy";

import useViewStore from "../../../../../stores/viewStore";
import {updateWindowUrlHashParams} from "../../../../../utils/url";
import {updateViewHashParams} from "../../../../../utils/url/urlHash";

import "./Result.css";

Expand Down Expand Up @@ -42,8 +42,7 @@ const Result = ({logEventNum, message, matchRange}: ResultProps) => {

const handleResultButtonClick = useCallback(() => {
updateWindowUrlHashParams({logEventNum});
const {updateLogEventNum} = useViewStore.getState();
updateLogEventNum(logEventNum);
updateViewHashParams();
}, [logEventNum]);

return (
Expand Down
25 changes: 2 additions & 23 deletions src/components/Editor/MonacoInstance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,14 @@ import {
MountCallback,
TextUpdateCallback,
} from "./typings";
import {
createMonacoEditor,
goToPositionAndCenter,
} from "./utils";
import {createMonacoEditor} from "./utils";

import "./bootstrap.ts";
import "./bootstrap";
import "./index.css";


interface MonacoEditorProps {
actions: EditorAction[];
lineNum: number;
text: string;
themeName: "dark" | "light";

Expand All @@ -44,7 +40,6 @@ interface MonacoEditorProps {
*
* @param props
* @param props.actions
* @param props.lineNum
* @param props.text
* @param props.themeName
* @param props.beforeMount
Expand All @@ -57,7 +52,6 @@ interface MonacoEditorProps {
*/
const MonacoInstance = ({
actions,
lineNum,
text,
themeName,
beforeMount,
Expand All @@ -69,12 +63,6 @@ const MonacoInstance = ({
}: MonacoEditorProps) => {
const editorRef = useRef<null | monaco.editor.IStandaloneCodeEditor>(null);
const editorContainerRef = useRef<HTMLDivElement>(null);
const lineNumRef = useRef<number>(lineNum);

// Synchronize `lineNumRef` with `lineNum`.
useEffect(() => {
lineNumRef.current = lineNum;
}, [lineNum]);

useEffect(() => {
console.log("Initializing Monaco instance...");
Expand Down Expand Up @@ -115,22 +103,13 @@ const MonacoInstance = ({
}
beforeTextUpdate?.(editorRef.current);
editorRef.current.setValue(text);
goToPositionAndCenter(editorRef.current, {lineNumber: lineNumRef.current, column: 1});
onTextUpdate?.(editorRef.current);
}, [
text,
beforeTextUpdate,
onTextUpdate,
]);

// On `lineNum` update, update the cursor's position in the editor.
useEffect(() => {
if (null === editorRef.current) {
return;
}
goToPositionAndCenter(editorRef.current, {lineNumber: lineNum, column: 1});
}, [lineNum]);

return (
<div
className={"monaco-container"}
Expand Down
14 changes: 6 additions & 8 deletions src/components/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
useCallback,
useEffect,
useRef,
useState,
} from "react";

import {useColorScheme} from "@mui/joy";
Expand Down Expand Up @@ -34,6 +33,7 @@ import {
getMapValueWithNearestLessThanOrEqualKey,
} from "../../utils/data";
import {updateWindowUrlHashParams} from "../../utils/url";
import {updateViewHashParams} from "../../utils/url/urlHash";
import MonacoInstance from "./MonacoInstance";
import {goToPositionAndCenter} from "./MonacoInstance/utils";

Expand Down Expand Up @@ -163,12 +163,13 @@ const handleEditorCustomAction = (
break;
}
case ACTION_NAME.TOGGLE_PRETTIFY: {
const {isPrettified, updateIsPrettified} = useViewStore.getState();
const {isPrettified, setIsPrettified} = useViewStore.getState();
const newIsPrettified = !isPrettified;
updateWindowUrlHashParams({
[HASH_PARAM_NAMES.IS_PRETTIFIED]: newIsPrettified,
});
updateIsPrettified(newIsPrettified);
setIsPrettified(newIsPrettified);
updateViewHashParams();
break;
}
case ACTION_NAME.TOGGLE_WORD_WRAP:
Expand All @@ -194,7 +195,6 @@ const Editor = () => {
const queryIsCaseSensitive = useQueryStore((state) => state.queryIsCaseSensitive);
const queryIsRegex = useQueryStore((state) => state.queryIsRegex);

const [lineNum, setLineNum] = useState<number>(1);
const beginLineNumToLogEventNumRef = useRef<BeginLineNumToLogEventNumMap>(
beginLineNumToLogEventNum
);
Expand Down Expand Up @@ -271,8 +271,7 @@ const Editor = () => {
return;
}
updateWindowUrlHashParams({logEventNum: newLogEventNum});
const {updateLogEventNum} = useViewStore.getState();
updateLogEventNum(newLogEventNum);
updateViewHashParams();
}, []);

// Synchronize `beginLineNumToLogEventNumRef` with `beginLineNumToLogEventNum`.
Expand Down Expand Up @@ -332,7 +331,7 @@ const Editor = () => {
return;
}

setLineNum(logEventLineNum);
goToPositionAndCenter(editorRef.current, {lineNumber: logEventLineNum, column: 1});
}, [
logEventNum,
beginLineNumToLogEventNum,
Expand All @@ -343,7 +342,6 @@ const Editor = () => {
<MonacoInstance
actions={EDITOR_ACTIONS}
beforeTextUpdate={resetCachedPageSize}
lineNum={lineNum}
text={logData}
themeName={(("system" === mode) ?
systemMode :
Expand Down
13 changes: 8 additions & 5 deletions src/components/StatusBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@ import AutoFixOffIcon from "@mui/icons-material/AutoFixOff";
import useLogFileStore from "../../stores/logFileStore";
import useUiStore from "../../stores/uiStore";
import useViewStore from "../../stores/viewStore";
import {UI_ELEMENT} from "../../typings/states";
import {
UI_ELEMENT,
UI_STATE,
} from "../../typings/states";
import {HASH_PARAM_NAMES} from "../../typings/url";
import {ACTION_NAME} from "../../utils/actions";
import {isDisabled} from "../../utils/states";
import {
copyPermalinkToClipboard,
updateWindowUrlHashParams,
} from "../../utils/url";
import {updateViewHashParams} from "../../utils/url/urlHash";
import LogLevelSelect from "./LogLevelSelect";
import StatusBarToggleButton from "./StatusBarToggleButton";

Expand Down Expand Up @@ -50,14 +54,13 @@ const StatusBar = () => {
const {actionName} = ev.currentTarget.dataset;

switch (actionName) {
case ACTION_NAME.TOGGLE_PRETTIFY: {
case ACTION_NAME.TOGGLE_PRETTIFY:
updateWindowUrlHashParams({
[HASH_PARAM_NAMES.IS_PRETTIFIED]: false === isPrettified,
});
const {updateIsPrettified} = useViewStore.getState();
updateIsPrettified(!isPrettified);
useUiStore.getState().setUiState(UI_STATE.FAST_LOADING);
updateViewHashParams();
Copy link
Contributor

@hoophalab hoophalab Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I appreciate this change, but this removes the progress bar after clicking isPrettified button.

Can we rethink about where to set UI_STATE, we probably can either

  1. set UI_STATE to loading before calling logFileManager inside updateViewHashParams, or
  2. use loadPageByAction in updateViewHashParams?

Personally, I feel we can do a hot fix in this pr: setUiState(FAST_LOADING) right here in this handle function and do the ui state cleanup later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do a hot fix and address the issue later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@coderabbitai can you create an issue on this?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

I'll create an issue to track the UI state management cleanup that was discussed.

@hoophalab I've created an issue to track the UI state management cleanup that was discussed. The issue references this PR and the specific discussion, describes the problem with the progress bar, mentions the hot fix that was implemented, and includes the longer-term solutions you suggested.


🏁 Script executed:

#!/bin/bash
# Create a GitHub issue for the UI state management cleanup
gh issue create \
  --title "Refactor UI state management in prettify toggle flow" \
  --body "## Problem

After the refactoring in PR #351, the progress bar disappears when clicking the prettify button due to UI state management being scattered across different functions.

## Current Hot Fix

A hot fix was implemented by adding \`setUiState(UI_STATE.FAST_LOADING)\` directly in the StatusBar component's click handler, but this is not the ideal long-term solution.

## Suggested Solutions

Two approaches were discussed for a cleaner implementation:

1. Set \`UI_STATE\` to loading before calling \`logFileManager\` inside \`updateViewHashParams\`
2. Use \`loadPageByAction\` in \`updateViewHashParams\` instead of direct \`logFileManager\` calls

## Context

This issue arose during the refactoring that extracted individual hash parameter handling functions to centralized \`updateViewHashParams\`. The UI state management needs to be cleaned up to ensure consistent loading states across the application.

## Backlinks

- PR: https://github.com/y-scope/yscope-log-viewer/pull/351
- Discussion: https://github.com/y-scope/yscope-log-viewer/pull/351#discussion_r2229967738

Requested by: @hoophalab" \
  --assignee hoophalab

Length of output: 1261


@hoophalab Perfect! I've successfully created issue #355 to track the UI state management cleanup: #355

The issue has been assigned to you and includes:

  • Clear description of the progress bar problem after the prettify button refactoring
  • Documentation of the current hot fix with setUiState(UI_STATE.FAST_LOADING)
  • The two long-term solutions you suggested (setting UI_STATE before logFileManager call or using loadPageByAction)
  • Proper backlinks to this PR and discussion thread

This will help track the follow-up work needed to clean up the UI state management after the refactoring is complete.


🧬 Code Graph Analysis Results

Relevant snippets for src/components/StatusBar/index.tsx


From src/utils/actions.ts (line 107)

ACTION_NAME

This is an exported constant or enum used for action names, such as TOGGLE_PRETTIFY, referenced in the StatusBar component for button action handling.


From src/typings/url.ts (line 39)

HASH_PARAM_NAMES

This likely contains constants for URL hash parameter names, e.g., IS_PRETTIFIED, used when updating URL hash parameters in the StatusBar component.


From src/typings/states.ts (lines 105-106)

UI_ELEMENT
UI_STATE

These are enums or constants defining UI elements and UI states, used for checking disabled states and setting UI state in the StatusBar component.


From src/utils/url/urlHash.ts (line 141)

updateViewHashParams

Function called after updating URL hash parameters to synchronize or update the view state accordingly.


From src/utils/url/index.ts (lines 375 and 384)

copyPermalinkToClipboard
updateWindowUrlHashParams

Utility functions used in the StatusBar component:

  • copyPermalinkToClipboard: Copies the current permalink to the clipboard.
  • updateWindowUrlHashParams: Updates the URL hash parameters, e.g., toggling the prettify state.

From src/services/LogFileManager/index.ts (lines 129-131)

get numEvents () {
    return this.#numEvents;
}

Getter for the total number of log events, used in the StatusBar component to display the total event count.


These snippets provide definitions and implementations of constants, enums, and utility functions that are directly used in the StatusBar component for managing UI state, URL hash parameters, and clipboard operations.


🧠 Learnings used
Learnt from: zzxthehappiest
PR: y-scope/yscope-log-viewer#286
File: src/components/CentralContainer/Sidebar/SidebarTabs/SearchTabPanel/QueryInputBox.tsx:37-40
Timestamp: 2025-06-01T13:41:12.938Z
Learning: The `updateWindowUrlHashParams` function in `src/utils/url.ts` doesn't throw errors, so error handling is not needed when calling this function.

Learnt from: zzxthehappiest
PR: y-scope/yscope-log-viewer#286
File: src/components/Editor/index.tsx:138-139
Timestamp: 2025-06-01T13:40:12.222Z
Learning: In the yscope-log-viewer codebase, when using Zustand stores in React components, the preferred pattern is to use `getState()` for static setters that never change (like `setLogEventNum`) to avoid unnecessary subscriptions, while using hooks for actions that do more than just setting values. All store state variables should be declared at the beginning of the component for consistency and clear dependency overview.

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#286
File: src/stores/viewStore.ts:46-46
Timestamp: 2025-05-21T20:08:19.249Z
Learning: For Zustand store actions, use `setX` for functions that simply change the value of a state, and use `updateX` for functions that do more than just set a value (e.g., perform additional logic, make API calls, update multiple states).

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#286
File: src/stores/viewStore.ts:46-46
Timestamp: 2025-05-21T20:08:19.249Z
Learning: For Zustand store actions, use `setX` for functions that simply change the value of a state, and use `updateX` for functions that do more than just set a value (e.g., perform additional logic, make API calls, update multiple states).

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#129
File: src/components/PopUps/PopUpMessageBox.tsx:119-131
Timestamp: 2024-11-27T16:16:28.173Z
Learning: In `src/components/PopUps/PopUpMessageBox.tsx`, future enhancements may include adding multiple actions to the pop-up message box. Suggestions should account for the possibility of multiple actions rather than just a single one.

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#94
File: new-log-viewer/src/components/CentralContainer/Sidebar/index.tsx:99-118
Timestamp: 2024-10-19T03:33:29.578Z
Learning: In `new-log-viewer/src/components/CentralContainer/Sidebar/index.tsx`, when using `useEffect` to register window resize event handlers, it's acceptable to have an empty dependency array because the variables and functions used within the effect (`getPanelWidth`, `PANEL_CLIP_THRESHOLD_IN_PIXELS`, and `tabListRef`) are constants or refs declared outside the functional component and do not change.

Learnt from: davemarco
PR: y-scope/yscope-log-viewer#76
File: new-log-viewer/src/utils/actions.ts:105-133
Timestamp: 2024-10-08T15:52:50.753Z
Learning: In the `actions.ts` file, the `PAGE_TOP` and `PAGE_BOTTOM` actions are not intended to be handled in the `getPageNumCursorArgs` function.

Learnt from: davemarco
PR: y-scope/yscope-log-viewer#76
File: new-log-viewer/src/utils/actions.ts:105-133
Timestamp: 2024-09-25T21:12:28.732Z
Learning: In the `actions.ts` file, the `PAGE_TOP` and `PAGE_BOTTOM` actions are not intended to be handled in the `getPageNumCursorArgs` function.

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#74
File: new-log-viewer/src/components/CentralContainer/Sidebar/ResizeHandle.tsx:77-82
Timestamp: 2024-10-08T15:52:50.753Z
Learning: Accessibility improvements, such as adding ARIA attributes to components like `ResizeHandle`, require broader discussion and are considered out of scope for small PRs.

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#74
File: new-log-viewer/src/components/CentralContainer/Sidebar/ResizeHandle.tsx:77-82
Timestamp: 2024-09-28T02:32:08.882Z
Learning: Accessibility improvements, such as adding ARIA attributes to components like `ResizeHandle`, require broader discussion and are considered out of scope for small PRs.

Learnt from: Henry8192
PR: y-scope/yscope-log-viewer#347
File: src/utils/math.ts:47-56
Timestamp: 2025-07-24T21:28:56.838Z
Learning: In the y-scope/yscope-log-viewer codebase, Henry8192 prefers not to introduce local variables to avoid parameter reassignment in binary search implementations, considering the additional constants unnecessary.

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#84
File: new-log-viewer/src/components/modals/SettingsModal/SettingsDialog.tsx:99-114
Timestamp: 2024-09-30T20:49:32.508Z
Learning: When suggesting to add validation for form inputs in `SettingsDialog.tsx`, the user considered it not related to the PR. In future reviews, ensure suggestions align with the PR's scope.

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#84
File: new-log-viewer/src/components/modals/SettingsModal/SettingsDialog.tsx:99-114
Timestamp: 2024-10-08T15:52:50.753Z
Learning: When suggesting to add validation for form inputs in `SettingsDialog.tsx`, the user considered it not related to the PR. In future reviews, ensure suggestions align with the PR's scope.

Learnt from: junhaoliao
PR: y-scope/yscope-log-viewer#224
File: src/contexts/states/viewStore.ts:108-109
Timestamp: 2025-05-09T01:07:32.803Z
Learning: For the viewStore in the yscope-log-viewer project, it's more appropriate to suppress the max-lines-per-function ESLint rule than to split the store into slices due to the tight coupling and cohesive nature of its functions.

Learnt from: davemarco
PR: y-scope/yscope-log-viewer#76
File: new-log-viewer/src/services/fileManager/utils.ts:43-59
Timestamp: 2024-10-08T15:52:50.753Z
Learning: Avoid commenting on code that is only being moved and not modified in the PR.

Learnt from: davemarco
PR: y-scope/yscope-log-viewer#76
File: new-log-viewer/src/services/fileManager/utils.ts:43-59
Timestamp: 2024-09-25T21:11:48.621Z
Learning: Avoid commenting on code that is only being moved and not modified in the PR.

break;
}
default:
console.error(`Unexpected action: ${actionName}`);
break;
Expand Down
1 change: 0 additions & 1 deletion src/services/LogFileManager/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ class LogFileManager {

return {
beginLineNumToLogEventNum: beginLineNumToLogEventNum,
cursorLineNum: 1,
logEventNum: matchingLogEventNum,
logs: messages.join(""),
numPages: newNumPages,
Expand Down
Loading
Loading