Repository navigation
feat: filter shared sessions by owner or involvement - #203063
Conversation
OpenClaw-Publication: d3862eed-e8bb-86a0-b288-2d987038af86
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR applies owner and involvement filters at shared-session sources and preserves the selection through pagination, viewing, and importing. Example: A Team source has 101 sessions, with the only session involving GitHub account 101 beyond the first 100 source rows.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: the maintainer-approved feature addresses incomplete filtering across shared-session pages, and current main still lacks it; no new actionable code defect was established. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Control UI sends a relationship selector through Gateway catalog operations to Session Share, whose source intersects it with existing publication restrictions and returns scoped session pages and transcripts. flowchart LR
A[Sidebar person filter] --> B[Gateway catalog operations]
B --> C[Session Share receiver]
C --> D[Node or Gateway source]
D --> E[Publication and relationship selection]
E --> F[Scoped pages and transcripts]
F --> A
Technical reviewBest possible solution: Complete the approved source-side selection path using the existing publication, identity, paging, and catalog owners. Do we have a high-confidence way to reproduce the issue? Source inspection establishes that current-main sidebar filtering operates on downloaded catalog rows, while this PR moves relationship selection ahead of source pagination; no target code was executed. Is this the best way to solve the issue? The implementation addresses the pagination boundary directly, reuses canonical relationship projection, and carries one optional selector through the existing catalog operations without adding a competing publication owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ae1e9ee0fe76. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)
Reviewed November 22, 2026, 8:58 PM ET / November 23, 2026, 01:58 UTC (Revision 4). |
OpenClaw-Publication: 18bf98bb-e280-8c6d-a9d1-f0555dad0e00
…l catalogs correct Maintainer review of the consolidated catalog pair found five defects. - An unknown or ambiguous relation target on a node source never reached the client-side fallback: the receiver matched the source's English error text, and the node transport prefixes thrown errors with "Error: ". The source now answers the catalog list with a typed `relationUnresolved` page, keyed off a closed `PROFILE_RELATION_UNRESOLVED` code, on both node and Gateway paths. - While a relation was active the sidebar refreshed only catalogs that support it and kept stale copies of every other catalog. Send one aggregate request again; the Gateway already applies the relation only to supporting providers. - Snapshot eviction protected every snapshot of the requested node, so 32 relations on one node blocked any new relation. Protect only the requested keys. - A partially filtered catalog disappeared when every row was excluded, hiding its guidance. Keep it visible. - Explicit catalog requests reused a snapshot up to 30 s old, so rows a source withdrew stayed listed (caught by the paired-node e2e test). Restore main's fresh read on every explicit request. Also fix a UI test type error, a docs sentence that contradicted the connect-time command filtering, docs that still described only the two base commands, and give the registration test the receiver's real 30 s invoke timeout.
|
@clawsweeper re-review Head |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review Head moved to |
|
🦞👀 Re-review progress:
|
|
Land-ready on head Work done on top of the original port
Proof
Pre-existing CI failures (run 45091504361, attempt 1)
Known gaps
Supersedes #191138. |
|
@clawsweeper re-review Head moved to |
|
🦞👀 Re-review progress:
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
* feat(session-share): filter shared sessions by owner or involvement * feat: filter shared sessions by owner or involvement OpenClaw-Publication: d3862eed-e8bb-86a0-b288-2d987038af86 * fix: reconcile catalog filter lifecycle and original links * test: qualify filtered source links and remove duplicate request assertions * refactor(ui): avoid redundant optional relation request spreads * fix: keep catalog mapping and lifecycle within lint budgets * perf(ui): keep catalog routing behind its lazy boundary * refactor(ui): keep catalog continuation private * test(ui): assert catalog filter guidance by accessible name * chore: allow approved session catalog SDK exports * feat: filter shared sessions by owner or involvement OpenClaw-Publication: 18bf98bb-e280-8c6d-a9d1-f0555dad0e00 * fix(session-share): consolidate optional catalog commands * fix(session-share): preserve partial catalogs and unify pair selection * fix(session-share): preserve legacy read cursor limits * fix(session-share): retain distinct source failure guidance * test(session-share): assert publication transport denials * test(session-share): assert revoked transport close boundaries * Publish openclaw/salty-claw-9b0cf4 OpenClaw-Publication: 5e6a2c31-78dc-87f1-9e2b-17d674b08cc6 * fix(session-share): keep relationship fallbacks, refreshes and partial catalogs correct Maintainer review of the consolidated catalog pair found five defects. - An unknown or ambiguous relation target on a node source never reached the client-side fallback: the receiver matched the source's English error text, and the node transport prefixes thrown errors with "Error: ". The source now answers the catalog list with a typed `relationUnresolved` page, keyed off a closed `PROFILE_RELATION_UNRESOLVED` code, on both node and Gateway paths. - While a relation was active the sidebar refreshed only catalogs that support it and kept stale copies of every other catalog. Send one aggregate request again; the Gateway already applies the relation only to supporting providers. - Snapshot eviction protected every snapshot of the requested node, so 32 relations on one node blocked any new relation. Protect only the requested keys. - A partially filtered catalog disappeared when every row was excluded, hiding its guidance. Keep it visible. - Explicit catalog requests reused a snapshot up to 30 s old, so rows a source withdrew stayed listed (caught by the paired-node e2e test). Restore main's fresh read on every explicit request. Also fix a UI test type error, a docs sentence that contradicted the connect-time command filtering, docs that still described only the two base commands, and give the registration test the receiver's real 30 s invoke timeout. * chore(protocol): regenerate gateway validators after main merge * chore(protocol): regenerate gateway validators after main merge * chore(docs): regenerate config baseline after main merge
* fix(tlon): gate group DMs by club approval * fix(tlon): persist configured club grants * docs(config): record Tlon club policy surface * test(tlon): keep sender role cases under lint limit * fix(tlon): preserve direct settings events * fix(tlon): narrow settings event records without assertions (cherry picked from commit 6eb70d4) Release adaptation: regenerate stable config docs counts/hashes and bundled channel metadata; no source conflicts. Channel count +6, core/plugin unchanged. The assertion ratchet generator confirms the same Tlon-only shrink; unrelated pre-existing UI ratchet entries are excluded. Companion disposition: #204126 is a missing optional user-facing warning about later club invitees; existing prompts already disclose unverified participant input and future messages. #203928 is not applicable to approval/routing, only image download lifetime. #204219, #203470, #203901 and #203063 overlap only generated/ratchet files, not applicable; regenerate from stable inputs. No later PR or commit-SHA mentions. Co-authored-by: RomneyDa <[email protected]>
Replaces #191138, which is far behind
main. This is a focused port of request-scoped relationship filters onto the current Session Share owners, and it consolidates the plugin's optional node commands into one pair.What Problem This Solves
The sidebar's Owned by / Involving me filters run on rows already downloaded from a shared source, so matching sessions on later source pages never appear. Selection has to happen on the source before pagination, and survive opening, paging and importing the selected session.
Why This Change Was Made
openclaw.sessions.list.v1/read.v1unchanged (with their desktop default) and adds one optional node pair,openclaw.sessions.catalog.list.v1/.read.v1. List takes an optionalprofileRelationandincludeOriginalPath; read takes an optionalprofileRelation. It replaces every optional variant, including the unreleasedlist-with-links.v1from feat: open shared sessions in their source Control UI #203044, so "Open original" now uses the catalog list withincludeOriginalPath: true. Outbound Gateway sources get the matchingsession-share.catalog.list/.readmethods, advertised infeatures.methods; they never carry original links.share.involvingProfileId, device grants, read rechecks) before pagination. Cursors are bound to their relation.FILTER_PARTIALwith guidance. The source reports an unresolved target as a typedrelationUnresolvedpage (from a closedPROFILE_RELATION_UNRESOLVEDcode), not as error text.profileRelationonly when a catalog advertisescapabilities.profileRelation, in one aggregatesessions.catalog.list; the Gateway forwards it only to providers that support it.main; snapshots are keyed by node and relation, and eviction protects only the snapshots a request needs.User Impact
Nothing is enabled by default. Setup is in
docs/plugins/session-share.md("Open original on a paired node", then "Relationship filtering"): allow the catalog pair ingateway.nodes.commands.allowon the receiver, reinstall the source node with all four session commands in--commands, and approve the widened surface withopenclaw nodes pending/openclaw nodes approve. Until then the receiver uses the legacy pair: shared sessions stay readable and filters fall back to client-side matching with guidance.Disclosure, documented under Security boundary: an approved reader can name any numeric GitHub account as the target, and the results can show whether it resolves on the source and its owner, participant or mention membership within sessions already published to that reader. Source profile-ID targets are not accepted.
Config surface: no new config keys (help text only). Plugin SDK surface: two new type exports (
SessionCatalogProfileRelation,SessionCatalogSourceProfileRelation) and two members on the existingsessionCatalogPagingobject (encodeScopedCursor,decodeScopedCursor), owner-approved; optional parameters added to existing declarations; export budget raised by exactly 2.Maintainer fixes in this head
Mac review of
69b982ec51c(published from the source host) found and fixed, in3df72557ad7:Error:. Replaced with the typed page on both node and Gateway paths; a real-handler test asserts the page.test/e2e/qa-lab/plugins/session-share-node.e2e.test.ts). Restored main's fresh read and main's test helper.Also: a UI test type error, a docs sentence that contradicted connect-time command filtering, docs that still described only the base commands, and the registration test now uses the receiver's real 30 s invoke timeout (the first source read starts a cold session-history worker that can exceed the 5 s default in tests).
Evidence
Blacksmith Testbox, tree of
3df72557ad7(currentmainmerged):pnpm tsgo:core,tsgo:extensions,tsgo:ui,tsgo:test:src,tsgo:extensions:test,tsgo:test:uipass.pnpm check:baseline-ratchets --base <merge-base>passes, including test lines with the allocation below.pnpm check:import-cycles,pnpm gateway:validators:check,pnpm protocol:check,pnpm config:docs:check,pnpm build,oxfmt --checkandoxlinton changed files,pnpm docs:check-linkspass.src/plugins/session-share-registration.test.ts(loads the plugin through the real registrar, asserts no diagnostics and that only the legacy pair is default-allowed, and invokes the real source through the receiver's node invoke handler with no allow entries).test/e2e/qa-lab/plugins/session-share-node.e2e.test.ts(real paired node and receiver) passes.ui/src/e2e/session-catalog-relations.e2e.test.tsandui/src/e2e/session-share-original.e2e.test.tspass in Chromium.Inherited, not from this change (each reproduced on
mainat the merge base on the same Testbox):ui/src/e2e/chat-composer-redesign.e2e.test.ts"keeps auth-failed model availability honest in the composer and picker" fails onmain(2 of 2 runs).extensions/codex/src/app-server/thread-lifecycle.native-config.test.ts"refuses an unowned route before native dispatch when policy introduced during preparation" fails onmain(2 of 2 runs).pnpm deadcode:exportsreports unused exports in 28 files onmain(for examplesrc/update/run.ts,src/cli/id-cli-unlink.ts); none is in a file this change touches.pnpm plugin-sdk:surface:checkstays over budget bymain's existing drift; this change adds only the approved surface above.Test-line allocation:
config/test-lines-allocations/session-share-request-relations.txtrecords 804, the exact measured net growth minus the standard 400. It covers the registrar and real invoke-path tests, source relation/cursor/transport boundaries, partial-row retention, older-Gateway capability checks, both browser fixtures, and the maintainer regressions listed above.Not proven: a deployed two-machine run of the allow, reinstall and approve sequence, and an upgrade from an installed stable release. Hosted CI and ClawSweeper on this exact head are pending.
Release note: Session Share can filter shared sessions by owner or involvement on supporting sources, and "Open original" moves to the new optional catalog command pair. Original proposal: #191138.