Skip to content

Various fixes#26

Open
ndorin wants to merge 6 commits intomainfrom
various-fixes
Open

Various fixes#26
ndorin wants to merge 6 commits intomainfrom
various-fixes

Conversation

@ndorin
Copy link
Copy Markdown
Contributor

@ndorin ndorin commented May 5, 2026

This pull request enhances the configuration file viewer and improves the search functionality in the debug console by introducing a Redux-controlled search state. It also refactors the FilterSearchText and ListFiltersHeader components to support both controlled (Redux) and uncontrolled (URL param) modes, making the search experience more consistent and maintainable across the app.

Debug Console Search Improvements

  • Refactored the debug console search box to use Redux state, allowing the search text to be managed centrally and persist across component reloads. This includes connecting the input to Redux selectors and dispatching actions on change (src/features/DebugConsole/DebugConsole.tsx, src/store/debugConsole/debugConsoleSelectors, src/store/debugConsole/debugConsoleSlice). [1] [2] [3]

Component Generalization and API Changes

  • Updated FilterSearchText to support both controlled (Redux) and uncontrolled (URL param) modes, with new props for value and onChangeValue, and adjusted its internal state and effect logic accordingly (src/shared/FilterSearchText.tsx). [1] [2] [3]
  • Modified ListFiltersHeader to accept and pass down the new controlled search props, enabling parent components to manage the search state (src/shared/ListFiltersHeader.tsx). [1] [2]

Config File Viewer Enhancement

  • Added a "Refresh Config" button to the config file viewer, allowing users to manually reload configuration data with loading state feedback (src/features/ConfigFile.tsx).

ndorin and others added 2 commits May 5, 2026 14:28
…eader; enhance FilterSearchText for controlled mode

Co-authored-by: Copilot <copilot@github.com>
…state handling; adjust ListFiltersHeader styling

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 20:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors shared search UI to support both URL-parameter (uncontrolled) and Redux-driven (controlled) search state, then applies the controlled mode to the Debug Console. It also adds a manual refresh action to the config viewer.

Changes:

  • Introduces Redux-controlled search text for the Debug Console and wires it into the existing filtering flow.
  • Generalizes FilterSearchText / ListFiltersHeader to support controlled vs uncontrolled (URL param) search state.
  • Adds a “Refresh Config” button with loading-state feedback to the config file viewer.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/shared/ListFiltersHeader.tsx Adds optional controlled search props and passes them to FilterSearchText.
src/shared/FilterSearchText.tsx Adds controlled-mode support and sync logic between props vs URL search params.
src/features/DebugConsole/DebugConsole.tsx Connects Debug Console search input to Redux state/actions.
src/features/ConfigFile.tsx Adds a manual refetch button for config data with disabled/loading UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/shared/FilterSearchText.tsx Outdated
Comment on lines 12 to 14
/** Debounce timer for search box */
let searchTimerHandle: NodeJS.Timeout;
const PARAM = 'searchText';
Comment thread src/shared/FilterSearchText.tsx
Comment thread src/shared/FilterSearchText.tsx Outdated
ndorin and others added 2 commits May 5, 2026 15:00
…eness

Co-authored-by: Copilot <copilot@github.com>
… clean up code formatting

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings May 5, 2026 21:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/shared/ListFiltersHeader.tsx
Comment thread src/shared/FilterSearchText.tsx
Comment thread src/shared/FilterSearchText.tsx Outdated
Comment thread src/features/DebugConsole/DebugConsole.tsx
Comment thread src/features/LoginForm.tsx Outdated
…ss multiple components

Co-authored-by: Copilot <copilot@github.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

onChangeValue(val);
} else {
// URL params mode (default)
const tokens = val.split(" ");
Comment on lines +12 to 16
const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
const PARAM = "searchText";
const [searchParams, setSearchParams] = useSearchParams();
const [searchText, setSearchText] = useState<string>('');
const [searchText, setSearchText] = useState<string>(controlledValue ?? "");

Comment on lines 1 to 5
import { skipToken } from '@reduxjs/toolkit/query';
import { useState } from "react";
import { Alert, Button, Form } from "react-bootstrap";
import { useSelector } from 'react-redux';
import ListFiltersHeader from "../../shared/ListFiltersHeader";
import useAppParams from '../../shared/hooks/useAppParams';
Comment on lines +1 to +5
import { FormEvent, useState } from "react";
import { Alert, Button, Form, Spinner } from "react-bootstrap";
import { Navigate, useLocation, useNavigate } from "react-router-dom";
import useAppParams from "../shared/hooks/useAppParams";
import { useSetLoginCredentialsMutation } from "../store/apiSlice";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants