Conversation
…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>
There was a problem hiding this comment.
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/ListFiltersHeaderto 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.
| /** Debounce timer for search box */ | ||
| let searchTimerHandle: NodeJS.Timeout; | ||
| const PARAM = 'searchText'; |
…eness Co-authored-by: Copilot <copilot@github.com>
… clean up code formatting Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
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.
…ss multiple components Co-authored-by: Copilot <copilot@github.com>
There was a problem hiding this comment.
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(" "); |
| 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 ?? ""); | ||
|
|
| 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'; |
| 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"; |
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
FilterSearchTextandListFiltersHeadercomponents 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
src/features/DebugConsole/DebugConsole.tsx,src/store/debugConsole/debugConsoleSelectors,src/store/debugConsole/debugConsoleSlice). [1] [2] [3]Component Generalization and API Changes
FilterSearchTextto support both controlled (Redux) and uncontrolled (URL param) modes, with new props forvalueandonChangeValue, and adjusted its internal state and effect logic accordingly (src/shared/FilterSearchText.tsx). [1] [2] [3]ListFiltersHeaderto 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
src/features/ConfigFile.tsx).