[RELEASE] Approvals empty states respect the runtime filter (no more OpenClaw copy under a Claude Code filter) - #5007
Conversation
…f text Under a Claude Code filter the pending empty state was a 90-word paragraph explaining every runtime's gate — and named OpenClaw. Approvals are per-runtime (both renders already filter on session-id prefix), so the copy now is too: - 'No pending approvals for Claude Code.' + one line naming only THAT runtime's gate (PreToolUse hook / exec-policy preset / reactive catch). - History: 'No Claude Code decisions yet.' - 'all' filter keeps a generic one-liner. Verified live on a fake-HOME :8903 instance for claude_code / openclaw / codex / all. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
| // default — rows carry the requesting session id, whose prefix names | ||
| // the runtime. BOTH renders (pending + history) filter identically. | ||
| var _rt = (typeof _cmRuntimeFilter === 'function') ? _cmRuntimeFilter() : 'all'; | ||
| var _rtLbl = (_rt && _rt !== 'all' && typeof _cmRuntimeLabel === 'function') ? _cmRuntimeLabel(_rt) : ''; |
There was a problem hiding this comment.
The code calls _cmRuntimeLabel() to render runtime-specific empty state messages, but this function is not defined in the codebase. The function is only mocked in test files and the blueprint does not specify how runtime labels should be provided to the UI layer.
Visual diffComparing 41 of 66 comparison(s) flagged (>1% pixel diff).
Folder: 2ec290a2c1ae. Full PNGs also attached as a workflow artefact. Generated by visual-diff bot. Pixel diffs >1% flagged; eyeball the table before merging. This check is non-blocking — fail = bot bug, not a code problem. |
|
Drift-bot triage (1 finding):
|
|
| // default — rows carry the requesting session id, whose prefix names | ||
| // the runtime. BOTH renders (pending + history) filter identically. | ||
| var _rt = (typeof _cmRuntimeFilter === 'function') ? _cmRuntimeFilter() : 'all'; | ||
| var _rtLbl = (_rt && _rt !== 'all' && typeof _cmRuntimeLabel === 'function') ? _cmRuntimeLabel(_rt) : ''; |
There was a problem hiding this comment.
The blueprint specifies runtime labels should come from "the dashboard's shared runtime label catalog — the same id-to-label mapping that every other tab uses," but the code introduces _cmRuntimeLabel() function that does not exist in the codebase and differs from the pattern used in alerts.js (_CM_RT_LABEL object). While the guard prevents runtime errors, it creates inconsistency with the documented shared catalog approach.
|
Drift-bot round 2 triage: the remaining claim — "
|
What the operator saw
Approvals tab filtered to Claude Code, yet the "No pending approvals" empty state was a ~90-word paragraph explaining every runtime's gating mechanics — and explicitly naming OpenClaw. The history empty state was equally generic. (Founder screenshot, 2026-08-19, v0.12.737.)
Fix
The pending + history lists already filter rows per-runtime; the empty-state copy now does too:
History: "No Claude Code decisions yet." (generic sentence retained for "all").
Verification
Booted the branch on a fake-HOME
:8903instance and rendered all four variants live (screenshot attached in session). Inline<script>passesnode --check.Notes
data-i18nkeys (copy is now interpolated with the runtime label, which static keys can't express).test_i18n_no_raw_codeshas 2 pre-existing failures on main (45 missing keys, none touched here).🤖 Generated with Claude Code