Repository navigation
fix(ui): hide section card header in single-section settings views - #68071
ztexydt-cqh wants to merge 1 commit into
Conversation
Closes openclaw#68003 When a single section is displayed in Control UI settings, the section title and description were rendered twice: once in the top section hero and again in the nested section card header. This change suppresses the section card header when only one top-level section is visible, avoiding the duplication while preserving headers in multi-section views.
Greptile SummaryThis PR suppresses the section card header (title + description + icon) when only a single top-level section is visible in the Control UI settings config form, preventing the duplication that occurred when a section hero already displayed the same information. The implementation adds an Confidence Score: 5/5Safe to merge — minimal, focused change with no logic errors. Single-file change with a clear, correct conditional. The No files require special attention. Reviews (1): Last reviewed commit: "fix(ui): hide section card header in sin..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e7b212bd8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| `; | ||
| } | ||
|
|
||
| const isSingleTopLevelSection = filteredEntries.length === 1 && !subsectionContext; |
There was a problem hiding this comment.
Restrict header suppression to views with section hero
isSingleTopLevelSection becomes true whenever the filtered result count is 1, even when no section is selected. In those cases (for example root view with a search query that narrows to one section, or a scope that only contains one section), this hides the only section title/description card header, but renderConfig only shows the hero when activeSection is set (ui/src/ui/views/config.ts:994). The change therefore removes section context in single-result non-hero views, which is a regression from the previous behavior.
Useful? React with 👍 / 👎.
|
Hi @joaomdmoura, friendly ping — this PR has been open for a while and the fix is ready for review. Would love to get it merged when you have a moment. Thanks! |
|
Sorry for the wrong ping above — @joaomdmoura is not a maintainer of this repo. Friendly ping to the actual core maintainers @steipete @vincentkoc — this PR is ready for review. Would appreciate a look when you have time. Thanks! |
|
Related work from PRtags group Title: Open PR duplicate: [Bug]: Duplicate section title/description appears in Control UI single-section settings pages
|
Closes #68003
When a single section is displayed in Control UI settings, the section title and description were rendered twice: once in the top section hero and again in the nested section card header. This change suppresses the section card header when only one top-level section is visible, avoiding the duplication while preserving headers in multi-section views.