Skip to content

fix(ui): hide section card header in single-section settings views - #68071

Closed
ztexydt-cqh wants to merge 1 commit into
openclaw:mainfrom
ztexydt-cqh:ai-fix-68003
Closed

ztexydt-cqh wants to merge 1 commit into
openclaw:mainfrom
ztexydt-cqh:ai-fix-68003

Conversation

@ztexydt-cqh

Copy link
Copy Markdown
Contributor

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.

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-apps

greptile-apps Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This 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 isSingleTopLevelSection guard that correctly excludes subsection drill-down views via !subsectionContext.

Confidence Score: 5/5

Safe to merge — minimal, focused change with no logic errors.

Single-file change with a clear, correct conditional. The isSingleTopLevelSection flag is computed after the empty-entries early return, correctly accounts for the subsection context, and uses Lit's nothing sentinel appropriately. No P0/P1 findings.

No files require special attention.

Reviews (1): Last reviewed commit: "fix(ui): hide section card header in sin..." | Re-trigger Greptile

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

💡 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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

@ztexydt-cqh

Copy link
Copy Markdown
Contributor Author

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!

@ztexydt-cqh

Copy link
Copy Markdown
Contributor Author

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!

@prtags

prtags Bot commented Apr 23, 2026

Copy link
Copy Markdown

Related work from PRtags group funny-bear-wxs2

Title: Open PR duplicate: [Bug]: Duplicate section title/description appears in Control UI single-section settings pages

Number Title
#68005 fix(ui): remove duplicate section headers in single-section settings view
#68071* fix(ui): hide section card header in single-section settings views
#68093 Fix: dedupe section title/desc in single-section config view (Resolves #68003)

* This PR

@steipete

Copy link
Copy Markdown
Contributor

Codex deep review: closing as duplicate of #68005.

This patch is directionally correct, but #68005 is the earlier canonical PR for #68003, includes targeted tests, and has the broader CI run green. Keeping the queue focused there.

@steipete steipete closed this Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Duplicate section title/description appears in Control UI single-section settings pages

2 participants