Skip to content

Fix: dedupe section title/desc in single-section config view (Resolves #68003) - #68093

Closed
Mlightsnow wants to merge 1 commit into
openclaw:mainfrom
Mlightsnow:fix/68003-dedupe-section-hero
Closed

Mlightsnow wants to merge 1 commit into
openclaw:mainfrom
Mlightsnow:fix/68003-dedupe-section-hero

Conversation

@Mlightsnow

Copy link
Copy Markdown
Contributor

Fixes #68003.

Summary

In the Control UI settings, when a single section is active (e.g. Automation → Approvals), the section title/description was rendered twice: once in the top hero and again in the nested config-section-card header.

This PR hides the per-card header when renderConfigForm is invoked with an activeSection, keeping the hero as the single source of the title/description. Multi-section (root) views still show the per-card headers.

Changes

  • ui/src/ui/views/config-form.render.ts: skip config-section-card__header when activeSection is set.
  • ui/src/ui/views/config.browser.test.ts: add regression tests for single-section (hero-only) and multi-section (per-card headers) rendering.

Test plan

  • pnpm test ui/src/ui/views/config.browser.test.ts (18 passed)
  • pnpm test ui/src/ui/config-form.browser.test.ts (14 passed)
  • pnpm lint on the touched files (0 warnings, 0 errors)

AI-assisted

  • Marked as AI-assisted.
  • Lightly tested (scoped tests pass; manual browser verification not performed).

@greptile-apps

greptile-apps Bot commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixes duplicate title/description rendering in single-section config views by computing hideCardHeader = Boolean(activeSection) in renderConfigForm and conditionally skipping the config-section-card__header block. Since renderConfigForm is only invoked under formMode === "form" and the hero is also conditioned on activeSectionMeta && formMode === "form", the two conditions align correctly — no edge case where the hero is absent but the header is also hidden. Tests cover both the single-section (header suppressed, hero present) and multi-section (headers present, no hero) paths.

Confidence Score: 5/5

Safe to merge; the fix is minimal, conditions align correctly with the hero render path, and tests validate both branches.

No P0/P1 issues found. The hideCardHeader flag is only evaluated after filteredEntries.length > 0, renderConfigForm is only called under formMode === "form", and the hero always renders for any real non-virtual activeSection in form mode — so the title is never silently dropped.

No files require special attention.

Reviews (1): Last reviewed commit: "UI: dedupe section title/desc in single-..." | Re-trigger Greptile

@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 also valid and has good tests, but #68005 is the earlier canonical PR for #68003 and already covers the same root/multi-section behavior with green checks. Keeping one merge target open to avoid racing equivalent fixes.

@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