Skip to content

Match sidebar title search on subdirectories#240

Open
danshapiro wants to merge 23 commits intofix/mcp-param-validationfrom
trycycle-title-search-subdir-tabs
Open

Match sidebar title search on subdirectories#240
danshapiro wants to merge 23 commits intofix/mcp-param-validationfrom
trycycle-title-search-subdir-tabs

Conversation

@danshapiro
Copy link
Copy Markdown
Owner

Summary

  • Make sidebar title-tier search match leaf subdirectory names without matching ancestor path segments.
  • Stop pinning open-tab fallback rows during applied search; only matching rows remain visible and they sort normally.
  • Split requested vs applied sidebar search state and separate visible refreshes from replacement requests so drift, queued refreshes, and stale commits preserve the correct visible result set.
  • Preserve debounce timing for follow-up searches even when older search results commit while a newer local query is still pending.

Test Plan

  • FRESHELL_TEST_SUMMARY='pre-merge full suite after rebasing onto local main' npm test
  • npm run test:status
  • FRESHELL_TEST_SUMMARY='sidebar stale-commit debounce regression' npm run test:vitest -- test/unit/client/components/Sidebar.test.tsx
  • FRESHELL_TEST_SUMMARY='review follow-up full check' npm run check

Copy link
Copy Markdown

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

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: 2c4fb06e34

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

if (!sidebarHasMore || sidebarWindow?.loading || loadMoreInFlightRef.current) return
if (sidebarOldestLoadedTimestamp == null || sidebarOldestLoadedSessionId == null) return
if (hasActiveQuery) return
if (hasAppliedQuery) return
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Block pagination when a requested sidebar query is active

This guard only checks appliedQuery, so after a search from browse fails before any replacement commit, the window can be in query='foo' and appliedQuery=''. In that state, infinite-scroll pagination is allowed and calls fetchSessionWindow({ append: true }), which defaults to an empty query and updates requested state back to browse, unexpectedly clearing the user’s search text/results. This is user-visible whenever a non-empty requested search errors or aborts before commit; the append path should also be blocked when sidebarWindow.query is non-empty.

Useful? React with 👍 / 👎.

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.

1 participant