Skip to content

fix(sessions): include category in session search - #118912

Merged
steipete merged 1 commit into
openclaw:mainfrom
ZYV5ge:agent/fix-session-category-search
Aug 25, 2026
Merged

steipete merged 1 commit into
openclaw:mainfrom
ZYV5ge:agent/fix-session-category-search

Conversation

@ZYV5ge

@ZYV5ge ZYV5ge commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #118910.

Session search did not include the visible session category, so searching only by a group or category name returned no results even though the category was already available to each search owner. This repairs the invariant at all three existing owners:

  • Gateway session-list search now includes each stored session category.
  • Shared Apple session search now includes the category while simplifying its existing case-insensitive substring matcher.
  • Android session search now includes the category alongside its existing searchable fields.

The original contributor fix covered the Gateway and Apple paths. A maintainer update completes the equivalent Android path and preserves @ZYV5ge's contributor credit.

Production LOC: +4/-7 (net -3). Tests: +33/-4.

Validation

Each category-only regression was first observed failing independently on unfixed main, then passing after the owner-boundary repair:

  • Gateway: node scripts/run-vitest.mjs run src/gateway/session-utils.test.ts — 195 tests passed.
  • Apple: swift test --package-path apps/shared/OpenClawKit --filter ChatSessionSidebarModelTests — 39 tests passed.
  • Android: ./gradlew :app:testPlayDebugUnitTest --tests 'ai.openclaw.app.chat.ChatControllerSessionSearchTest' --console=plain — 7 tests passed.
  • Android formatting: ./gradlew :app:ktlintCheck --console=plain — passed.
  • Independent review reported no actionable findings.
  • The complete changed-files gate passed repository policy, formatting, boundaries, dependencies, duplicate detection, and all three Knip scans before reaching unrelated existing local dependency/typecheck drift; fresh exact-head hosted CI is required for the clean-environment typecheck.

No schema, configuration, protocol, session visibility, authorization, or ranking behavior changes.

@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Aug 3, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 25, 2026, 2:39 PM ET / 18:39 UTC.

ClawSweeper review

What this changes

Adds the existing session category field to Gateway, Apple, and Android session-search matching, with focused regression coverage for category-only queries.

Merge readiness

⛔ Blocked until real behavior proof from a real setup is added - 3 items remain

No blocking correctness finding: the refreshed branch repairs the category-only omission at the Gateway plus both native cached-search owners. It remains open because the external PR has focused test claims but no redacted after-fix real-behavior trace.

Priority: P2
Reviewed head: 2eb7f09f6baf9ce388358479c2d0814b6c0fd375

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The owner-boundary patch and regression coverage are sound, but real behavior proof remains the merge gate.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: Only focused test claims are supplied; add a redacted after-fix Gateway or cached-client category-only search trace before merge, without endpoints, IDs, or credentials. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: Only focused test claims are supplied; add a redacted after-fix Gateway or cached-client category-only search trace before merge, without endpoints, IDs, or credentials. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 6 items Current-main defect: Current main projects category on a session row but omits it from the Gateway cheap search fields, so a category-only query cannot match through this path.
Category is already visible metadata: The Gateway row projection already returns the stored category, establishing that this change extends matching rather than storage, visibility, or authorization.
Owner-boundary parity: The branch adds category to the Gateway matcher and the Apple and Android cached fallback matchers; Android’s caller uses that fallback only when its Gateway request fails.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run src/gateway/session-utils.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs run src/gateway/session-utils.test.ts: previous terminal command was still running after 30 seconds: "node scripts/run-vitest.mjs run src/gateway/session-utils.test.ts"

[test] starting test/vitest/vitest.gateway.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-118912-yPckLd/target

[vitest] still running with no output for 30000ms.

Assertions:

  • FAIL expect_output: session list search includes the session group name

How this fits together

Session metadata is filtered by the Gateway for sessions.list and by native clients when they search cached sessions after a Gateway failure. Matching entries are then returned to the session picker or sidebar.

flowchart LR
  A[Stored session category] --> B[Gateway session search]
  A --> C[Apple cached search]
  A --> D[Android cached search]
  B --> E[Matching session list]
  C --> E
  D --> E
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: Only focused test claims are supplied; add a redacted after-fix Gateway or cached-client category-only search trace before merge, without endpoints, IDs, or credentials. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P2) - No redacted real runtime trace yet shows a category-only query returning a session through the Gateway or a native cached fallback.
  • Complete next step (P2) - Needs contributor-supplied real behavior proof and normal exact-head validation, not an automated code repair.
Agent review details

Security

None.

PR surface

Source +1, Tests +27, Other -2. Total +26 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 1 1 0 +1
Tests 1 27 0 +27
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 4 9 11 -2
Total 6 37 11 +26

Review metrics

Metric Value Why it matters
Production versus test delta production +4/-7 (net -3); tests +33/-4 (net +29) The repair is net-negative production code while adding one category-only regression at each affected search owner.

Stored data model

Persistent data-model change detected: serialized state: src/gateway/session-utils.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #118910
Summary: This PR is the focused candidate repair for the category-search bug; the broader sessions work remains only a partial overlap while it is open.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the one-field owner-boundary repair, add redacted after-fix behavior proof, and merge only after exact-head required checks complete.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the one-field owner-boundary repair, add redacted after-fix behavior proof, and merge only after exact-head required checks complete.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: current main returns category in session rows but excludes it from the Gateway and native cached-search field lists; the changed category-only regression cases target that exact path.

Is this the best way to solve the issue?

Yes. Adding the already-returned category to each existing owner’s search corpus is the narrow canonical repair; a separate search engine or schema change would duplicate behavior without addressing the omission.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8bfcdbe884ce.

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • remove rating: 🧂 unranked krab: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P2: This repairs a bounded session-search failure that makes visible group metadata unusable as a query.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: Only focused test claims are supplied; add a redacted after-fix Gateway or cached-client category-only search trace before merge, without endpoints, IDs, or credentials. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

Likely related people:

  • steipete: Recent history covers the Gateway, shared Apple, and Android session-search owners, and the current head completes the Android parity repair. (role: recent area contributor and parity-update author; confidence: high; commits: 474d7855e481, 2eb7f09f6baf; files: src/gateway/session-utils-list.ts, apps/shared/OpenClawKit/Sources/OpenClawChatUI/ChatSessions.swift, apps/android/app/src/main/java/ai/openclaw/app/chat/ChatModels.kt)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add a redacted after-fix Gateway or native cached-fallback run showing a category-only search returning the expected session.
  • Update the PR body with that evidence; if a fresh review does not start automatically, ask a maintainer to comment @clawsweeper re-review.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-08-03T21:07:11.339Z sha 866291863fff7cf4e36d4355d29561b63df90034 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-04T03:19:25.391Z sha 72a2556568de636c6cc2b6e3947aa846c49e4248 :: needs real behavior proof before merge. :: none
  • reviewed August 5, 2026, 4:43 AM ET / 08:43 UTC sha unknown :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-06T11:38:35.831Z sha 72a2556568de636c6cc2b6e3947aa846c49e4248 :: needs real behavior proof before merge. :: none
  • reviewed August 8, 2026, 8:43 AM ET / 12:43 UTC sha unknown :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-08T15:38:22.463Z sha 72a2556568de636c6cc2b6e3947aa846c49e4248 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-19T14:52:11.833Z sha 72a2556568de636c6cc2b6e3947aa846c49e4248 :: needs real behavior proof before merge. :: [P2] Add category matching to Android’s cached fallback
  • reviewed 2026-08-24T21:06:43.785Z sha 72a2556568de636c6cc2b6e3947aa846c49e4248 :: needs real behavior proof before merge. :: [P2] Match categories in Android’s offline session-search fallback

@ZYV5ge
ZYV5ge marked this pull request as ready for review August 4, 2026 02:15
@ZYV5ge
ZYV5ge force-pushed the agent/fix-session-category-search branch from 8662918 to 72a2556 Compare August 4, 2026 02:26
@ZYV5ge

ZYV5ge commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head is 72a2556568de636c6cc2b6e3947aa846c49e4248; prior review reported no code finding. Please review this rebased current head. Real browser proof remains honestly unclaimed.

@clawsweeper

clawsweeper Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 4, 2026
@steipete
steipete force-pushed the agent/fix-session-category-search branch from 72a2556 to 2eb7f09 Compare August 25, 2026 18:28
@steipete

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

The PR has been refreshed on current main. The maintainer update addresses the previous sibling-parity finding by adding Android coverage alongside the contributor's Gateway and shared Apple fixes; all three category-only regressions were independently reproduced before the fix and now pass.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 25, 2026
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 25, 2026
@steipete
steipete force-pushed the agent/fix-session-category-search branch from 2eb7f09 to 83ed242 Compare August 25, 2026 20:43
@openclaw-barnacle openclaw-barnacle Bot added the app: android App: android label Aug 25, 2026
@steipete
steipete merged commit 43ffe41 into openclaw:main Aug 25, 2026
258 of 259 checks passed
@steipete

Copy link
Copy Markdown
Contributor

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android gateway Gateway runtime P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: session category is not searchable in sessions.list or the Mac fallback

2 participants