Skip to content

feat(control-ui): approval attention chip + approval history page - #108776

Merged
steipete merged 1 commit into
mainfrom
feat/control-ui-approval-attention-and-history
Jul 16, 2026
Merged

steipete merged 1 commit into
mainfrom
feat/control-ui-approval-attention-and-history

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Approvals had no persistent surface in the Control UI: a pending approval only appeared as a modal, and there was no way to review past decisions. This adds two things: a sidebar attention chip so a pending approval surfaces where the user already is, and an approval-history page backed by a new gateway RPC over the durable operator_approvals ledger (who resolved what, when, from which device). Completes the Control UI half of the approvals work (follows #105924, #108505).

Why This Change Was Made

Feature A — sidebar attention chip. Reuses the existing overlay approvalQueue count (no new RPC): a warning chip appears when the queue is non-empty, clicking it opens the existing in-app approval overlay, and the dismissal signature is the sorted queue ids so a new approval resurfaces a dismissed chip. Flows through the same per-gateway/per-browser dismissal + cross-tab storage machinery as the existing cron/model-auth chips.

Feature B — approval history. A new listTerminalOperatorApprovals store query (terminal-only, optional kind filter, keyset cursor on the existing idx_operator_approvals_resolved index, newest-first, default 50 / max 100) reads the durable ledger. A new additive approval.history gateway RPC (scope operator.approvals, registered via the descriptor table so auth is automatic) returns mapped snapshots via the existing buildApprovalSnapshot, with the terminal snapshot schema extended additively with optional source {agentId, sessionKey} and resolver {kind, id} attribution. A new /settings/approvals page renders the rolling 30-day history (time, kind, decision/status, reason, source, resolver) with cursor pagination and empty/footer copy stating the retention window. The gateway ledger (all kinds) is the source of truth, not the plugin-specific 1Password audit.

Additive protocol only; generated Swift/Kotlin/JSON regenerated. English strings added and the translated i18n sync run (fallbacks=0 across all locales).

User Impact

Operators see pending approvals in the sidebar and can review a 30-day approval history at /settings/approvals. No behavior change to the approval flow itself.

Evidence

  • Focused tests green post-rebase: operator-approval-store (25), approval handler (34), sidebar-attention (6), approvals-page (1), app-navigation (52); Codex's broader run covered protocol/store/handler/sidebar/page (73), navigation (62), and a wider gateway/method/UI pass (205) plus a real-gateway history/scope E2E. Core/UI/test tsgo lanes, oxlint, plugin-sdk:surface:check, and generators all passed; git diff --check clean.
  • i18n: ui:i18n:check clean, fallbacks=0 all locales.
  • Autoreview: clean.
  • CHANGELOG intentionally not edited (release generation owns it).

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android app: web-ui App: web-ui gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Jul 16, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3827ed1157

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +367 to +371
history = listTerminalOperatorApprovals({
cursor: historyParams.cursor,
limit: historyParams.limit,
kind: historyParams.kind,
databaseOptions: params.databaseOptions,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Filter approval history through approval access checks

When this method is called by a client that has operator.approvals but no matching reviewer device (or no device at all), it still calls listTerminalOperatorApprovals without client and returns every terminal row. Existing approval.get/approval.resolve route each durable record through canReviewOperatorApproval/canAccessOperatorApproval, and reviewerDeviceIds is the opt-in restriction, so a device can fetch command/plugin presentation, source session, and resolver data for approvals bound to other devices; pass the client into this handler and filter records before building snapshots.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0139d0fa00

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +876 to +878
.where("status", "!=", "pending")
.where("resolved_at_ms", "is not", null)
.orderBy("resolved_at_ms", "desc")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Enforce the 30-day cutoff in history reads

When the gateway stays up beyond the retention window and no new approval is inserted or restart occurs, this new history query still pages over every terminal row. The cutoff/prune paths I found run at gateway startup (src/gateway/server-aux-handlers.ts:123-128) and during insert/prune helpers, so a pure approval.history read can return approvals older than the UI's “rolling 30-day window” and the store's retention contract. Add a resolved_at_ms cutoff, or prune before listing, using OPERATOR_APPROVAL_TERMINAL_RETENTION_MS.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c533037c49

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/i18n/locales/en.ts
@@ -1673,6 +1674,7 @@ export const en: TranslationMap = {
subtitles: {
agents: "Workspaces, tools, identities.",
activity: "Browser-local tool activity summaries.",
approvals: "Recent exec, plugin, and system-agent approvals.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align the approvals subtitle with the added test

In this commit, subtitleForRoute("approvals") reads this English catalog value, but the added ui/src/app-navigation.test.ts expectation for the same route is Recent terminal operator approvals.. The focused navigation test will fail until the catalog string and assertion use the same copy.

Useful? React with 👍 / 👎.

@blacksmith-sh

This comment has been minimized.

@steipete
steipete force-pushed the feat/control-ui-approval-attention-and-history branch from 9dbe804 to 999176e Compare July 16, 2026 09:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9dbe8048f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +916 to +919
nextCursor: encodeOperatorApprovalHistoryCursor({
resolvedAtMs: last.resolvedAtMs,
id: last.id,
}),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep history cursors bounded

When a terminal approval with a long canonical id lands at the page boundary and there are more rows, this cursor embeds the full last.id. Approval ids are accepted without a max length (and this suite explicitly supports overlong ids via transport refs), while ApprovalHistoryResult.nextCursor and ApprovalHistoryParams.cursor are capped at 512 chars, so the history response can fail client validation or the next approval.history request can be rejected before decoding. Use a bounded cursor key (for example the fixed resolution ref or a server-side/tokenized cursor) instead of the unbounded approval id.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 999176edad

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/** Newest-first page from the retained terminal approval ledger. */
export const ApprovalHistoryResultSchema = closedObject({
items: Type.Array(TerminalApprovalSnapshotSchema),
nextCursor: Type.Optional(Type.String({ minLength: 1, maxLength: 512 })),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid rejecting generated history cursors

When an exec approval uses a long explicit id, which ExecApprovalRequestParamsSchema permits via unbounded NonEmptyString and ApprovalIdSchema also leaves unbounded, the history cursor encodes the full id into base64 JSON. That can easily exceed 512 characters, so the first page can return a nextCursor that fails validateApprovalHistoryResult in the new UI and also fails validateApprovalHistoryParams on the next request; use a cursor format/limit that cannot exceed the schema or remove this cap.

Useful? React with 👍 / 👎.

@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: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jul 16, 2026
@clawsweeper

clawsweeper Bot commented Jul 16, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 16, 2026, 7:30 AM ET / 11:30 UTC.

Summary
Adds a pending-approval sidebar attention chip, a paginated Control UI approval-history page, and an additive approval.history gateway RPC over the durable operator approval ledger.

Reproducibility: yes. for the patch defects: source inspection shows that a scoped but non-audience client reaches the unfiltered history query, and an unbounded approval id can generate a cursor rejected by the new 512-character protocol schema.

Review metrics: 1 noteworthy metric.

  • Gateway protocol surface: 1 RPC added; 2 optional snapshot attribution fields added. The new read API exposes durable approval audit data to every generated client, so authorization and compatibility contracts need explicit review before merge.

Stored data model
Persistent data-model change detected: migration/backfill/repair: src/gateway/server-methods-list.test.ts, serialized state: src/gateway/operator-approval-store.ts, unknown-data-model-change: packages/gateway-protocol/src/schema/approvals.ts, unknown-truncated-pull-files. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🧂 unranked krab
Proof: 🦪 silver shellfish
Patch quality: 🦪 silver shellfish
Result: blocked until 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] Apply per-approval reviewer authorization to history reads and add a non-audience client regression test.
  • [P1] Replace the unbounded-id cursor or prove a protocol-compatible bound with a long-id pagination test.
  • Attach a redacted browser recording or screenshots plus live output showing the chip opening the overlay and the history page loading and paginating.

Proof guidance:

  • [P1] Needs real behavior proof before merge: The PR reports tests and a real-gateway E2E but includes no inspectable after-fix screenshot, recording, terminal transcript, linked artifact, or redacted logs showing the attention chip and history page; add redacted browser evidence, update the PR body to trigger review, or ask a maintainer for @clawsweeper re-review.

Risk before merge

  • [P1] Merging the current handler could expose approval request details, source sessions, and resolver attribution to an operator device that is not in the approval's configured reviewer audience.
  • [P1] A long explicit approval id can produce a server-generated cursor exceeding the protocol's 512-character limit, causing validation failure and preventing users from loading later history pages.
  • [P1] The contributor has not supplied inspectable after-fix UI evidence, so the sidebar-to-overlay interaction and real history-page behavior remain unproven for merge purposes.

Maintainer options:

  1. Preserve approval access boundaries before merge (recommended)
    Filter history through the established per-record reviewer authorization without breaking pagination, replace or re-bound the cursor, add focused regression tests, and supply inspectable UI proof.
  2. Split the low-risk attention chip
    If the secure history API needs more design work, separate the pending-approval chip from the history RPC and page so the independent UI improvement can be reviewed narrowly.

Next step before merge

  • [P1] This maintainer-labeled PR needs the contributor to repair the security and cursor defects and provide setup-specific real behavior proof before another human review; it should not enter an automated fix lane.

Security
Needs attention: The new history RPC bypasses the existing per-approval reviewer audience restriction and can disclose sensitive approval audit details across operator devices.

Review findings

  • [P1] Enforce reviewer access when listing approval history — src/gateway/server-methods/approval.ts:352
  • [P2] Keep generated history cursors within protocol bounds — src/gateway/operator-approval-store.ts:235
Review details

Best possible solution:

Keep the ledger-backed design, enforce the same reviewer-audience authorization during history pagination, use a cursor whose maximum size matches the protocol contract, add regression coverage for unauthorized devices and long ids, and then provide redacted browser proof of both Control UI flows.

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

Yes for the patch defects: source inspection shows that a scoped but non-audience client reaches the unfiltered history query, and an unbounded approval id can generate a cursor rejected by the new 512-character protocol schema.

Is this the best way to solve the issue?

No, not as currently implemented; the durable-ledger and Control UI direction is appropriate, but history must reuse the existing approval access boundary and a protocol-safe pagination key before it is the narrowest maintainable solution.

Full review comments:

  • [P1] Enforce reviewer access when listing approval history — src/gateway/server-methods/approval.ts:352
    Pass the requesting client through the same canReviewOperatorApproval/canAccessOperatorApproval boundary used by lookup and resolution, and preserve correct pagination across filtered rows. As written, any client with operator.approvals can read command or plugin presentation, source-session, and resolver data for approvals restricted to other reviewer devices.
    Confidence: 0.99
  • [P2] Keep generated history cursors within protocol bounds — src/gateway/operator-approval-store.ts:235
    Do not encode the full unbounded approval id into a cursor capped at 512 characters by the request and response schemas. A sufficiently long id produces a cursor that fails result validation and cannot be submitted for the next page; use a fixed-size pagination key or align the schema and implementation with a proven bound.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P1: The proposed history RPC currently crosses an established reviewer-device security boundary and should not merge until corrected.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • remove P2: Current review triage priority is P1, so this older priority label is no longer current.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🧂 unranked krab, so this older rating label is no longer current.
  • remove merge-risk: 🚨 compatibility: Current PR review merge-risk labels are merge-risk: 🚨 security-boundary.

Label justifications:

  • P1: The proposed history RPC currently crosses an established reviewer-device security boundary and should not merge until corrected.
  • merge-risk: 🚨 security-boundary: The new RPC can disclose approval presentation and attribution data to scoped clients that are not authorized reviewers for those records.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🦪 silver shellfish.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR reports tests and a real-gateway E2E but includes no inspectable after-fix screenshot, recording, terminal transcript, linked artifact, or redacted logs showing the attention chip and history page; add redacted browser evidence, update the PR body to trigger review, or ask a maintainer for @clawsweeper re-review.
Evidence reviewed

Security concerns:

  • [high] Approval history bypasses reviewer-device authorization — src/gateway/server-methods/approval.ts:352
    An operator.approvals client can list all terminal ledger rows without the per-record reviewer access check used by approval.get and approval.resolve, exposing command or plugin presentation, agent/session attribution, and resolver identity outside the configured audience.
    Confidence: 0.99

What I checked:

  • Reviewer audience bypass: The new history handler lists terminal approvals without passing the requesting client through the existing per-approval reviewer-device access checks, allowing an operator.approvals client to receive presentation, source, and resolver data for approvals outside its audience. (src/gateway/server-methods/approval.ts:352, 32fe63b42be2)
  • Unresolved prior review finding: The current commit sequence contains fixes for UI state, copy, translations, gateway switching, and retention, but no commit addressing the earlier reviewer-access finding against the history handler. (src/gateway/server-methods/approval.ts:352, 32fe63b42be2)
  • Cursor contract mismatch: History cursors encode the full approval id, while both history parameter and result schemas cap cursor strings at 512 characters; approval ids are not equivalently bounded, so a server-generated cursor can fail its own protocol validation. (src/gateway/operator-approval-store.ts:235, 32fe63b42be2)
  • Protocol cursor limit: The additive history protocol limits incoming and outgoing cursor strings to 512 characters, creating the failure when the encoded key contains a long canonical approval id. (packages/gateway-protocol/src/schema/approvals.ts:227, 32fe63b42be2)
  • Retention finding addressed: The latest head commit adds the promised 30-day cutoff to history reads, so the earlier retention-window finding appears resolved and is not re-raised. (src/gateway/operator-approval-store.ts:28, 32fe63b42be2)
  • Real behavior proof absent: The PR body reports focused tests and a real-gateway E2E, but provides no inspectable screenshot, recording, terminal output, linked artifact, or redacted runtime log showing the after-fix attention chip and history page. (32fe63b42be2)

Likely related people:

  • steipete: Their merged approval-delivery work in commit bdcf6bd and related approval-ledger work connect them directly to the current gateway and Control UI approval behavior beyond merely authoring this PR. (role: recent approval-system contributor; confidence: high; commits: bdcf6bdfdd84; files: src/gateway/server-methods/approval.ts, src/gateway/operator-approval-store.ts, ui/src/pages/approvals/approvals-page.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 (2 earlier review cycles)
  • reviewed 2026-07-16T10:09:09.922Z sha 32fe63b :: needs real behavior proof before merge. :: [P1] Filter history through per-approval reviewer access | [P2] Generate cursors that satisfy the protocol limit
  • reviewed 2026-07-16T10:50:09.579Z sha 32fe63b :: needs real behavior proof before merge. :: [P1] Filter history through reviewer-device authorization | [P2] Guarantee generated cursors fit the protocol schema

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. P1 High-priority user-facing bug, regression, or broken workflow. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Jul 16, 2026
@steipete
steipete force-pushed the feat/control-ui-approval-attention-and-history branch from 4ff2aa4 to 3a1cd10 Compare July 16, 2026 15:25

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a1cd100d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui/src/i18n/.i18n/de.meta.json Outdated
"sourceHash": "82b347646c147b6f3560a52a12e7b46718a567547b9dd2abf3be2ccfbbb0f30a",
"totalKeys": 3421,
"translatedKeys": 3421,
"sourceHash": "ef74edf6abf47adb1164b14c6f2c0e2cd82250c0ef791595688701a18d439246",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Regenerate locale metadata from the new English catalog

This metadata no longer describes the English catalog in this commit: ui/src/i18n/locales/en.ts hashes to efe57ef00d76606f039ca309755b1c05e5861e4ae990fd29e8d573e8ff99ba50 and flattens to 3459 keys, but the locale meta files still record an older source hash and 3399 keys. scripts/control-ui-i18n.ts/createControlUiLocaleSyncPlan compare the generated expected metadata with these files during pnpm ui:i18n:check, so the i18n check will mark every locale dirty until the metadata is regenerated from the updated source catalog.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6846996241

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +87 to +90
source: {
...(record.source.agentId ? { agentId: record.source.agentId } : {}),
...(record.source.sessionKey ? { sessionKey: record.source.sessionKey } : {}),
},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Update Android terminal approval keys

When an Android client uses the canonical approval.resolve or later reloads a terminal approval with approval.get, this new source field makes every terminal snapshot fail Android's exact-key parser: apps/android/app/src/main/java/ai/openclaw/app/GatewayExecApprovals.kt still accepts only resolvedAtMs, reason, and optional decision for terminal statuses. The resolve path then treats the already-applied response as an unknown/malformed outcome and reconciliation reads fail the same way, so Android approval actions can appear stuck or failed until its allowed key set/parser is updated for the new attribution fields.

Useful? React with 👍 / 👎.

@steipete
steipete marked this pull request as draft July 16, 2026 16:36
@steipete
steipete marked this pull request as ready for review July 16, 2026 16:36
@steipete
steipete force-pushed the feat/control-ui-approval-attention-and-history branch from 28c441e to 7bffac1 Compare July 16, 2026 16:43
Adds the sidebar approval attention chip and a dedicated approval history
page backed by the new approval.history gateway RPC (30-day retention
window). Extracts buildSidebarAttentionItems into its own module so the Lit
component consumes it as a real cross-module dependency, and wires the strict
i18n catalog for the new strings (fallbacks=0).
@steipete
steipete force-pushed the feat/control-ui-approval-attention-and-history branch from 7bffac1 to 48db449 Compare July 16, 2026 17:28
@steipete
steipete merged commit cb84dc7 into main Jul 16, 2026
119 checks passed
@steipete
steipete deleted the feat/control-ui-approval-attention-and-history branch July 16, 2026 17:32
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48db449f89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let query = stateDb
.selectFrom("operator_approvals")
.selectAll()
.where("status", "!=", "pending")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Terminalize due approvals before history scan

When an approval has passed expiresAtMs but no pending replay or point lookup has run yet—for example a direct approval.history client opens history first, or the Control UI history load races its async pending-approval replay—this scan filters the row out while it is still stored as pending. The other approval read paths reconcile due rows with expireDueOperatorApprovals before reading, so history can temporarily show an empty or incomplete terminal ledger until some unrelated pending read happens; run the same expiry reconciliation before building this query.

Useful? React with 👍 / 👎.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 17, 2026
…enclaw#108776)

Adds the sidebar approval attention chip and a dedicated approval history
page backed by the new approval.history gateway RPC (30-day retention
window). Extracts buildSidebarAttentionItems into its own module so the Lit
component consumes it as a real cross-module dependency, and wires the strict
i18n catalog for the new strings (fallbacks=0).
zooqueen pushed a commit to zooqueen/openclaw that referenced this pull request Sep 11, 2026
…enclaw#108776)

Adds the sidebar approval attention chip and a dedicated approval history
page backed by the new approval.history gateway RPC (30-day retention
window). Extracts buildSidebarAttentionItems into its own module so the Lit
component consumes it as a real cross-module dependency, and wires the strict
i18n catalog for the new strings (fallbacks=0).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: android App: android app: web-ui App: web-ui gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XL 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