Skip to content

feat(reports): show session links in each member report - #154192

Merged
roboclaw-bot merged 3 commits into
mainfrom
openclaw/reports-plugin-session-links
Sep 21, 2026
Merged

roboclaw-bot merged 3 commits into
mainfrom
openclaw/reports-plugin-session-links

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Reports shows each member’s activity but does not link directly to that person’s OpenClaw conversations. Related: #154020.

User Impact

Adds direct session links to person-history pages and daily, weekly, and monthly member sections, including quiet members and alias-filtered reports. The links are labeled Current work / owned sessions, separate from historical activity.

Only sessions visible to the current viewer are shown. Unlinked or ambiguous identities are explained instead of guessed. A permission change during rendering fails closed; refreshing evaluates the new policy.

Why This Change Was Made

Reuse verified linked GitHub profiles, canonical owner-filtered session discovery before pagination, and the existing conversation-navigation bridge. Identity lookup and session pages are request-local; member queries are deduplicated and limited to four concurrent calls. Stored reports, historical counts, summaries, Markdown and JSON remain unchanged.

CI dependency

Hosted run 35546855732 failed four Claw workspace-snapshot tests in core-unit-src-security-3. The owning defect is a shared test read-pool singleton surviving file teardown, allowing a mocked fleet.list reply to reach a later real workspace.snapshot consumer. The separate repair is #154206; it adds the missing singleton retirement and an ordered fail-before/pass-after regression. No workspace/schema repair is added to this Reports diff.

A clean exact-main replay at 67358cf64e2191d17327b21a24dcbf8cf6174434 passed both focused tests and the original 218-file cohort (2,841 passed, 16 skipped), but does not guarantee the hosted per-worker assignment and does not clear the failure. The owning repair landed as 93d69d5a747432362027bbdf71eb06c96aac6eb6. Reports is now refreshed onto that repaired main at 050cfe88ce336420edc7232a44e22c8c82efae5b; the 13-file feature patch is byte-for-byte unchanged. The composed Reports/HTTP/Claw/ordered-lifecycle proof passed on this exact head: 167 tests across five shards, 55.70s Vitest wall, command exit 0 (Blacksmith proof). The source capsule verified head and tree; the owned lease was stopped and independently confirmed completed. Exact-head hosted CI passed, including the required openclaw/ci-gate. Tested merge b4b125c207969c267224af8f3bc8a8e35b71df9c has the same tree as head 050cfe88ce336420edc7232a44e22c8c82efae5b.

Evidence

  • Actual Reports renderer before/after captures using synthetic data; person pages and a daily card filtered by a GitHub alias.
  • 88 Reports identity/HTTP/render tests and four production-cookie HTTP tests passed remotely, including ownership beyond the global first page, private/incognito/archived/automated exclusions, role changes, and cookie expiry/rotation.
  • Extension production/test and root-test types, scoped lint, runtime/Madge cycle guards, line-cap and assertion-safety checks passed across recorded batches.
  • Verification: https://github.com/openclaw/openclaw/actions/runs/35544687041. Owned Testbox stopped and independently confirmed completed.
  • Parent P0/P1 autoreview is scoped-clean. A production HTTP regression also reproduces stale session disclosure after a canonical role change with unchanged operator scopes. The existing cookie authority now invalidates an in-flight response when the effective role policy changes. The corrected production-boundary regression is green: 130 targeted tests passed (5 real HTTP cases, 37 auth/runtime siblings, 88 Reports tests). Final core types, runtime/Madge cycle guards, and scoped lint also passed. Red/green proof: https://github.com/openclaw/openclaw/actions/runs/35546165541. The owned lease is independently confirmed stopped.
  • No live Gateway deployment/configuration changes. Authenticated live-browser click-through was not performed; visual fixtures and production HTTP authorization were tested in isolation.

Per-file test cost

Measured on the exact green head with /usr/bin/time -p env CI=1 pnpm test <file> --maxWorkers=1, one file per invocation on Blacksmith Testbox (run). All four invocations passed; the lease is independently confirmed completed. Command wall includes startup/build preparation; Vitest duration includes that invocation’s collection/import/setup/test work.

File Passed Command wall Vitest duration Hosted CI sum of printed case durations*
extensions/team-reports/src/work-sessions.test.ts 12 1.83 s 0.916 s 0.061 s
extensions/team-reports/src/http.test.ts 58 11.34 s 9.800 s 0.467 s
extensions/team-reports/src/render/site.test.ts 18 1.51 s 0.607 s 0.107 s
test/plugins/team-reports-http.gateway.test.ts 5 27.37 s 25.550 s 5.604 s

*Hosted CI uses verbose case reporting: these are sums of rounded case durations, not file-suite or wall time. Hosted per-file suite/wall measurements are unavailable. The extension invocation took 46.61 s across 19 files (293 cases); its full job took 161 s. The Gateway invocation took 162.34 s across 118 files (1,734 cases); its full job took 392 s. These aggregate values are not attributed to individual files.

The real HTTP suite pays for production cookie authorization, SQLite session discovery, and response-time revocation. The new role-policy regression fails through the actual socket before the repair; a renderer-only test would not protect that contract.

Daily member report

Before

Daily member report before

After

Daily member report after

Person history page

Before

Person history page before

After

Person history page after

Worked on by

Work sessions


View the OpenClaw team session

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 039f0ccc-e1b2-4a86-b4d7-caa366507645
@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime plugin: team-reports size: L maintainer Maintainer-authored PR labels Sep 21, 2026
@roboclaw-bot
roboclaw-bot marked this pull request as ready for review September 21, 2026 00:10
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components. This comment is informational because the PR author has repository Maintain or Admin access.

  • Current SHA: 050cfe88ce336420edc7232a44e22c8c82efae5b
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/gateway/http-auth-plugin-cookie.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper

clawsweeper Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 20, 2026, 9:25 PM ET / September 21, 2026, 01:25 UTC (Revision 5).

ClawSweeper review

What this changes

Adds viewer-authorized conversation links to member reports and person-history pages, with identity matching, owner-filtered pagination, and response-time permission checks.

Merge readiness

✅ Ready for maintainer review

The contribution remains useful and has no blocking findings. The previous test-cost follow-up is satisfied, and the supplied visual and production HTTP evidence supports the changed behavior.

Priority: P2
Reviewed head: 050cfe88ce336420edc7232a44e22c8c82efae5b

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, well-supported implementation with inspected visual evidence, meaningful authorization coverage, and the prior timing request resolved.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): Inspected renderer captures show both new report surfaces; supplied production HTTP results exercise real authorization and session discovery, including forbidden viewers and revocation before HTML delivery. Linked raw logs were proxy-blocked, and authenticated browser click-through was not performed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (linked_artifact): Inspected renderer captures show both new report surfaces; supplied production HTTP results exercise real authorization and session discovery, including forbidden viewers and revocation before HTML delivery. Linked raw logs were proxy-blocked, and authenticated browser click-through was not performed.
Evidence reviewed 8 items Pinned introduced change: Reviewed the merge-base-to-head patch. Member discovery uses existing users.list and sessions.list contracts, resolves ambiguous identities without an unfiltered fallback, and retains request-local caches with four concurrent member queries.
Current-main necessity and release check: Fetched main still has the global session directory without the new member resolver or owner parameter. The merged overview work at #154020 is a foundation, not a replacement. The latest release tag has no work-sessions.ts entry.
Final-response authorization: Cookie revalidation compares the effective role policy as well as current grants. Reports invokes that existing authority immediately before writing its response; changed policy produces HTTP 401 instead of disclosing prepared metadata.
Findings None None.
Security None None.

How this fits together

The Reports plugin combines stored team activity with current session metadata from the Gateway. It renders conversation links under the viewer’s permissions and opens them through existing Control UI navigation.

flowchart TD
  A[Member report request] --> B[Linked profile matching]
  B --> C[Viewer-authorized session discovery]
  C --> D[Owner filtering and pagination]
  D --> E[Report HTML]
  E --> F{Current request authority?}
  F -->|Valid| G[Conversation links]
  F -->|Changed or expired| H[Unauthorized response]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +180, Tests +289, Docs +14. Total +483 across 13 files.

View PR surface stats
Area Files Added Removed Net
Source 7 197 17 +180
Tests 4 304 15 +289
Docs 2 14 0 +14
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 13 515 32 +483

Review metrics

Metric Value Why it matters
Production versus test growth production +180 net lines; tests +289 net lines Production growth supports member identity resolution and rendering; the larger test delta covers privacy, pagination, and response-time revocation.
Discovery bounds 1 profile lookup per request; at most 4 concurrent member queries Request-local deduplication bounds repeated discovery without retaining data across viewers.

Technical review

Best possible solution:

Keep current-session links as viewer-specific presentation over canonical identity, discovery, and navigation owners, separate from stored historical reports.

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

Not applicable to the primary feature request: current main lacks member-level session links. The accompanying authorization repair has a source-inspected production HTTP regression and supplied red/green evidence.

Is this the best way to solve the issue?

Yes. The patch extends the existing Reports plugin and reuses canonical ownership filtering, viewer authorization, and conversation navigation without changing stored report formats.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This is a bounded Reports navigation improvement with focused authorization hardening and no established urgent user outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (linked_artifact): Inspected renderer captures show both new report surfaces; supplied production HTTP results exercise real authorization and session discovery, including forbidden viewers and revocation before HTML delivery. Linked raw logs were proxy-blocked, and authenticated browser click-through was not performed.
  • proof: sufficient: Contributor real behavior proof is sufficient. Inspected renderer captures show both new report surfaces; supplied production HTTP results exercise real authorization and session discovery, including forbidden viewers and revocation before HTML delivery. Linked raw logs were proxy-blocked, and authenticated browser click-through was not performed.

Evidence

What I checked:

  • Pinned introduced change: Reviewed the merge-base-to-head patch. Member discovery uses existing users.list and sessions.list contracts, resolves ambiguous identities without an unfiltered fallback, and retains request-local caches with four concurrent member queries. (extensions/team-reports/src/work-sessions.ts:125, 050cfe88ce33)
  • Current-main necessity and release check: Fetched main still has the global session directory without the new member resolver or owner parameter. The merged overview work at feat(reports): link team activity to work sessions #154020 is a foundation, not a replacement. The latest release tag has no work-sessions.ts entry. (extensions/team-reports/src/work-sessions.ts:36, 700ce434cebf)
  • Final-response authorization: Cookie revalidation compares the effective role policy as well as current grants. Reports invokes that existing authority immediately before writing its response; changed policy produces HTTP 401 instead of disclosing prepared metadata. (src/gateway/http-auth-plugin-cookie.ts:93, 050cfe88ce33)
  • Production-boundary proof: The supplied proof records passing real HTTP cases using production cookie signing, plugin dispatch, SQLite-backed session discovery, and Reports rendering. Source confirms allowed viewers, foreign private-session exclusion, ownership beyond the global first page, narrowed roles, cookie expiry, and generation rotation are checked at the response boundary. The body reports fail-before/pass-after role-policy coverage and 130 targeted passes. (test/plugins/team-reports-http.gateway.test.ts:340, 050cfe88ce33)
  • Inspected visual proof: Inspected all four downloaded PR images: daily member and person-history before/after pairs show current owned-session links, status, and the directory action while retaining historical totals. These are synthetic-data renderer captures; authenticated live-browser click-through is explicitly not claimed. (050cfe88ce33)
  • Previous follow-up resolved: The captured PR body supplies individual command walls of 1.83s, 11.34s, 1.51s, and 27.37s for the four changed test files, plus available hosted case-duration sums. It explicitly distinguishes those sums from unavailable per-file CI wall times and explains the production HTTP suite’s cost. Public docs: docs/help/testing/writing-tests.md. (docs/help/testing/writing-tests.md, 050cfe88ce33)

Likely related people:

  • RoboClaw: Raw commit 1931bae adds extensions/team-reports/src/work-sessions.ts:1 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1931baed2da3; files: extensions/team-reports/src/work-sessions.ts)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-21T00:17:56.874Z sha b05512c :: needs maintainer review before merge. :: none
  • reviewed 2026-09-21T00:42:28.483Z sha b05512c :: needs changes before merge. :: none
  • reviewed 2026-09-21T00:57:04.834Z sha 050cfe8 :: needs changes before merge. :: none
  • reviewed 2026-09-21T01:07:18.460Z sha 050cfe8 :: needs changes before merge. :: none

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 21, 2026
roboclaw-bot and others added 2 commits September 21, 2026 00:48
Incorporate the owning fix from #154206 before revalidating #154192.

Co-authored-by: steipete <[email protected]>
Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 21ce70c5-62fc-403e-8766-7468a1366783
@roboclaw-bot
roboclaw-bot merged commit 42bc1af into main Sep 21, 2026
236 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/reports-plugin-session-links branch September 21, 2026 01:26
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 21, 2026
)

* feat(reports): show session links in each member report

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 039f0ccc-e1b2-4a86-b4d7-caa366507645

* feat(reports): link each person report to owned sessions

Worked on by:
- @steipete

Co-authored-by: steipete <[email protected]>
OpenClaw-Publication: 21ce70c5-62fc-403e-8766-7468a1366783

---------

Co-authored-by: steipete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. plugin: team-reports proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. security-sensitive-changed size: L 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.

1 participant