Repository navigation
fix(ai-vault): bounded OpenClaw discovery; title filter when a host's search is off - #27089
Merged
Merged
Conversation
… search is off OpenClaw discovery walked every directory under <state>/agents and accepted any JSONL under a 'sessions' segment, so an embedded <agent>/agent/codex-home was walked (thousands of serialized SSH readDirs) and listed as OpenClaw. Both the local and remote source tables now enter only 'sessions' below each agent dir; the OpenClaw source entry moves next to that rule. When a single host answers that its search is off (relays keep their index off by design) or unavailable, the History box falls back to the title filter for that host with a notice, instead of an empty wall.
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 1 minute. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
7 of 9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
Two Session History problems on remote computers:
What Changed
<state>/agentsand kept any.jsonlfile under a folder namedsessions, including<agent>/agent/codex-home/sessions/**.sessions(and everything inside it). Canonical sessions are still listed, including nested ones such assessions/archive/*.jsonl. Embedded agent homes are never read.Mechanism:
openClawSessionDirectoryPredicate(depth 0: any agent folder; depth 1: onlysessions; deeper: anything) is used by both the local source table and the SSH source table, through each walker's existingdirectoryPredicatehook. The OpenClaw source entry moves intoopenclaw-session-layout.tsbeside that rule.useAiVaultPanelSearchremembers that a single-host scope answereddisabledorno-serviceand then reportssearching: falseplustitleOnly: true.AiVaultPanelSearchshows the notice.Why
The depth rule follows the layout the reporter measured: 2,264 canonical session files next to 3,106 nested Codex files, and 14,990 directories. It keeps everything inside
sessions/recursive, as the report asked, so no canonical session is lost. For search, the response this computer already receives is enough evidence, so no new call or wire change is needed. Theallscope is unchanged, because it already names each skipped computer.Linked Issue
Fixes #11394
Fixes #22453
Visual Proof
N/A for screenshots. The visible change is one notice line above the title-filtered list when a remote computer's search is off. A component test covers it.
Testing
openclaw-session-layout.test.ts, new and failing on main: a real temp tree withmain/sessions/canonical.jsonl,main/sessions/archive/older.jsonlandmain/agent/codex-home/sessions/2026/rollout-x.jsonl.discoverRemoteSourceCandidateswith a recording filesystem) lists the same two and never reads acodex-homefolder.use-ai-vault-search.test.tsx, new and failing on main:disabledandno-servicefall back to the title filter and stop asking that host;not-readykeeps full-text search.AiVaultPanelSearch.test.tsx: the notice renders above the list.Existing AI Vault scanner, delete-target, search-root and i18n suites pass.
pnpm tc:node,pnpm tc:web, oxlint andcheck:code-quality:changedpass.I manually tested these changes locally
Automated tests added/updated, or explained why not below
Review
Agent skill upstream boundary
Notes
readDirround trips.unavailableanswer, so an old relay or server behaves the same.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)