feedback-to-code/mozzarella huggingface dataset:
Repository: provectus/kafka-ui
Issue: Unable to delete topics with names beginning with an underscore
Labels: type/bug
good first issue
scope/backend
status/accepted
status/confirmed
hacktoberfest

### Discussed in https://github.com/provectus/kafka-ui/discussions/2755

<div type='discussions-op-text'>

<sup>Originally posted by **nitin1677** October 14, 2022</sup>
Kafka UI Version: d149d26013a81e22e5d0c8b59db56ac0565b9e55 ( [d149d26](https://github.com/provectus/kafka-ui/commit/d149d26))


Remove topic options are disabled for topics, where topic-name starts with underscore (_). what are the options to enable delete for topics, where name starts with underscore (_).</div>

Issue comments:
The internality flag is being defaulted to a single underscore character now. Can be overridden with "kafka_clusters_internalTopicPrefix" property.

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/model/InternalTopic.java b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/model/InternalTopic.java
index b669d0db414..a553165de4d 100644
--- a/kafka-ui-api/src/main/java/com/provectus/kafka/ui/model/InternalTopic.java
+++ b/kafka-ui-api/src/main/java/com/provectus/kafka/ui/model/InternalTopic.java
@@ -42,9 +42,7 @@ public static InternalTopic from(TopicDescription topicDescription,
                                    Metrics metrics,
                                    InternalLogDirStats logDirInfo) {
     var topic = InternalTopic.builder();
-    topic.internal(
-        topicDescription.isInternal() || topicDescription.name().startsWith("_")
-    );
+    topic.internal(topicDescription.isInternal());
     topic.name(topicDescription.name());
 
     List<InternalPartition> partitions = topicDescription.partitions().stream()


Test patch:
Repository: provectus/kafka-ui
Issue: KSQL: Container with query "Status" is too narrow
Labels: good first issue
scope/frontend
status/accepted
type/chore
hacktoberfest

**Set up**
[d1d46b6](https://github.com/provectus/kafka-ui/commit/d1d46b6)


**Steps to Reproduce**
1. Open KSQL DB in navigation sidebar.
2. Fill in some query and Execute it. E.g.:
`CREATE STREAM first.messagesStream1
  (viewtime BIGINT,
   userid VARCHAR,
   pageid VARCHAR)
  WITH (KAFKA_TOPIC='first.messages',
        VALUE_FORMAT='DELIMITED');`

4. See the status bar under the "Execute", "Stop query", and "Clear results" button.
**Actual behavior**
Status container is too narrow, when the window width exceeds 1200px:

https://user-images.githubusercontent.com/112083452/197765749-8671d584-cf43-4fc4-9680-6c88e50b560e.mov


**Expected behavior**
All containers should fit window width without any overlay.


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/KsqlDb/Query/renderer/TableRenderer/TableRenderer.styled.tsx b/kafka-ui-react-app/src/components/KsqlDb/Query/renderer/TableRenderer/TableRenderer.styled.tsx
index c02c30d3691..96ef549aa69 100644
--- a/kafka-ui-react-app/src/components/KsqlDb/Query/renderer/TableRenderer/TableRenderer.styled.tsx
+++ b/kafka-ui-react-app/src/components/KsqlDb/Query/renderer/TableRenderer/TableRenderer.styled.tsx
@@ -8,6 +8,7 @@ export const Wrapper = styled.div`
 
 export const ScrollableTable = styled(Table)`
   overflow-y: scroll;
+  width: 100%;
 
   td {
     vertical-align: top;


Test patch:
Repository: provectus/kafka-ui
Issue: Seek type field became empty with refreshing the page
Labels: type/bug
good first issue
scope/frontend
status/accepted
status/confirmed


**Describe the bug**
Seek type field became empty with refreshing the Topic/Messages

**Set up**
https://www.kafka-ui.provectus.io/


**Steps to Reproduce**

Steps to reproduce the behavior:

1. Navigate to Topic/Messages tab
2. Make sure Seek Type value is "Offset" by default
3. Refresh the page

**Expected behavior**
The default "Offset" value should stay for Seek Type

**Screenshots**

https://user-images.githubusercontent.com/104780608/199174719-8ddb7f18-3526-4335-b70c-63c2739d92a5.mov




**Additional context**
<!--
(Add any other context about the problem here)
-->


Issue comments:

Pull request review comments:
i think we can use find here instead of iterating over the array twice , 
[MDN doc for find](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find)

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx b/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx
index c010ca65cb5..1b99650f715 100644
--- a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx
+++ b/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx
@@ -109,7 +109,11 @@ const Filters: React.FC<FiltersProps> = ({
   );
 
   const [currentSeekType, setCurrentSeekType] = React.useState<SeekType>(
-    (searchParams.get('seekType') as SeekType) || SeekType.OFFSET
+    SeekTypeOptions.find(
+      (ele) => ele.value === (searchParams.get('seekType') as SeekType)
+    ) !== undefined
+      ? (searchParams.get('seekType') as SeekType)
+      : SeekType.OFFSET
   );
   const [offset, setOffset] = React.useState<string>(
     getOffsetFromSeekToParam(searchParams)


Test patch:
Repository: provectus/kafka-ui
Issue: [UI] Timestamp value overlaps with dropdown field icon within Topic/Messages
Labels: good first issue
scope/frontend
status/accepted
type/chore


**Describe the bug**
The selected value of Timestamp overlaps with dropdown field icon within Topic/Messages

**Set up**
https://www.kafka-ui.provectus.io/

**Steps to Reproduce**

Steps to reproduce the behavior:

1. Navigate to Topic/Messages tab
2. Select Timestamp for Seek Type field
3. Choose the date for Timestamp filed


**Expected behavior**
Dropdown filed icon should not overlap with selected value

**Screenshots**
<img width="1728" alt="timestamp value" src="https://user-images.githubusercontent.com/104780608/199179175-1554c741-48cc-4623-a31a-5693b41ba8ac.png">






Issue comments:
as a workaround we could display a short month name instead and keep the field the same width
@Haarolean 
https://github.com/provectus/kafka-ui/blob/70cdeea819e812ccf38bb1daa1dd27ba6296d28a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx#L422-L430

```jsx
dateFormat="MMM D, YYYY HH:mm" //Nov 7, 2022 10:45
```
should be okay?
> @Haarolean
> 
> https://github.com/provectus/kafka-ui/blob/70cdeea819e812ccf38bb1daa1dd27ba6296d28a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx#L422-L430
> 
> ```js
> dateFormat="MMM D, YYYY HH:mm" //Nov 7, 2022 10:45
> ```
> 
> should be okay?

yeah, thanks

Pull request review comments:
```suggestion
                  dateFormat="MMM d, yyyy HH:mm"
```

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx b/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx
index 1b99650f715..9f54e56d5a4 100644
--- a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx
+++ b/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.tsx
@@ -428,7 +428,7 @@ const Filters: React.FC<FiltersProps> = ({
                   onChange={(date: Date | null) => setTimestamp(date)}
                   showTimeInput
                   timeInputLabel="Time:"
-                  dateFormat="MMMM d, yyyy HH:mm"
+                  dateFormat="MMM d, yyyy HH:mm"
                   placeholderText="Select timestamp"
                   disabled={isTailing}
                 />


Test patch:
Repository: provectus/kafka-ui
Issue: Make e2e tests possible to run without qaseio token
Labels: scope/QA
status/accepted
type/chore
scope/AQA


Issue comments:
+ documentation #2432

Pull request review comments:
can we add some logging here with warn level please? so the folks who run this locally won't get frustrated

Patch that resolved the issue:
diff --git a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/QaseExtension.java b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/QaseExtension.java
index 52c3ff9b908..474acd10999 100644
--- a/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/QaseExtension.java
+++ b/kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/QaseExtension.java
@@ -35,21 +35,22 @@ public class QaseExtension implements TestExecutionListener {
     private final ResultsApi resultsApi = new ResultsApi(apiClient);
     private final Map<TestIdentifier, Long> testStartTimes = new ConcurrentHashMap<>();
     private static final String QASE_PROJECT = "KAFKAUI";
-    private static final String QASE_ENABLE = "true";
 
     static {
         String qaseApiToken = System.getProperty("QASEIO_API_TOKEN");
-        if (qaseApiToken == null || StringUtils.isEmpty(qaseApiToken)) {
-            throw new RuntimeException("QaseIO API token should be present");
-        }
-        if ("true".equalsIgnoreCase(System.getProperty("QASEIO_CREATE_TESTRUN"))) {
-            System.setProperty("QASE_RUN_NAME", "Automation run " +
-                    new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date()));
+        if (StringUtils.isEmpty(qaseApiToken)) {
+            log.warn("QASEIO_API_TOKEN system property is not set. Support for Qase will be disabled.");
+            System.setProperty("QASE_ENABLE", "false");
+        } else {
+            System.setProperty("QASE_ENABLE", "true");
+            System.setProperty("QASE_PROJECT_CODE", QASE_PROJECT);
+            System.setProperty("QASE_API_TOKEN", qaseApiToken);
+            System.setProperty("QASE_USE_BULK", "false");
+            if ("true".equalsIgnoreCase(System.getProperty("QASEIO_CREATE_TESTRUN"))) {
+              System.setProperty("QASE_RUN_NAME", "Automation run " +
+                   new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date()));
+            }
         }
-        System.setProperty("QASE_ENABLE", QASE_ENABLE);
-        System.setProperty("QASE_PROJECT_CODE", QASE_PROJECT);
-        System.setProperty("QASE_API_TOKEN", qaseApiToken);
-        System.setProperty("QASE_USE_BULK", "false");
     }
 
     @Override


Test patch:
Repository: provectus/kafka-ui
Issue: CVEs fixes, October 22
Labels: good first issue
scope/backend
type/security
status/accepted

https://github.com/provectus/kafka-ui/actions/runs/3058781951/jobs/4935377778
Bump snakeyaml deps

Issue comments:
Can I work on this and raise a PR ?
Hey, sure.
@royca If you don't mind I would like to work on this since there has been no PR or any discussion for 12 days
@Haarolean please assign to me this issue if it possible
A fix for
CVE-2022-31690
CVE-2022-31692
New dependency [unavailable yet](https://github.com/spring-projects/spring-security/issues/12131), waiting for a spring boot 2.7.6.

Fixes for:
CVE-2022-3171
CVE-2022-36944
GHSA-h4h5-3hr4-j3g2
are unavailable yet, blame/wait for confluent

Snake yaml CVEs:
CVE-2022-25857  
CVE-2022-38749 
CVE-2022-38750 
CVE-2022-38751 
 CVE-2022-38752   

are [false positives](https://github.com/spring-projects/spring-boot/issues/32221).

Others have been fixed within #2926
@Haarolean I could see snakeyaml CVEs are false positive. Is it? I could see the issues created 

Here is an example 
https://bitbucket.org/snakeyaml/snakeyaml/issues/525 and they have been resolved.

So, is it possible to provide snakeyaml version 1.33 in 2.7.x version?
@Subrhamanya yes they are according to [this thread](https://github.com/spring-projects/spring-boot/issues/32221).
Anyway, we've bumped some dependencies once again and now we have a newer transitive snakeyaml version.
Does that mean 2.7.6 version of spring-boot will have snakeyaml version 1.33?
> Does that mean 2.7.6 version of spring-boot will have snakeyaml version 1.33?

AFAIK, yes.

Pull request review comments:

Patch that resolved the issue:
diff --git a/pom.xml b/pom.xml
index 73d3bfeb3ad..ecb707e1da0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -14,7 +14,7 @@
         <maven.compiler.release>17</maven.compiler.release>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <spring-boot.version>2.6.8</spring-boot.version>
+        <spring-boot.version>2.7.5</spring-boot.version>
         <jackson-databind-nullable.version>0.2.2</jackson-databind-nullable.version>
         <org.mapstruct.version>1.4.2.Final</org.mapstruct.version>
         <org.projectlombok.version>1.18.20</org.projectlombok.version>
@@ -33,7 +33,7 @@
         <swagger-annotations.version>1.6.0</swagger-annotations.version>
         <springdoc-openapi-webflux-ui.version>1.2.32</springdoc-openapi-webflux-ui.version>
         <avro.version>1.11.0</avro.version>
-        <confluent.version>7.0.1</confluent.version>
+        <confluent.version>7.3.0</confluent.version>
         <apache.commons.version>2.11.1</apache.commons.version>
         <test.containers.version>1.17.1</test.containers.version>
         <okhttp3.mockwebserver.version>4.10.0</okhttp3.mockwebserver.version>


Test patch:
Repository: provectus/kafka-ui
Issue: Unchecking the already checked Topics from main checkbox is not available 
Labels: type/bug
good first issue
scope/frontend
status/accepted
status/confirmed

**Describe the bug**
Unchecking the already checked Topics from main checkbox is not working 

**Set up**
https://www.kafka-ui.provectus.io/


**Steps to Reproduce**

Steps to reproduce the behavior:

1. Navigate to Topics page
2. Check the main checkbox for all Topics
3. Make sure all topics are checked
4. Uncheck the main checkbox

**Expected behavior**
All the Topics should became unchecked

**Screenshots**

https://user-images.githubusercontent.com/104780608/199652821-94339eab-2552-47f7-933d-0f312b614211.mov




**Additional context**
<!--
(Add any other context about the problem here)
-->


Issue comments:
The important precondition is to have "show internal topics" on
Seems not fixed, unchecking is not available.

Pull request review comments:
I don't think this is the correct solution you just removed the props from the common component , this change will break the check when all the items are selected the header will not show the check.

in `SelectRowHeader`  debug onChange function

```
const SelectRowHeader: React.FC<HeaderContext<unknown, unknown>> = ({
  table,
}) => {
  const c = (a: unknown) => {
    console.log('something', table.getIsAllPageRowsSelected());
    table.getToggleAllPageRowsSelectedHandler()(a);
  };

  return (
    <IndeterminateCheckbox
      checked={table.getIsAllPageRowsSelected()}
      indeterminate={table.getIsSomePageRowsSelected()}
      onChange={c}
    />
  );
};
```

check the result in the working case , vs non working case where the result in console stays false. we need to check Tanstack table documentation to see how to navigate around this problem
I have thought  we don't need default value on header checkbox
`table.getIsAllRowsSelected()` yep this is the correct config
We need to change this as well , to `getIsSomeRowsSelected`
`getToggleAllRowsSelectedHandler()` since they all should rely on on Rows selected instead of a PageRows

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/common/NewTable/SelectRowHeader.tsx b/kafka-ui-react-app/src/components/common/NewTable/SelectRowHeader.tsx
index 8121f3cd446..d33282f2838 100644
--- a/kafka-ui-react-app/src/components/common/NewTable/SelectRowHeader.tsx
+++ b/kafka-ui-react-app/src/components/common/NewTable/SelectRowHeader.tsx
@@ -6,9 +6,9 @@ const SelectRowHeader: React.FC<HeaderContext<unknown, unknown>> = ({
   table,
 }) => (
   <IndeterminateCheckbox
-    checked={table.getIsAllPageRowsSelected()}
-    indeterminate={table.getIsSomePageRowsSelected()}
-    onChange={table.getToggleAllPageRowsSelectedHandler()}
+    checked={table.getIsAllRowsSelected()}
+    indeterminate={table.getIsSomeRowsSelected()}
+    onChange={table.getToggleAllRowsSelectedHandler()}
   />
 );
 


Test patch:
Repository: provectus/kafka-ui
Issue: Create connector button is unavailable until the 2nd click
Labels: type/bug
good first issue
scope/frontend
status/accepted
status/confirmed

1. Click create connector button
2. Enter valid json config
3. Switch to the name field, enter the name
4. The button is still unavailable until you click inside the config text area again

Issue comments:
Hi, I love your site. Would you mind if I work on this? 
Hey, sure. Please. 

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/Connect/New/New.tsx b/kafka-ui-react-app/src/components/Connect/New/New.tsx
index 2040f238bd2..2e93b4f5ce5 100644
--- a/kafka-ui-react-app/src/components/Connect/New/New.tsx
+++ b/kafka-ui-react-app/src/components/Connect/New/New.tsx
@@ -42,7 +42,7 @@ const New: React.FC = () => {
   const mutation = useCreateConnector(clusterName);
 
   const methods = useForm<FormValues>({
-    mode: 'onTouched',
+    mode: 'all',
     resolver: yupResolver(validationSchema),
     defaultValues: {
       connectName: get(connects, '0.name', ''),


Test patch:
Repository: provectus/kafka-ui
Issue: KSQL: Focus onto query field after incorrect query execution
Labels: good first issue
scope/frontend
status/accepted
type/chore

**Set up**
[ee920b4](https://github.com/provectus/kafka-ui/commit/ee920b4)

**Steps to Reproduce**
<!-- We'd like you to provide an example setup (via docker-compose, helm, etc.) 
to reproduce the problem, especially with a complex setups. -->
Steps to reproduce the behavior:

1. Select KSQL in the side menu
2. Click "Execute KSQL request"
3. Enter incorrect KSQL statement
4. Click "Execute"
**Actual behavior**
Error message is displayed (which is correct), but the focus is not moved to the KSQL entry field

**Expected behavior**
It is better to change focus back to the KSQL field, as it is most likely, that problem needs to be fixed there (a typo or missed semicolon

**Additional context**
Focus is working ok, if the query is executed via keyboard (CMD+ENTER/CTRL+ENTER)


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx b/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx
index 9965ea5189a..26622881f72 100644
--- a/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx
+++ b/kafka-ui-react-app/src/components/KsqlDb/Query/QueryForm/QueryForm.tsx
@@ -1,4 +1,4 @@
-import React, { useCallback } from 'react';
+import React, { useCallback, useRef } from 'react';
 import { FormError } from 'components/common/Input/Input.styled';
 import { ErrorMessage } from '@hookform/error-message';
 import { useForm, Controller, useFieldArray } from 'react-hook-form';
@@ -8,6 +8,7 @@ import CloseIcon from 'components/common/Icons/CloseIcon';
 import { yupResolver } from '@hookform/resolvers/yup';
 import yup from 'lib/yupExtended';
 import PlusIcon from 'components/common/Icons/PlusIcon';
+import ReactAce from 'react-ace/lib/ace';
 
 import * as S from './QueryForm.styled';
 
@@ -75,6 +76,17 @@ const QueryForm: React.FC<Props> = ({
     }
   }, []);
 
+  const inputRef = useRef<ReactAce>(null);
+
+  const handleFocus = () => {
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const textInput = inputRef?.current?.editor?.textInput as any;
+
+    if (textInput) {
+      textInput.focus();
+    }
+  };
+
   return (
     <S.QueryWrapper>
       <form onSubmit={handleSubmit(submitHandler)}>
@@ -111,6 +123,7 @@ const QueryForm: React.FC<Props> = ({
                     },
                   ]}
                   readOnly={fetching}
+                  ref={inputRef}
                 />
               )}
             />
@@ -188,6 +201,7 @@ const QueryForm: React.FC<Props> = ({
             buttonSize="M"
             type="submit"
             disabled={fetching}
+            onClick={handleFocus}
           >
             Execute
           </Button>


Test patch:
Repository: provectus/kafka-ui
Issue: [UI] Topics: Message tab "Oldest first" button overlaps the "Submit" button on pages narrower than 1100px
Labels: type/bug
scope/frontend
status/accepted
status/confirmed

<!--

Don't forget to check for existing issues/discussions regarding your proposal. We might already have it.
https://github.com/provectus/kafka-ui/issues
https://github.com/provectus/kafka-ui/discussions

-->

**Describe the bug**
<!--(A clear and concise description of what the bug is.)-->


**Set up**
<!--
How do you run the app? Please provide as much info as possible:
1. App version (docker image version or check commit hash in the top left corner in UI)
2. Helm chart version, if you use one
3. Any IAAC configs

We might close the issue without further explanation if you don't provide such information.
-->
[8011f60](https://github.com/provectus/kafka-ui/commit/8011f60)


**Steps to Reproduce**
<!-- We'd like you to provide an example setup (via docker-compose, helm, etc.) 
to reproduce the problem, especially with a complex setups. -->
Steps to reproduce the behavior:

1. Open any topic
2. Switch to Messages tab and play with the browser window width
**Actual behavior**

- Message sorting drop-down list ("Oldest first", "Newest first" or "Live mode" overlays the controls to the left. And since it has transparent layout, looks very strange
- Also the drop-down list values are not fully sown on the screen
- Horizontal scroll is not available

**Expected behavior**
<!--
(A clear and concise description of what you expected to happen)
-->
Messages sorting drop-down list can be shown lower, where Search and "Add filters" button is located.

**Screenshots**
![image](https://user-images.githubusercontent.com/112083452/200556537-60ae28ac-2638-492b-a53d-ae66a3819238.png)

<!--
(If applicable, add screenshots to help explain your problem)
-->


**Additional context**
<!--
(Add any other context about the problem here)
-->

There are related tasks:
[UI] Timestamp value overlaps with dropdown field icon within Topic/Messages [#2858](https://github.com/provectus/kafka-ui/issues/2858)
Improve the Responsive view for Messages/Topic page [#2303](https://github.com/provectus/kafka-ui/issues/2303)


Issue comments:

Pull request review comments:

Patch that resolved the issue:
diff --git a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.styled.ts b/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.styled.ts
index a8df901be4d..10802ee0db1 100644
--- a/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.styled.ts
+++ b/kafka-ui-react-app/src/components/Topics/Topic/Messages/Filters/Filters.styled.ts
@@ -33,6 +33,7 @@ export const FilterInputs = styled.div`
   gap: 8px;
   align-items: flex-end;
   width: 90%;
+  flex-wrap: wrap;
 `;
 
 export const SeekTypeSelectorWrapper = styled.div`


Test patch: