Skip to content

Fix dashboard history projection and approval followups - #92312

Closed
Hidetsugu55 wants to merge 10 commits into
openclaw:mainfrom
Hidetsugu55:hide/fix/exec-approval-symlink-cwd
Closed

Hidetsugu55 wants to merge 10 commits into
openclaw:mainfrom
Hidetsugu55:hide/fix/exec-approval-symlink-cwd

Conversation

@Hidetsugu55

Copy link
Copy Markdown
Contributor

Fixes dashboard history projection so toolCall-only assistant messages do not hide recent user context, and suppresses prompt persistence for exec approval follow-up resumes.

Tests:

  • pnpm exec vitest run --config test/vitest/vitest.gateway.config.ts src/gateway/server-methods/server-methods.test.ts src/gateway/session-history-state.test.ts
  • pnpm exec vitest run --config test/vitest/vitest.agents.config.ts src/agents/bash-tools.exec-approval-followup.test.ts
  • pnpm exec oxfmt --check --threads=1 src/gateway/chat-display-projection.ts src/gateway/server-methods/chat.ts src/gateway/server-methods/server-methods.test.ts src/agents/bash-tools.exec-approval-followup.ts src/agents/bash-tools.exec-approval-followup.test.ts

The sandbox default allowlist omitted "message", which prevented agents
in workspace-write mode from sending visible replies without an explicit
alsoAllow override in openclaw.json. This was the root cause of the
Discord channel message tool injection failure (Cycle 2 diagnosis).

With this change, the runtime openclaw.json workaround
(tools.sandbox.tools.alsoAllow: ["message"]) can be safely withdrawn.
…resolve

Four independent bug classes fixed in one sweep:

A. History resolution: sessions_history(current) returned empty when
   transcripts lived in *.jsonl.reset.* siblings. Added fallback through
   reset/deleted files and usageFamilySessionIds backfill.

B. Discord visible reply: messageProvider/channel misalignment caused
   message tool to drop from sandbox allowlist. Strengthened
   shouldForceMessageTool() and prioritized delivery channel over
   webchat/internal provider label.

C. Build/dist integrity: pre-build cleanup could delete hashed chunks
   that stable aliases still referenced, causing ERR_MODULE_NOT_FOUND
   at runtime. Stopped aggressive root chunk pruning.

D. Current session resolve: sessions.resolve("current") failed when
   gateway had no connection-to-session reverse lookup. Added
   subscription registry for connId -> subscribed session keys.

Implementation by OpenClaw self-check sweep; committed by Claude Code.
- Export isDirectSessionKey from session-delivery.ts (was private)
- Update import path in tools-effective-inventory.ts
- Add missing path import in session-utils.fs.ts
- Add missing logger in task-registry.store.sqlite.ts
- Remove 120-minute activeMinutes filter from chat session dropdown so
  all sessions appear after gateway restart (CHAT_SESSIONS_ACTIVE_MINUTES → 0)
- Skip numeric-only space IDs (Discord snowflakes) in buildGroupDisplayName
  so display names use channel names instead of raw IDs
- Persist label from displayName in deriveGroupSessionPatch when the
  session entry has no label yet
…cks register

The chat session picker search input auto-focuses when the popover opens.
Clicking an option fires the search input's blur before the click event;
applyChatSessionPickerSearch then cleared the picker result for empty
queries, nullifying chatSessionPickerResult and triggering a Lit re-render
mid-gesture. The option button shifted between pointerdown and pointerup,
so the browser never emitted a click and the session never switched
(sidebar recents were unaffected since they call switchChatSession directly).

Skip clearChatSessionPickerSearch when there is no applied query to revert.
Verified live: blur no longer nullifies the 23-session result, the click
reaches the option button, and the session switches.
@Hidetsugu55
Hidetsugu55 requested a review from a team as a code owner June 12, 2026 02:09
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime scripts Repository scripts agents Agent runtime and tooling extensions: codex size: XL triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels Jun 12, 2026
@clawsweeper

clawsweeper Bot commented Jun 12, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed June 11, 2026, 10:32 PM ET / 02:32 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

PR surface: Source +604, Tests -5294, Other -34. Total -4724 across 48 files.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: serialized state: src/agents/command/attempt-execution.cli.test.ts, serialized state: src/auto-reply/reply/session-delivery.test.ts, serialized state: src/auto-reply/reply/session-delivery.ts, serialized state: src/gateway/server-methods/sessions.ts, serialized state: src/gateway/server.chat.gateway-server-chat.test.ts, serialized state: src/gateway/session-utils.fs.test.ts, and 6 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Result: rating does not apply to this item.

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

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

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

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

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

Label changes

Label justifications:

  • rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
Evidence reviewed

PR surface:

Source +604, Tests -5294, Other -34. Total -4724 across 48 files.

View PR surface stats
Area Files Added Removed Net
Source 26 670 66 +604
Tests 21 3126 8420 -5294
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 6 40 -34
Total 48 3802 8526 -4724

What I checked:

  • failure reason: retryable codex transport failure.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stderr: d>".

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
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.

@clawsweeper clawsweeper Bot added the rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. label Jun 12, 2026
@Hidetsugu55

Copy link
Copy Markdown
Contributor Author

Closing in favor of the clean minimal replacement PR: #92328.

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

Labels

agents Agent runtime and tooling app: web-ui App: web-ui extensions: codex gateway Gateway runtime rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. scripts Repository scripts size: XL triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant