Skip to content

feat(sessions): search conversation messages - #1866

Draft
karkarl wants to merge 2 commits into
openclaw:mainfrom
karkarl:karkarl-sessions-rpc-parity
Draft

karkarl wants to merge 2 commits into
openclaw:mainfrom
karkarl:karkarl-sessions-rpc-parity

Conversation

@karkarl

@karkarl karkarl commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Finding a conversation from remembered message content currently requires opening its transcript instead of searching across the Gateway's visible conversations.

User Impact

User impact: Sessions gains native message search with conversation titles, text snippets and direct chat navigation. Search covers active conversations across channels, excludes cron/system sessions unless Show background is enabled, and reports indexing, partial results, unsupported Gateways and failures separately.

This is deliberately a draft. Required full-suite validation has unrelated host/baseline failures, and actual published/live Gateway compatibility is not established.

Why This Change Was Made

Mirror the Mac companion's transcript-search behavior using native WinUI rather than copying Mac styling. The pinned Mac request owner sends a roster scope, not a truncated set of loaded keys or title-search filters. The pinned schema limits queries to 4096 characters and results to 25 messages.

SessionTranscriptSearch owns query/view/connection invalidation; the page only applies state. Requests retain the originating connection epoch. Labels come from matching Gateway session rows; keys remain navigation identifiers. Snippets render as text, never executable markup.

This is the first bounded sessions.* sub-seam, not completion of the category. All 69 saved method names were dispositioned: 9 recognized existing paths, 3 existing paths missed by the historic scanner (create, describe, dispatch), this new search path, 50 implementation gaps, and 6 explicitly unadvertised contracts (get, resolve, steer, usage, usage.logs, usage.timeseries). Two current-source additions (files.download, github.action) are kept outside the historic denominator. No scanner/policy changes or automatic verification promotion are included.

Complete historical 69-method disposition

R: existing reachable path recognized historically. M: existing reachable path missed historically. N: new implementation in this seam. G: remaining implementation gap. U: explicitly unadvertised at pinned source, not presumed retired. These are dispositions, not verified-admission claims; every method remains verified=false in the evidence inventory.

Method Disposition
sessions.abort G
sessions.activitySummary.ensure G
sessions.assignOwner G
sessions.branches.list G
sessions.branches.switch G
sessions.catalog.archive G
sessions.catalog.continue G
sessions.catalog.import G
sessions.catalog.list G
sessions.catalog.read G
sessions.catalog.startTerminal G
sessions.cleanup G
sessions.compact R
sessions.companion.ask G
sessions.companion.reset G
sessions.companion.state G
sessions.create M
sessions.delete R
sessions.describe M
sessions.diff G
sessions.dispatch M
sessions.files.assets G
sessions.files.get R
sessions.files.list R
sessions.files.reveal G
sessions.files.set G
sessions.fork G
sessions.get U
sessions.github.confirm G
sessions.github.options G
sessions.github.publish G
sessions.github.status G
sessions.goal.clear G
sessions.goal.update G
sessions.groups.defaults G
sessions.groups.delete G
sessions.groups.list G
sessions.groups.put G
sessions.groups.rename G
sessions.groups.update G
sessions.list R
sessions.messages.subscribe G
sessions.messages.unsubscribe G
sessions.move G
sessions.observer.visibility G
sessions.patch R
sessions.patchMany G
sessions.pluginPatch G
sessions.preview R
sessions.processes.list G
sessions.processes.stop G
sessions.providerReview.continue G
sessions.reclaim G
sessions.recover G
sessions.reset R
sessions.resolve U
sessions.rewind G
sessions.search N
sessions.send G
sessions.setInvolvement G
sessions.steer U
sessions.storage.run G
sessions.storage.status G
sessions.subscribe R
sessions.title.prepare G
sessions.usage U
sessions.usage.logs U
sessions.usage.timeseries U
sessions.viewers.set G

Current-only sessions.files.download and sessions.github.action remain implementation gaps outside this table's historic denominator. Existing Files/recovery/history work remains with its contributor PRs rather than being taken over here.

Evidence

31 focused Shared cases and 31 focused Tray/localization/handler cases pass. Real loopback WebSocket tests exercise the production client, exact strict scope/limit contract, distinct message provenance, human title enrichment, membership-before-limit, archival, permission denial, unsupported methods and index readiness. The fixture uses independently authored substring search over synthetic transcripts, not the production full-text implementation.

Current-head native proof also passes 1/1: set the real search control, invoke the accessible native Search button, observe completed sessions.search, inspect the rendered matching titles/snippets, and invoke a result to display the matching conversation. Owned-window captures show the actual changed Sessions and chat states. No debug state setters, foreign process cleanup or physical-input guard bypass was used.

Independent rubber-duck task-role review covered the implementation/proof plan and P0-P3 source correctness. Its title-enrichment and localization-helper findings were addressed and re-reviewed, with no remaining findings. Model identity was not independently verified. The shared autoreview installation is absent; no helper scoped-clean result or isolation guarantee is claimed.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • windows-winui-interactive: current-build visible transcript matches and navigation through the accessible native Search button.

Validation

All commands ran from the task worktree with OPENCLAW_REPO_ROOT set to its path. TRX logging/results-directory flags were added to retain invocation-specific reports. The final build, Shared and Tray closeout ran sequentially under the task group's exclusive validation lease at frozen head 95adf40e, with isolated roaming/local data roots. The lease was released immediately after closeout; no unrelated app or privilege was changed.

  • .\build.ps1: passed, full native ARM64 build (Shared, CLI, WinNode CLI, SetupEngine and WinUI).
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: final head 4673 passed, 1 failed, 26 skipped (4700 total). Only the required-privilege symlink failure persists (MxcFolderAdmissionTests.OwnedJunctionAndSymbolicLinkAreRejectedWithoutFollowingTheirChildren(symbolic: True)). No timing failure occurred in this serialized run, 17:49:04 to 17:51:10 EDT.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: final head 4504 passed, 4 failed, 0 skipped (4508 total). All four failures are existing ARM64 BuildPrerequisiteTests.CheckOnly_UsesTheAppLocalRuntimeResolver cases. Tests and machine privileges were not weakened/changed. Serialized run: 17:51:36 to 17:53:07 EDT.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --filter 'FullyQualifiedName~SessionSearchTests|FullyQualifiedName~GatewayFixtureProtocolTests.TranscriptSearch': 31 passed, 0 failed/skipped.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-build --filter 'FullyQualifiedName~SessionTranscriptSearchTests|FullyQualifiedName~LocalizationValidationTests|FullyQualifiedName~TrayMenuWindowMarkupTests.Source_DoesNotDeclareAsyncVoidHandlers': 31 passed, 0 failed/skipped.
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-build --filter 'FullyQualifiedName~ConnectAsync_TimedOutRetry_DoesNotDisposeNewerConnectionDuringBackoff': isolated follow-up 1 passed, 0 failed/skipped; does not erase full-run failure.
  • Earlier concurrent Shared closeout: 4672 passed, 2 failed, 26 skipped, including that backoff timing failure plus the symlink failure. Original TRX retained, not replaced by the serialized final run or isolated pass.
  • .\scripts\validate-docs.ps1: passed, 66 Markdown files.
  • git diff --check: passed.
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName~SessionTranscriptSearchTests|FullyQualifiedName~LocalizationValidationTests|FullyQualifiedName~TrayMenuWindowMarkupTests.Source_DoesNotDeclareAsyncVoidHandlers': final accessible-button source, 31 passed, 0 failed/skipped.
  • dotnet build .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj --no-restore -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false -p:BuildProjectReferences=false -v quiet: passed, compiles corrected UI proof without rebuilding or launching the product.
  • dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj --no-build -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --filter 'FullyQualifiedName~GatewayFixtureUiTests.TranscriptSearch_ShowsVisibleMatchesAndOpensTheMatchingConversation': 1 passed, 0 failed/skipped, 14.37 seconds. OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1, OPENCLAW_GATEWAY_FIXTURE_SCREENSHOTS=1, and the current isolated app/artifact paths were supplied. Run 5013d7aefbe34817afe308605e3a7a2f; owned app PID 46128 confirmed absent afterward, desktop lease explicitly released.

Real Behavior Proof

  • Environment tested: Windows ARM64; synthetic authenticated loopback Gateway, no provider, real Gateway registration or shared runtime changes.
  • PR head or commit tested: final accessible submission 95adf40e9ac1e5719bd1dd54a899760d6ff98d3d; current-head full build and suites completed above. Native executable SHA-256 7d91d73f1bcb68ad28085545189ad9cdd53eacc3aad8b094121399ce14b473bd; app assembly SHA-256 67aeb1fad94555fb95fc12e6cef45ceaec66ef690f4d03cdc6abb7040af440ac. These are manually associated local build identities, not a signed source-to-binary attestation. The complete 69-method local disposition inventory records current-head production/test source SHA-256 identities; its SHA-256 is 7f695db3b3c0d52f96437951b253d8e7f323ce3c759c25063ef3ecbaf5dd3b9e.
  • Exact steps or command run: socket fixture methods listed above; first native runs submitted the query using ValuePattern, but failed before RPC when looking up AutoSuggestBox's internal query button. Owned-window capture and the actual accessibility tree showed the icon had no accessible button peer. The final delta exposes a translated, normal native Search button while preserving Enter; corrected proof invokes that production control.
  • Current-head native fixture observation: {"Method":"sessions.search","Outcome":"ok"} in run 5013d7aefbe34817afe308605e3a7a2f. The fixture ledger intentionally does not record raw search parameters. Independent socket tests assert the exact query/scope/limit contract. Native capture shows query FIXTURE RESEARCH:, count 2, matching human titles/snippets, then the matching research transcript after invoking the result.
  • Evidence after fix: production socket client returns two distinct assistant message IDs for FIXTURE RESEARCH: with human title Fixture: research conversation; default lighthouse search excludes 60 synthetic background matches before limiting, and Show background returns 25 matches with truncated=true.
  • Observed result: focused unit/socket cases and current-head native visible search/navigation pass. Executable and assembly hashes recorded in the native receipt match the frozen build above.
  • Screenshot or artifact links verified? (Yes/No/N/A): Yes. Owned-window proof screenshots. Both hosted images were downloaded and verified byte-for-byte against the captured originals. Results image SHA-256 f0696bce03858500644b66fb9acecd41b5c81abed48dd350a436d89277e80404; matching conversation image SHA-256 6f889430dd917289e1dda694877ae6ca799482915c08ade64a59a1939731b95d.
  • Not verified or blocked: full-suite baseline failures remain. Both failed native reports are retained, not counted as successful proof. Published/live Gateway compatibility, production indexing/ranking, and completed custom proof-pool status are not claimed. Source pin 098e991 is not a verified source binding for the saved published package merely because both declare version 2026.10.6.

Security Impact

  • New permissions or capabilities? (Yes/No): No
  • Secrets or tokens handling changed? (Yes/No): No
  • New or changed network calls? (Yes/No): Yes
  • Command or tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): Yes
  • If any answer is Yes, explain the risk and mitigation: explicit user-submitted sessions.search reads active transcript matches from the already authenticated Gateway's authorized visible roster using operator.read. No host filesystem access, transcript export, arbitrary RPC endpoint or automatic retry is added. Snippets remain text and failure logs contain only exception types.

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes
  • Config or environment changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, list the exact upgrade steps: N/A. Unknown-method responses display unsupported search without affecting existing session browsing; permission/protocol/connection failures do not become successful empty results.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

karkarl and others added 2 commits October 23, 2026 17:14
Add epoch-bound native transcript search with scoped Gateway requests, human-readable results, lifecycle fences and faithful unit/socket/UI fixture coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@karkarl

karkarl commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator Author

Current-head native fixture proof at 95adf40: real accessible Search control, rendered matching message results, then navigation to the matching research conversation. Run 5013d7aefbe34817afe308605e3a7a2f passed 1/1 and observed sessions.search with outcome ok. These are owned app-window captures containing only synthetic fixture content, not live Gateway proof.

Sessions search with two matching message results

Matching research conversation opened from a search result

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR adds message search to Sessions with matching snippets, conversation titles, and chat navigation.

Example: Search for FIXTURE RESEARCH: in Sessions.

  • Before: Users must open individual conversations to find remembered message text.
  • After: Two matching messages appear, and selecting their conversation opens the research chat.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and source-consistent, with credible native UI evidence but incomplete production Gateway compatibility proof.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Users cannot find a conversation from remembered message content without opening transcripts individually.
Reason: The collaborator-authored direction provides clear discovery value through an existing Gateway capability without adding settings or persistent client state.

Merge readiness

✅ Ready for maintainer review

Keep this useful, collaborator-authored draft open: current main lacks transcript search, and review found no definite introduced correctness or security defect.

Priority: P2
Reviewed head: 95adf40e9ac1e5719bd1dd54a899760d6ff98d3d

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied native scenario uses a synthetic Gateway; search, matching-session navigation, and unsupported-method behavior still need evidence against identified supported Gateway builds.
Agent review details

How this fits together

The Sessions page sends an explicit query through the existing authenticated operator client to Gateway transcript search and renders returned matches as native text.

flowchart LR
  A[User query] --> B[Sessions page]
  B --> C[Search lifecycle owner]
  C --> D[Operator Gateway client]
  D --> E[Gateway transcript search]
  E --> F[Native results]
  F --> B
Loading

Technical review

Best possible solution:

Retain the bounded search implementation and complete its supported Gateway validation before landing.

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

This is a new capability rather than a reported defect; source inspection confirms its absence from current main.

Is this the best way to solve the issue?

The implementation appropriately delegates search and visibility to Gateway, retains native presentation, and binds asynchronous results to the originating view and connection.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against e5122db3c943.

Provenance checked

  • Gateway fixture method advertisement and request handling keeps the original intent (3e74082: The fixture provides deterministic isolated app exploration rather than claiming to emulate production Gateway behavior; this extension preserves and documents that boundary.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Pedro Larroy: Raw commit 791574d adds src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs:33 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 791574ddf557; files: src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs)
  • Barbara Kudiess: Raw commit 989f9ff adds src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs:28 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 989f9ffde2dd; files: src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs)
  • Dallin Romney: Raw commit 959b352 adds src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 959b3527ac7b; files: src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs)

Labels

Label changes:

  • add P2: Searching remembered message content is a useful, bounded improvement to conversation discovery.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Searching remembered message content is a useful, bounded improvement to conversation discovery.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Exercise native search and result navigation against an identified supported Gateway and record the outcome.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 23, 2026, 6:20 PM ET / 22:20 UTC.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale due to inactivity.
Please update it or it will be closed.

@github-actions github-actions Bot added the stale label Nov 7, 2026
@roboclaw-bot

Copy link
Copy Markdown
Contributor

PR cleanup review

Reviewed head: 95adf40e9ac1e5719bd1dd54a899760d6ff98d3d. Main comparison: e59374c064f43d68f5c72d070d4c89ef2d20ec3b.

Shared navigation search has now landed in #2016 (4ea07e8), including Gateway message search, snippets and conversation navigation. This overlaps the main goal here, but I cannot call the full PR equivalent: this candidate permits background/unknown conversations and retains richer message provenance, while main deliberately uses a narrower shared-search scope. Please decide whether those residuals belong in the shared search owner. I recommend not introducing a second Sessions-page search implementation, and closing this lane only with that scope distinction recorded.

Action in this cleanup pass: leaving this PR open. No branch changes or runtime-proof waiver. The findings above come from source, discussion and recorded-CI review; Windows validation was not rerun in this pass.

@github-actions github-actions Bot removed the stale label Nov 11, 2026

This branch has not been deployed

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

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants