Skip to content

fix: show UNSPECIFIED topics on the topic list page - #709

Open
yyqdbngt wants to merge 1 commit into
apache:masterfrom
yyqdbngt:fix/topic-unspecified-filter
Open

fix: show UNSPECIFIED topics on the topic list page#709
yyqdbngt wants to merge 1 commit into
apache:masterfrom
yyqdbngt:fix/topic-unspecified-filter

Conversation

@yyqdbngt

Copy link
Copy Markdown

Fixes #669

Problem

On 4.x clusters (or 5.x clusters where topics were created without a message type attribute), every topic reports messageType = UNSPECIFIED. The topic page's default filter only selects NORMAL, and the UNSPECIFIED fallback branch was guarded by rmqVersion which is hardcoded to true and never updated, so all these topics were filtered out and the topic table appeared empty even though the backend returned full data.

Fix

In frontend-new/src/pages/Topic/topic.jsx, treat UNSPECIFIED as a normal topic in filterByType:

-        if (filterNormal && type.includes("NORMAL")) return true;
-        if (!rmqVersion && filterNormal && type.includes("UNSPECIFIED")) return true;
+        if (filterNormal && (type.includes("NORMAL") || type.includes("UNSPECIFIED"))) return true;

Verification

npm run build passes on the fixed source (react-scripts build, which also runs ESLint), and the built bundle contains the updated filter logic.

Diff

1 file changed, +3 / -2.

Topics without a message type attribute (e.g. all normal topics on 4.x
clusters, or 5.x topics created without attributes) report UNSPECIFIED.
The default filter only selects NORMAL, and the UNSPECIFIED fallback was
guarded by rmqVersion which is always true, so every such topic was
filtered out and the topic table appeared empty.

Treat UNSPECIFIED as NORMAL in the filter so the list renders again.
@yyqdbngt
yyqdbngt force-pushed the fix/topic-unspecified-filter branch from 52f4efd to 98c90a4 Compare July 31, 2026 15:33
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.

Topic list page shows nothing when topics' messageType is UNSPECIFIED (4.x clusters)

1 participant