Skip to content

fix: restore ClawHub public UI#1889

Merged
BunsDev merged 7 commits intomainfrom
meow/restore-clawhub-header-hero
Apr 29, 2026
Merged

fix: restore ClawHub public UI#1889
BunsDev merged 7 commits intomainfrom
meow/restore-clawhub-header-hero

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented Apr 29, 2026

Summary

  • Restore the public header, hero, featured carousel, Trending Now, category grid, and footer layout to the earlier ClawHub design while preserving the newer typeahead/search behavior.
  • Remove tweakcn/custom visual overlay settings, relaxed/compact density controls, and related dead preference plumbing while cleaning legacy local storage/cookies back to default behavior.
  • Add strict UI design-contract coverage and regression notes so future changes to these fundamentals must be explicit and tested.

Why

Recent UI changes removed core public-page structure and design affordances unintentionally. This restores the intended visual contract and adds tests that make future removals fail loudly unless the contract is intentionally updated.

Validation

  • bun run test:ui-contract
  • bun run test
  • bun run lint
  • bun run build
  • bunx oxfmt --check package.json src/__tests__/ui-design-contract.test.ts src/routes/skills/index.tsx docs/regression-notes/2026-04-29-ui-design-contract.md
  • git diff --check

bun run build passes with the existing TanStack route test-file warning and Shiki WASM fallback warning.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clawhub Ready Ready Preview, Comment Apr 29, 2026 7:47am

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR restores the ClawHub public UI to its earlier design: a two-row header with segmented theme controls, full-width search, restored secondary nav (Users, About), a community hero with the slot-machine easter egg, featured carousel with proper scroll controls and popular-skill fallback, a three-column Trending Now grid, and a four-column footer with mobile disclosure toggles. It also removes the tweakcn/custom-theme overlay (customTheme.ts), density-preference plumbing (preferences.ts), and their associated settings UI, and adds cleanupLegacyVisualSettings in theme.ts to clear stale storage on startup. A design-contract test suite (ui-design-contract.test.ts) pins these fundamentals so future removals fail loudly.

Confidence Score: 5/5

Safe to merge — no P0 or P1 issues found; previously flagged regressions are all resolved.

All three previously noted issues (opaque ownerUserId links, inert carousel buttons, dead getNextThemeMode code) are explicitly fixed in this PR. The slot-machine jackpot odds (1/25 overall, 1/100 for Hack) match the regression note. The footer hydration mismatch is intentional and well-documented. The design-contract test assertions that files must not exist are unconventional but deliberate guard rails, not a bug. No security, data, or runtime correctness issues identified.

No files require special attention.

Reviews (2): Last reviewed commit: "fix: stabilize footer disclosure tests" | Re-trigger Greptile

Comment thread src/routes/index.tsx Outdated
@clawsweeper
Copy link
Copy Markdown

clawsweeper Bot commented Apr 29, 2026

Codex review: needs maintainer review before merge.

Keep this PR open. It is open, unmerged, MEMBER-authored, and current main does not already contain the PR's public UI restoration, preference/theme cleanup, or UI contract tests. The discussion shows active review and follow-up fixes on the PR branch, including Greptile/Copilot findings reportedly addressed at latest head eb03e15, so the next step is normal maintainer review rather than cleanup closure.

Maintainer follow-up before merge:

Keep this PR open for normal maintainer review. If maintainers agree with restoring the earlier public UI contract, review the latest head eb03e15, verify the Greptile/Copilot follow-ups, run the listed UI contract/unit/lint/build/format checks, and merge through the normal path.

Best possible solution:

Keep this PR open for normal maintainer review. If maintainers agree with restoring the earlier public UI contract, review the latest head eb03e15, verify the Greptile/Copilot follow-ups, run the listed UI contract/unit/lint/build/format checks, and merge through the normal path.

Acceptance criteria:

  • bun run test:ui-contract
  • bun run test
  • bun run lint
  • bun run build
  • bunx oxfmt --check package.json src/tests/ui-design-contract.test.ts src/routes/skills/index.tsx docs/regression-notes/2026-04-29-ui-design-contract.md

What I checked:

  • PR status and policy: Provided GitHub context shows this PR is open, unmerged, non-draft, authored by BunsDev with authorAssociation MEMBER, base b3c42b6, and latest head eb03e15. Repository cleanup policy keeps MEMBER-authored open PRs open for explicit maintainer handling. (eb03e15d0a79)
  • Current main homepage differs from PR target: Current main still renders the newer Equip / Install / Unleash hero and builds homepage skill links from entry.skill.ownerUserId rather than the ownerHandle-preferred URL form that the PR discussion says was fixed on the branch. (src/routes/index.tsx:90, b3c42b661b5e)
  • Current main lacks added UI contract surface: package.json on main has the standard test script but no test:ui-contract script, and read-only searches found no ui-design-contract test or regression-notes files that the PR adds. (package.json:26, b3c42b661b5e)
  • Current main still includes preference/custom-theme plumbing: Settings still imports usePreferences and custom theme APIs, destructures customTheme/importCustomTheme/clearCustomTheme from useThemeMode, and renders tweakcn overlay plus density/default-view controls that the PR removes. (src/routes/settings.tsx:47, b3c42b661b5e)
  • Current main footer/nav contract differs: Current main defines only Browse, Publish, and Community footer sections and Header only consumes PRIMARY_NAV_ITEMS; the PR adds the restored public nav/footer contract with secondary nav and mobile footer disclosure behavior. (src/lib/nav-items.ts:113, b3c42b661b5e)
  • PR discussion is active review, not obsolete work: Provided comments show Greptile flagged ownerHandle links, inert carousel controls, and dead theme helper; Copilot flagged footer aria-expanded and theme focus-visible issues; BunsDev later reported those were addressed at 9aa6cc6 and eb03e15 with validation commands rerun. That supports keeping the PR in normal review. (eb03e15d0a79)

Likely related people:

  • Patrick Erichsen: Git history and blame tie Patrick to the current main homepage/search/typeahead path, featured plugin curation, settings/custom-theme preference surface, and nav/footer state that this PR changes or removes. (role: recent maintainer of affected current-main UI and settings behavior; confidence: high; commits: 6c0163f9f29f, a7d1701f5a3d, ecf09b868a98; files: src/routes/index.tsx, src/components/Header.tsx, src/routes/settings.tsx)
  • Val Alexander: Local history ties Val to the earlier homepage redesign, unified theme work, nav/footer normalization, branded mobile header, and related theme polish that the PR describes as the restored public UI contract. (role: original/restored UI history owner; confidence: high; commits: b4a7540157de, e54fc1939a25, 194c22f4ddf4; files: src/routes/index.tsx, src/components/Header.tsx, src/components/Footer.tsx)

Remaining risk / open question:

  • Repository policy requires explicit maintainer handling for MEMBER-authored open PRs.
  • The PR is broad and product-visible: homepage, header, footer, settings, theme behavior, global CSS, tests, and regression notes all change together.
  • The inline RootDocument theme bootstrap/localStorage cleanup is security-sensitive enough to warrant normal code review, even though the PR does not change workflows, dependencies, lockfiles, secrets, or publishing paths.
  • Review feedback was reportedly addressed on the latest head, but maintainers should still verify ownerHandle URLs, carousel controls, footer disclosure semantics, and theme focus indicators before merge.

Codex review notes: model gpt-5.5, reasoning high; reviewed against b3c42b661b5e.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Restores the ClawHub public-facing UI layout (header/home/footer) while keeping the newer search/typeahead behavior, and removes the now-dead visual customization/preferences plumbing in favor of a stricter “UI design contract” regression suite.

Changes:

  • Reintroduce the earlier public header (two-row nav + theme controls), home sections (hero, featured carousel, categories, Trending Now), and footer layout (with mobile collapsible sections).
  • Remove tweakcn/custom-theme overlay support and density/accessibility preference plumbing; add theme cleanup to reset legacy storage/cookies/DOM state.
  • Add UI design-contract tests + focused route/component tests and regression notes to prevent accidental layout removals.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/styles.css Restores/adjusts header/footer/home styling, adds new theme toggle + footer mobile collapse styles.
src/routes/index.tsx Restores home hero/carousel/categories/trending and reintroduces hero slot-machine easter egg + confetti.
src/components/Header.tsx Restores two-row header with primary/secondary tabs, updates search placeholder, adds segmented theme mode control and GitHub sign-in styling hook.
src/lib/nav-items.ts Adds SECONDARY_NAV_ITEMS and updates footer sections (adds “Platform”, removes “About” from footer).
src/components/Footer.tsx Restores footer columns and adds mobile section toggles.
src/routes/settings.tsx Removes customization/preferences UI; keeps only theme mode selection in “Appearance”.
src/lib/theme.ts Removes custom theme plumbing; adds legacy visual settings cleanup (storage/cookies/DOM) and simplifies theme selection to claw.
src/routes/__root.tsx Updates early-boot theme script to clear legacy visual settings and force defaults when stale state is present.
src/routes/skills/index.tsx Tweaks default-sort redirect behavior for /skills when only non-default filters are present.
src/routes/-settings.test.tsx Updates settings test expectations to assert removed customization controls.
src/lib/theme.test.tsx Updates/extends theme tests for legacy cleanup behavior and supported theme constraints.
src/tests/ui-design-contract.test.ts New “design contract” guard asserting key structural/layout fundamentals remain present.
src/tests/home-route.test.tsx New tests covering restored home sections and the hero slot-machine behavior.
src/tests/header.test.tsx Updates header tests to assert restored nav rows, theme controls, and search placeholder; adds CSS contract checks.
src/components/Footer.test.tsx New footer tests for 4-column structure and mobile collapse behavior.
src/lib/preferences.ts Removed legacy preferences store (density/motion/high-contrast/etc).
src/lib/preferences.test.tsx Removed tests for the deleted preferences store.
src/lib/customTheme.ts Removed tweakcn/custom theme overlay implementation.
package.json Adds test:ui-contract script to run the new UI regression suite.
docs/regression-notes/2026-04-29-ui-design-contract.md Documents the protected UI fundamentals enforced by the design-contract test.
docs/regression-notes/2026-04-29-hero-slot-easter-egg.md Documents expected slot-machine easter egg behavior and history.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Footer.tsx
Comment thread src/styles.css
@BunsDev BunsDev force-pushed the meow/restore-clawhub-header-hero branch from d45bcca to 9aa6cc6 Compare April 29, 2026 07:35
@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented Apr 29, 2026

Follow-up on the ClawSweeper review at latest head 9aa6cc6:

  • Rebased the PR branch onto current main so the merge-commit test surface is current.
  • Confirmed the product-visible restoration remains intentionally scoped to header/home/footer/settings/theme cleanup plus UI contract coverage.
  • Greptile's owner-handle URL finding is addressed; carousel controls now have click handlers; the dead getNextThemeMode helper is removed.
  • Fixed the merge-commit CI failure by preserving nonSuspicious as an active /skills filter instead of redirecting it to add default sort.

Local validation run after the rebase/fix:

  • bun run test:ui-contract
  • bun run test
  • bun run lint
  • bun run build
  • bunx oxfmt --check package.json src/__tests__/ui-design-contract.test.ts src/routes/skills/index.tsx docs/regression-notes/2026-04-29-ui-design-contract.md
  • git diff --check

Remote checks restarted on 9aa6cc6 after the force-with-lease update.

- Footer: track mobile breakpoint via matchMedia so aria-expanded is
  always true on desktop (links always visible) and reflects isOpen on
  mobile. Toggle click is also guarded to mobile only. Breakpoint
  constant is commented to link it to the matching CSS media query.
- styles.css: add .theme-mode-toggle button:focus-visible rule after
  all: unset to restore keyboard focus indicator for theme toggle.

Agent-Logs-Url: https://github.com/openclaw/clawhub/sessions/20753973-9a9d-45e9-80b9-1e3d4529558c

Co-authored-by: BunsDev <68980965+BunsDev@users.noreply.github.com>
@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented Apr 29, 2026

Follow-up after the latest branch update at eb03e15:

  • Preserved Copilot's footer aria-expanded/focus-visible fixes while rebasing the branch forward.
  • Fixed the merge-commit typecheck issues in the home-route test, mobile theme cycling, and management skill/plugin search params.
  • Added a matchMedia fallback for the footer so non-browser/jsdom environments do not throw, and updated the footer + UI contract tests to enforce mobile-only collapsed disclosure semantics.
  • The earlier Greptile findings remain addressed: owner-handle URLs, working carousel controls, and removal of the dead theme helper.

Local validation on this branch after the fixes:

  • bun run test:ui-contract
  • bun run test
  • bun run lint
  • bun run build
  • bunx oxfmt --check package.json src/__tests__/ui-design-contract.test.ts src/routes/skills/index.tsx docs/regression-notes/2026-04-29-ui-design-contract.md
  • git diff --check

Remote checks restarted on eb03e15.

@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented Apr 29, 2026

Please perform another review based off the latest commit @greptileai

@BunsDev BunsDev merged commit 22bb94c into main Apr 29, 2026
8 checks passed
@BunsDev BunsDev deleted the meow/restore-clawhub-header-hero branch April 29, 2026 07:52
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.

3 participants