[PR #12] [MERGED] fix: search mode navigation and state management #210

Closed
opened 2026-02-15 17:16:17 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/openclaw/clawhub/pull/12
Author: @NACC96
Created: 1/17/2026
Status: Merged
Merged: 1/18/2026
Merged by: @steipete

Base: mainHead: fix/search-mode-navigation


📝 Commits (5)

  • 595bd2c fix: search mode navigation and state management
  • 236058b fix: preserve search flag in OnlyCrabsHome URL sync
  • 9fc0322 fix: update Header search links to use URL params instead of /search redirect
  • ef96fbe fix: auto-focus search input when search mode activates
  • 49e9c3c fix: stabilize search mode routing (#12) (thanks @NACC96)

📊 Changes

5 files changed (+119 additions, -38 deletions)

View changed files

📝 CHANGELOG.md (+3 -0)
src/__tests__/search-route.test.ts (+60 -0)
📝 src/components/Header.tsx (+7 -3)
📝 src/routes/index.tsx (+40 -16)
📝 src/routes/search.tsx (+9 -19)

📄 Description

Summary

  • Fix "Explore search" button causing page refresh by using URL params instead of navigating to /search
  • Enable /search URL deep linking via beforeLoad redirect
  • Fix logo click not closing search mode by properly syncing state with URL params

Root Cause

Search mode was managed as local React state that wasn't properly synced with URL params. The URL should be the source of truth for navigation state.

Test plan

  • Click "Explore search" button → should open search mode without page refresh
  • Navigate directly to /search → should redirect to / with search mode open
  • Click ClawdHub logo while in search mode → should close search and show landing page

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/openclaw/clawhub/pull/12 **Author:** [@NACC96](https://github.com/NACC96) **Created:** 1/17/2026 **Status:** ✅ Merged **Merged:** 1/18/2026 **Merged by:** [@steipete](https://github.com/steipete) **Base:** `main` ← **Head:** `fix/search-mode-navigation` --- ### 📝 Commits (5) - [`595bd2c`](https://github.com/openclaw/clawhub/commit/595bd2cf05696c16980137645b814ed18dac0e47) fix: search mode navigation and state management - [`236058b`](https://github.com/openclaw/clawhub/commit/236058b1b52d0e0c17c8f6ccf2c067d2ef9ef5a9) fix: preserve search flag in OnlyCrabsHome URL sync - [`9fc0322`](https://github.com/openclaw/clawhub/commit/9fc032216ea2fa09376baf32e39d45dbdaa2cf06) fix: update Header search links to use URL params instead of /search redirect - [`ef96fbe`](https://github.com/openclaw/clawhub/commit/ef96fbee844dabbbc5c7734be655181789777f0e) fix: auto-focus search input when search mode activates - [`49e9c3c`](https://github.com/openclaw/clawhub/commit/49e9c3c071888c5fc4b0a79789f2a83707aa75af) fix: stabilize search mode routing (#12) (thanks @NACC96) ### 📊 Changes **5 files changed** (+119 additions, -38 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -0) ➕ `src/__tests__/search-route.test.ts` (+60 -0) 📝 `src/components/Header.tsx` (+7 -3) 📝 `src/routes/index.tsx` (+40 -16) 📝 `src/routes/search.tsx` (+9 -19) </details> ### 📄 Description ## Summary - Fix "Explore search" button causing page refresh by using URL params instead of navigating to `/search` - Enable `/search` URL deep linking via `beforeLoad` redirect - Fix logo click not closing search mode by properly syncing state with URL params ## Root Cause Search mode was managed as local React state that wasn't properly synced with URL params. The URL should be the source of truth for navigation state. ## Test plan - [ ] Click "Explore search" button → should open search mode without page refresh - [ ] Navigate directly to `/search` → should redirect to `/` with search mode open - [ ] Click ClawdHub logo while in search mode → should close search and show landing page --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 17:16:17 -05:00
yindo closed this issue 2026-02-15 17:16:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: openclaw/clawhub#210