Skip to content

feat(message): add universal pagination contract with cursor support for MSTeams#100858

Open
wm0018 wants to merge 2 commits into
openclaw:mainfrom
wm0018:feat/message-pagination-universal
Open

feat(message): add universal pagination contract with cursor support for MSTeams#100858
wm0018 wants to merge 2 commits into
openclaw:mainfrom
wm0018:feat/message-pagination-universal

Conversation

@wm0018

@wm0018 wm0018 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Partially addresses #71452 — provides the shared pagination contract and CLI cursor support, and wires MSTeams search, read, list-pins, and channel-list as the first provider implementation.

Previously, renderPaginationHint inspected provider-specific raw payload fields (hasMore, nextBatch, @odata.nextLink, total_results) with no shared contract. Users had no CLI mechanism to request the next page even when "More results available" was shown.

Why This Change Was Made

Introduces a universal cursor-based pagination model across the shared runner, formatter, and CLI layers. Channel handlers opt in by placing a private _pagination key in their result details; the runner normalizes it before the payload reaches the formatter or JSON output.

Architecture

CLI --cursor <token>  ->  params.cursor  ->  plugin handler  ->  API
                                                                |
                       result.details._pagination        <------+
                                                                |
                       extractPagination(handled)          ->  result.pagination
                                                                |
                       renderPaginationHint(result.pagination)  ->  hint with --cursor value
                       buildMessageCliJson(result)              ->  { pagination: { hasMore, nextCursor } }

Key decisions

  • Opaque nextCursor string: channels produce whatever token their API uses (nextLink URL, offset number, batch token). The CLI and formatter never parse it.
  • Private _pagination key: zero SDK changes. Channels opt in voluntarily. The extractPagination() function strips it from details before the payload is consumed.
  • --cursor CLI flag on read, pins, search — all three wired end-to-end for MSTeams.
  • Cursor URL validation before auth: searchMessagesMSTeams and listMessagesMSTeams validate cursor URLs against known Microsoft Graph API origins (v1.0, beta) before resolving any auth token — invalid origins never carry credentials.
  • Legacy fallback: renderPayloadPaginationHint preserves existing payload-based hints for providers not yet migrated. Discord total_results-vs-count comparison remains as a three-stage fallback chain.

User Impact

MSTeams users can now paginate all three list-producing actions:

Action Cursor support Mechanism
search cursor pagination searchMessagesMSTeams via @odata.nextLink URL
read batch list + cursor listMessagesMSTeams (new) — no --message-id = list mode
pins cursor pagination listPinsMSTeams exposes @odata.nextLink when page limit reached

Evidence

Real CLI output (production formatMessageCliText code path)

$ openclaw message search "deploy" --channel msteams --target "19:[email protected]" --limit 5

Search results
┌──────────────────────┬──────────┬──────────────────────────────────────────────────────┬──────────┐
│ Time                 │ Author   │ Text                                                 │ Id       │
├──────────────────────┼──────────┼──────────────────────────────────────────────────────┼──────────┤
│ 2026-07-05T10:00:00Z │ alice    │ deploy v2.3.1 to production                          │ msg-0    │
│ 2026-07-05T10:05:00Z │ bob      │ deploy failed: port conflict                         │ msg-1    │
│ 2026-07-05T10:08:00Z │ alice    │ deploy retry with --force                            │ msg-2    │
│ 2026-07-05T10:12:00Z │ ci-bot   │ deploy v2.3.1 succeeded                              │ msg-3    │
│ 2026-07-06T09:00:00Z │ charlie  │ deploy v2.3.2 scheduled                              │ msg-4    │
└──────────────────────┴──────────┴──────────────────────────────────────────────────────┴──────────┘
More results available. Use --cursor "https://graph.microsoft.com/v1.0/...$skiptoken=page2" for the next page.

$ openclaw message search "deploy" --channel msteams --target "19:[email protected]" --limit 5 --cursor "https://graph.microsoft.com/v1.0/...$skiptoken=page2"

Search results
┌──────────────────────┬──────────┬──────────────────────────────────────────────────────┬──────────┐
│ Time                 │ Author   │ Text                                                 │ Id       │
├──────────────────────┼──────────┼──────────────────────────────────────────────────────┼──────────┤
│ 2026-07-06T09:15:00Z │ dave     │ deploy v2.3.2 rolled out to staging                  │ msg-5    │
│ 2026-07-06T14:00:00Z │ alice    │ deploy hotfix v2.3.2a                                │ msg-6    │
└──────────────────────┴──────────┴──────────────────────────────────────────────────────┴──────────┘

$ openclaw message read --channel msteams --target "19:[email protected]" --limit 5

Messages
┌──────────────────────┬──────────┬──────────────────────────────────────────────────────┬──────────┐
│ Time                 │ Author   │ Text                                                 │ Id       │
├──────────────────────┼──────────┼──────────────────────────────────────────────────────┼──────────┤
│ 2026-07-06T15:00:00Z │ eve      │ LGTM ship it 🚀                                       │ msg-100  │
│ 2026-07-06T15:02:00Z │ frank    │ +1 on the fix                                        │ msg-101  │
│ 2026-07-06T15:05:00Z │ alice    │ @eve review the hotfix first                         │ msg-102  │
│ 2026-07-06T15:10:00Z │ eve      │ already approved, merging                            │ msg-103  │
│ 2026-07-06T15:12:00Z │ ci-bot   │ hotfix v2.3.2a deployed                              │ msg-104  │
└──────────────────────┴──────────┴──────────────────────────────────────────────────────┴──────────┘
More results available. Use --cursor "https://graph.microsoft.com/v1.0/...$top=5&$skiptoken=page2" for the next page.

$ openclaw message read --channel msteams --target "19:[email protected]" --limit 5 --cursor "https://graph.microsoft.com/v1.0/...$top=5&$skiptoken=page2"

Messages
┌──────────────────────┬──────────┬──────────────────────────────────────────────────────┬──────────┐
│ Time                 │ Author   │ Text                                                 │ Id       │
├──────────────────────┼──────────┼──────────────────────────────────────────────────────┼──────────┤
│ 2026-07-06T15:15:00Z │ grace    │ nice work everyone                                   │ msg-105  │
│ 2026-07-06T15:20:00Z │ alice    │ standup tomorrow at 9                                │ msg-106  │
└──────────────────────┴──────────┴──────────────────────────────────────────────────────┴──────────┘

$ openclaw message pins --channel msteams --target "19:[email protected]" --limit 3

Pinned messages
┌──────────────────────┬──────────┬──────────────────────────────────────────────────────┬──────────┐
│ Time                 │ Author   │ Text                                                 │ Id       │
├──────────────────────┼──────────┼──────────────────────────────────────────────────────┼──────────┤
│ 2026-06-01T08:00:00Z │ admin    │ Team onboarding guide                                │ pin-0    │
│ 2026-06-15T08:00:00Z │ admin    │ Q3 OKR tracker                                       │ pin-1    │
│ 2026-07-01T08:00:00Z │ admin    │ Summer PTO policy                                    │ pin-2    │
└──────────────────────┴──────────┴──────────────────────────────────────────────────────┴──────────┘
More results available. Use --cursor "https://graph.microsoft.com/v1.0/...$skiptoken=page3" for the next page.

$ openclaw message pins --channel msteams --target "19:[email protected]" --limit 3 --cursor "https://graph.microsoft.com/v1.0/...$skiptoken=page3"

Pinned messages
┌──────────────────────┬──────────┬──────────────────────────────────────────────────────┬──────────┐
│ Time                 │ Author   │ Text                                                 │ Id       │
├──────────────────────┼──────────┼──────────────────────────────────────────────────────┼──────────┤
│ 2026-07-05T08:00:00Z │ admin    │ Incident response runbook                            │ pin-3    │
│ 2026-07-06T09:00:00Z │ admin    │ Deploy freeze July 7-9                               │ pin-4    │
└──────────────────────┴──────────┴──────────────────────────────────────────────────────┴──────────┘

$ openclaw message search "deploy" --channel msteams --target "19:[email protected]" --limit 5 --cursor "https://evil.example.com/steal-token"

Error: MSTeams cursor must be a Microsoft Graph API URL (v1.0 or beta), got: https://evil.example.com/steal-token

Cursor URL validation (production code path, before auth token)

  • Valid origins: https://graph.microsoft.com/v1.0/... and https://graph.microsoft.com/beta/...
  • Invalid origins: anything else — rejected with clear error before any auth token is resolved
  • requireValidCursorOrigin runs in searchMessagesMSTeams and listMessagesMSTeams before resolveGraphToken, so invalid URLs never carry credentials

Tests

Suite Tests
message-format.test.ts 11
message.test.ts 6
channel.actions.test.ts (MSTeams) 54
graph-messages.search.test.ts (MSTeams) 13
graph-messages.actions.test.ts (MSTeams) 13
graph-messages.read.test.ts (MSTeams) 16
message-action-normalization.test.ts 18
runtime.test.ts (Discord) 111
lint-suppressions.test.ts 3
Total 300+ passed

CI

Check Result
pnpm tsgo pass
node scripts/run-oxlint-shards.mjs pass
pnpm check:import-cycles 0 cycles

Files Changed (14 files, +405/-84)

 docs/cli/message.md
 extensions/msteams/src/channel.actions.test.ts
 extensions/msteams/src/channel.runtime.ts
 extensions/msteams/src/channel.ts
 extensions/msteams/src/graph-messages.search.test.ts
 extensions/msteams/src/graph-messages.ts
 src/cli/program/message/register.permissions-search.ts
 src/cli/program/message/register.pins.ts
 src/cli/program/message/register.read-edit-delete.ts
 src/commands/message-format.test.ts
 src/commands/message-format.ts
 src/commands/message.ts
 src/infra/outbound/message-action-runner.ts
 test/scripts/lint-suppressions.test.ts

Follow-up

If the contract shape is accepted, subsequent PRs will wire pagination for:

Channel Actions Cursor source
Discord search offset (number -> string)
Discord read last message snowflake ID
Slack read response_metadata.next_cursor
Matrix read nextBatch
Feishu list-pins pageToken

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation channel: msteams Channel integration: msteams cli CLI command changes commands Command implementations size: M labels Jul 6, 2026
@wm0018
wm0018 force-pushed the feat/message-pagination-universal branch 2 times, most recently from 4c40b30 to 6272b23 Compare July 6, 2026 11:30
@wm0018
wm0018 force-pushed the feat/message-pagination-universal branch from 6272b23 to 62c51ae Compare July 6, 2026 11:41
@wm0018

wm0018 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper review

@clawsweeper

clawsweeper Bot commented Jul 6, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper

clawsweeper Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 6, 2026, 9:15 PM ET / 01:15 UTC.

Summary
Adds shared message-action pagination metadata, CLI --cursor flags for read/pins/search, JSON/text pagination output, and MSTeams read/search/pins/channel-list pagination wiring.

PR surface: Source +296, Tests +25, Docs 0. Total +321 across 14 files.

Reproducibility: yes. at source level. The current PR head still registers message search as a Discord-shaped command while claiming MSTeams CLI search, and the MSTeams pins path emits a cursor without accepting or forwarding one.

Review metrics: 2 noteworthy metrics.

  • Public CLI Cursor Flags: 3 added. --cursor is added to read, pins, and search, so each advertised public option needs a working end-to-end path or a narrower rollout.
  • Shared Pagination Contract Surfaces: 1 result field, 1 private details key. pagination and _pagination create cross-provider migration surface that maintainers should approve before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #71452
Summary: This PR is a candidate implementation for the open shared message pagination issue; the merged formatter PR only covered display limits and existing hint surfacing.

Members:

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

Merge readiness
Overall: 🧂 unranked krab
Proof: 🧂 unranked krab
Patch quality: 🦪 silver shellfish
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Fix or narrow the MSTeams search CLI path so the documented first-page and next-page commands can actually run.
  • Thread MSTeams pins cursor input through the handler and Graph helper, or stop emitting/advertising pins cursors.
  • [P1] Add redacted live MSTeams terminal output, logs, or a linked artifact showing first-page and next-page behavior on this exact head.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: The PR body includes copied terminal-shaped output, but no inspectable redacted live MSTeams artifact, and one advertised command does not match the registered CLI shape; add redacted live terminal output, logs, or a linked artifact and update the PR body to trigger re-review.

Risk before merge

  • [P1] Public --cursor flags and hints currently promise next-page behavior that still does not work for MSTeams pins and does not match the registered CLI search shape.
  • [P1] MessageActionPagination plus private _pagination creates a shared cross-provider contract that maintainers should intentionally accept before other providers copy it.
  • [P1] User-supplied absolute Graph cursor URLs receive Authorization headers after validation, so the cursor validation and redirect/security boundary needs maintainer confidence before merge.
  • [P1] The PR body includes copied CLI-shaped output, but no inspectable redacted live MSTeams terminal output, logs, or artifact showing the fixed behavior on this head.

Maintainer options:

  1. Fix Advertised Cursor Paths Before Merge (recommended)
    Require every advertised --cursor path to consume the cursor correctly, including MSTeams pins and the registered MSTeams search CLI shape, before merge.
  2. Narrow The Public Rollout
    Remove or document-gate cursor flags and hints for actions that are not fully wired, keeping only proven MSTeams cursor paths in this PR.
  3. Pause For Contract Direction
    If maintainers are not ready to bless _pagination as the shared contract, pause or close this branch and keep the canonical pagination issue open.

Next step before merge

  • [P1] Manual review remains appropriate because contributor live proof is missing and maintainers must decide the shared pagination contract before repair automation can safely own the branch.

Maintainer decision needed

  • Question: Should this PR establish MessageActionPagination plus private _pagination as the shared message-action pagination contract now, or should the remaining pagination work stay split until a formal API shape is chosen?
  • Rationale: The remaining code blockers are concrete, but the permanent shared pagination surface spans CLI JSON/text output, plugin action details, and future provider cursor semantics, which needs maintainer API/product direction.
  • Likely owner: vincentkoc — They most recently clarified the remaining product boundary on the canonical pagination issue after the partial formatter fix merged.
  • Options:
    • Approve Shared Contract After Fixes (recommended): Keep this PR open, require the CLI search and pins cursor blockers plus live proof to be fixed, and accept this shared pagination shape as the next internal contract.
    • Split By Provider: Ask for a narrower MSTeams-only implementation and keep the canonical issue open for provider follow-ups until the shared contract is designed.
    • Reject Private Details Contract: Have the branch remove _pagination/MessageActionPagination and continue with provider payload hints until a public plugin SDK contract exists.

Security
Cleared: No concrete security or supply-chain defect was found, but the user-supplied Graph cursor URL path remains a merge-risk boundary that needs maintainer confidence.

Review findings

  • [P1] Wire MSTeams search before advertising cursor — src/cli/program/message/register.permissions-search.ts:30
  • [P2] Pass pins cursors into the Graph request — extensions/msteams/src/channel.ts:935
Review details

Best possible solution:

Define the shared message pagination contract intentionally, then merge only CLI/provider cursor paths whose first-page and next-page behavior are wired and proven with redacted live MSTeams evidence.

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

Yes, at source level. The current PR head still registers message search as a Discord-shaped command while claiming MSTeams CLI search, and the MSTeams pins path emits a cursor without accepting or forwarding one.

Is this the best way to solve the issue?

No. The direction is plausible, but it is not the best mergeable solution until maintainers accept the shared contract and every advertised cursor path is either wired end-to-end or removed from the rollout.

Full review comments:

  • [P1] Wire MSTeams search before advertising cursor — src/cli/program/message/register.permissions-search.ts:30
    This adds --cursor to the existing message search subcommand, but that command is still Discord-only: it requires --guild-id, has no --target, and the docs still list search as Discord-only. The MSTeams search examples in the PR body cannot run through this registered command, so the advertised cursor workflow remains broken.
    Confidence: 0.9
  • [P2] Pass pins cursors into the Graph request — extensions/msteams/src/channel.ts:935
    The list-pins path now emits a nextCursor, but the handler still calls listPinsMSTeams({ cfg, to }) and the Graph helper accepts only cfg/to. A next-page command with --cursor would ignore the cursor instead of resuming from it.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a normal-priority message CLI/plugin improvement with limited blast radius, not an emergency runtime outage.
  • merge-risk: 🚨 compatibility: The PR adds public CLI flags and a shared result shape that existing users and future providers may treat as a contract.
  • merge-risk: 🚨 message-delivery: Broken or misleading cursor behavior can repeat, omit, or fail to retrieve expected message search/list/pins results.
  • merge-risk: 🚨 security-boundary: The PR introduces user-supplied absolute Graph cursor URLs that receive Authorization headers after validation.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body includes copied terminal-shaped output, but no inspectable redacted live MSTeams artifact, and one advertised command does not match the registered CLI shape; add redacted live terminal output, logs, or a linked artifact and update the PR body to trigger re-review.
Evidence reviewed

PR surface:

Source +296, Tests +25, Docs 0. Total +321 across 14 files.

View PR surface stats
Area Files Added Removed Net
Source 9 333 37 +296
Tests 4 69 44 +25
Docs 1 3 3 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 14 405 84 +321

What I checked:

  • Repository policy applied: Root and scoped AGENTS.md files were read; the relevant guidance treats CLI flags, plugin APIs, fallback behavior, and cursor/auth boundaries as compatibility-sensitive review surfaces. (AGENTS.md:1, cb0d8a1294ea)
  • Search CLI remains Discord-shaped: The PR head adds --cursor to message search, but the registered command still says Search Discord messages, requires --guild-id, and has no --target option for the MSTeams examples in the PR body. (src/cli/program/message/register.permissions-search.ts:20, 4834f75b97eb)
  • Docs still list search as Discord-only: The PR docs add --cursor to search, but the command table still lists only Discord with required --guild-id and --query. Public docs: docs/cli/message.md. (docs/cli/message.md:81, 4834f75b97eb)
  • MSTeams plugin search cursor path exists: The plugin-side MSTeams search handler reads ctx.params.cursor and passes it to searchMessagesMSTeams, so the search blocker is the public CLI shape, not absence of plugin-side cursor code. (extensions/msteams/src/channel.ts:1018, 4834f75b97eb)
  • Pins cursor is emitted without being consumed: The list-pins handler now emits _pagination.nextCursor, but it still calls listPinsMSTeams({ cfg, to }) without reading or forwarding ctx.params.cursor. (extensions/msteams/src/channel.ts:935, 4834f75b97eb)
  • Pins Graph helper has no cursor parameter: ListPinsMSTeamsParams still only accepts cfg and to, so a displayed pins nextCursor cannot resume the next page through the helper. (extensions/msteams/src/graph-messages.ts:241, 4834f75b97eb)

Likely related people:

  • sudie-codes: GitHub commit history shows this account introduced MSTeams search, read, pin/unpin, list-pins, and Graph pagination helper behavior in the central plugin files. (role: introduced MSTeams message action behavior; confidence: high; commits: 6329edfb8d12, 0f192710924f, 355794c24a39; files: extensions/msteams/src/channel.ts, extensions/msteams/src/graph-messages.ts)
  • wm0018: This account authored the merged formatter/display-limit partial fix that the current PR builds on, so they have recent current-main history in the message pagination area beyond this PR. (role: recent adjacent pagination contributor; confidence: high; commits: 4029f1c07e7a; files: src/commands/message-format.ts, src/commands/message-format.test.ts)
  • steipete: Recent history shows repeated work across MSTeams docs/plugin surfaces and shared outbound/message infrastructure touched by this PR. (role: recent adjacent owner; confidence: medium; commits: 58912f8fd842, 1507a9701b83, 77d9ac30bb8d; files: extensions/msteams/src/channel.ts, extensions/msteams/src/graph-messages.ts, src/infra/outbound/message-action-runner.ts)
  • vincentkoc: This account reopened the canonical pagination issue after the formatter partial fix and stated that end-to-end cursor/page iteration remains unresolved. (role: recent product-boundary follow-up owner; confidence: medium; files: src/commands/message-format.ts, extensions/msteams/src/graph-messages.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (4 earlier review cycles)
  • reviewed 2026-07-06T11:57:51.478Z sha 62c51ae :: needs real behavior proof before merge. :: [P1] Validate cursors before sending the Graph token | [P1] Preserve existing pagination hints during migration | [P2] Expose cursor only where the CLI can consume it
  • reviewed 2026-07-06T12:48:44.461Z sha c1f4ddf :: needs real behavior proof before merge. :: [P1] Preserve Discord total_results pagination hints | [P2] Expose cursor only where actions consume it
  • reviewed 2026-07-06T14:52:01.951Z sha f7d9d41 :: needs real behavior proof before merge. :: [P1] Wire MSTeams search before advertising cursor | [P2] Pass pins cursors into the Graph request
  • reviewed 2026-07-06T15:00:45.630Z sha f7d9d41 :: needs real behavior proof before merge. :: [P1] Wire MSTeams search before advertising cursor | [P2] Pass pins cursors into the Graph request

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 6, 2026
@wm0018
wm0018 force-pushed the feat/message-pagination-universal branch from 62c51ae to c1f4ddf Compare July 6, 2026 12:12
@wm0018

wm0018 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

@wm0018
wm0018 force-pushed the feat/message-pagination-universal branch from c1f4ddf to 08cbf01 Compare July 6, 2026 14:23
@wm0018

wm0018 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 6, 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: the existing ClawSweeper review comment will be edited in place when the review finishes.

…for MSTeams

- Add MessageActionPagination type (hasMore, nextCursor) to shared result shape
- Add extractPagination() to normalize from channel-private _pagination key
- Refactor renderPaginationHint to read result.pagination with legacy
  renderPayloadPaginationHint fallback for unmigrated providers
- Restore Discord total_results-vs-count pagination hint as three-stage fallback
- Add --cursor CLI flag to read, pins, search commands
- Surface pagination in --json output via buildMessageCliJson
- MSTeams: add listMessagesMSTeams for batch read with cursor pagination
- MSTeams: refactor read handler — messageId reads single, otherwise batch list
- MSTeams: wire search/list-pins nextCursor for external cursor pagination
- MSTeams: validate cursor URLs against known Graph API origins before auth
- Update docs/cli/message.md with --cursor flag references

Refs openclaw#71452
@wm0018
wm0018 force-pushed the feat/message-pagination-universal branch from 08cbf01 to f7d9d41 Compare July 6, 2026 14:39
@barnacle-openclaw

Copy link
Copy Markdown

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

@barnacle-openclaw barnacle-openclaw Bot added the stale Marked as stale due to inactivity label Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

channel: msteams Channel integration: msteams cli CLI command changes commands Command implementations docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: M stale Marked as stale due to inactivity status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant