Skip to content

fix(control-ui): show Sessions live status#80169

Merged
BunsDev merged 1 commit into
mainfrom
meow/sessions-live-status
May 10, 2026
Merged

fix(control-ui): show Sessions live status#80169
BunsDev merged 1 commit into
mainfrom
meow/sessions-live-status

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented May 10, 2026

Summary

  • Problem: the Sessions table had status / hasActiveRun row data available, but operators could not see which recent session was live, and the Active filter sounded like liveness even though it was an updated-within lookback.
  • Why it matters: stalled-looking and abandoned sessions were hard to distinguish during normal operator workflows.
  • What changed: added a compact one-line Status column, rendered live/idle/terminal badges from existing row fields, included status in details/search coverage, renamed the filter to Updated within, regenerated Control UI locale fallbacks, and tightened Sessions table responsive behavior so row cells truncate instead of wrapping.
  • What did NOT change (scope boundary): no new Gateway activity API, no heartbeat/stall semantics, no Live only toggle, and no new server-side session behavior.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor required for the fix
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

Real behavior proof (required for external PRs)

  • Behavior or issue addressed: Sessions rows now show visible live/idle status badges and the updated-within filter wording, while long runtime/key text stays on one row with ellipsis.
  • Real environment tested: macOS local OpenClaw checkout, Vite Control UI dev server at http://127.0.0.1:5173/, Codex in-app browser.
  • Exact steps or command run after this patch: served a temporary Sessions fixture through Vite, opened http://127.0.0.1:5173/__codex-sessions-single-row-fixture.html in the in-app browser, checked page identity/not-blank/console health, verified live and idle badges plus long runtime text, and clicked the live-session checkbox.
  • Evidence after fix (screenshot, recording, terminal capture, console output, redacted runtime log, linked artifact, or copied live output): in-app browser screenshot showed live and idle rows with single-line key/runtime/status cells; browser check returned notBlank: true, hasFrameworkOverlay: false, consoleIssues: [], liveBadgeCount: 1, idleBadgeCount: 1, runtimeCount: 1, checkedCount: 1.
  • Observed result after fix: live/idle state is visible in the normal table, long runtime labels truncate instead of wrapping, and the table remains horizontally scrollable on small screens.
  • What was not tested: live provider-backed Gateway data with an actual active run; this PR uses existing row fields and covers rendering with unit/browser fixtures.
  • Before evidence (optional but encouraged): issue Dashboard Sessions view: no live/active indicator, 'Active N' label is misleading #78307 and ClawSweeper review show the prior table headers omitted a status/live column and Active was lookback copy.

Root Cause (if applicable)

  • Root cause: the UI consumed session rows that already carried coarse run state, but the normal Sessions table projected only key/label/kind/runtime/updated/tokens/settings columns.
  • Missing detection / guardrail: browser layout coverage did not assert a status column or single-row responsive behavior for long runtime labels.
  • Contributing context (if known): broader heartbeat/activity API issues exist, but this issue only needed existing row data projected in the Control UI.

Regression Test Plan (if applicable)

  • Coverage level that should have caught this:
    • Unit test
    • Seam / integration test
    • End-to-end test
    • Existing coverage already sufficient
  • Target test or file: ui/src/ui/views/sessions.test.ts, ui/src/ui/views/sessions.browser.test.ts, ui/src/styles/components.test.ts, ui/src/i18n/test/translate.test.ts.
  • Scenario the test should lock in: a running row renders a live badge, terminal/idle rows render distinct status badges, search can match status/liveness text, responsive Sessions rows keep key/kind/status/runtime cells one-line, and i18n copy stays synchronized.
  • Why this is the smallest reliable guardrail: it exercises the UI projection of existing row fields without adding a new Gateway contract or live provider dependency.
  • Existing test that already covers this (if any): no prior test covered status/live projection in the normal Sessions table.
  • If no new test is added, why not: N/A.

User-visible / Behavior Changes

  • Sessions table now includes a compact Status column.
  • Live sessions show a pulsing Live badge; idle/terminal states show compact non-live badges.
  • The old Active filter label now reads Updated within to describe the lookback semantics accurately.
  • Sessions rows stay single-line across responsive layouts, with long key/runtime/status text truncated instead of wrapped.

Diagram (if applicable)

Before:
[Sessions list] -> [recent rows only] -> [no visible live state, Active label implies liveness]

After:
[Sessions list] -> [recent rows + Status badge] -> [live/idle visible, Updated within label describes lookback]

Security Impact (required)

  • New permissions/capabilities? (Yes/No) No
  • Secrets/tokens handling changed? (Yes/No) No
  • New/changed network calls? (Yes/No) No
  • Command/tool execution surface changed? (Yes/No) No
  • Data access scope changed? (Yes/No) No
  • If any Yes, explain risk + mitigation: N/A.

Repro + Verification

Environment

  • OS: macOS Darwin arm64
  • Runtime/container: local Node/pnpm, Vite Control UI dev server
  • Model/provider: N/A
  • Integration/channel (if any): Control UI Sessions view
  • Relevant config (redacted): default local UI fixture; no secrets used

Steps

  1. Open Control UI Sessions.
  2. Load session rows where one row has hasActiveRun: true / status: running and another is idle.
  3. Inspect the Sessions table and responsive behavior at desktop and mobile widths.

Expected

  • The running row has a visible Live badge.
  • Idle/terminal rows have visible non-live status.
  • The filter label describes updated-within lookback semantics.
  • Long session key/runtime values do not wrap into multi-line rows.

Actual

  • Before this fix, the normal table omitted live/status state and the filter label read Active.
  • After this fix, status is visible and row cells remain single-line with ellipsis.

Evidence

  • Failing test/log before + passing after
  • Screenshot/recording
  • Trace/log snippets
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios: live and idle status badges in the Sessions table, updated-within copy, single-line runtime/key/status cells, checkbox interaction, no browser console errors, no Vite/framework overlay.
  • Edge cases checked: long runtime labels, responsive widths 375, 430, 768, and 1440, reduced column visibility at narrow widths, generated locale fallback sync.
  • What you did not verify: an actual provider-backed live run row from a running Gateway.

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No) Yes
  • Config/env changes? (Yes/No) No
  • Migration needed? (Yes/No) No
  • If yes, exact upgrade steps: N/A.

Risks and Mitigations

Duplicate / overlap triage

Verification commands

  • pnpm test ui/src/ui/views/sessions.test.ts ui/src/ui/views/sessions.browser.test.ts ui/src/ui/controllers/sessions.test.ts ui/src/styles/components.test.ts ui/src/i18n/test/translate.test.ts
  • pnpm test ui/src/ui/views/sessions.browser.test.ts ui/src/styles/components.test.ts
  • pnpm ui:i18n:check
  • pnpm exec oxfmt --check --threads=1 CHANGELOG.md ui/src/styles/components.css ui/src/styles/components.test.ts ui/src/styles/layout.mobile.css ui/src/ui/views/sessions.browser.test.ts ui/src/ui/views/sessions.test.ts ui/src/ui/views/sessions.ts ui/src/i18n/locales/en.ts
  • git diff --check
  • pnpm --dir ui build
  • Browser: in-app browser fixture at http://127.0.0.1:5173/__codex-sessions-single-row-fixture.html

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: L maintainer Maintainer-authored PR labels May 10, 2026
@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented May 10, 2026

@clawsweeper review

@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 10, 2026

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

Re-review progress:

@BunsDev BunsDev force-pushed the meow/sessions-live-status branch from 655673a to 5b92740 Compare May 10, 2026 08:03
@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 10, 2026

Codex review: needs maintainer review before merge.

Summary
The branch adds a Sessions Status column with live/idle/terminal badges, updates search and filter copy, tightens responsive table styling, regenerates Control UI locale fallbacks, adds tests, and records a changelog entry.

Reproducibility: yes. source-reproducible: current main has status and hasActiveRun on session rows, but the Sessions table omits a Status column and the English filter copy still says Active. I did not run the browser locally during this read-only sweep.

Real behavior proof
Not applicable: The external-contributor proof gate does not apply because this is a maintainer-labeled MEMBER PR; the body nevertheless includes after-fix browser fixture output and CI reports the Real behavior proof check as successful.

Next step before merge
No repair lane is needed because there are no blocking review findings, and the protected maintainer-labeled PR should proceed through normal maintainer merge handling.

Security
Cleared: The diff is limited to UI rendering, CSS, generated i18n outputs, tests, and changelog, with no new secrets, permissions, dependencies, network calls, workflows, or command execution surface.

Review details

Best possible solution:

Land this narrow UI projection if maintainers accept the label semantics, and keep the richer heartbeat/stall API work in the existing activity-tracking issues.

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

Yes, source-reproducible: current main has status and hasActiveRun on session rows, but the Sessions table omits a Status column and the English filter copy still says Active. I did not run the browser locally during this read-only sweep.

Is this the best way to solve the issue?

Yes: the PR is the narrow maintainable fix for the reported UI projection gap because it uses existing row fields and avoids adding a new Gateway activity API. The broader heartbeat/stall model should remain separate.

What I checked:

  • Related report matches the PR scope: The linked report asks for the Dashboard Sessions view to show whether a session is running versus dormant and to rename the misleading Active N lookback label.
  • Current main omits a Status column: On current main, the Sessions table renders key, label, kind, runtime, updated, tokens, compaction, thinking, fast, verbose, and reasoning columns, with no status/live column. (ui/src/ui/views/sessions.ts:634, 09132effa82a)
  • Current main has the row data needed by the PR: GatewaySessionRow already exposes SessionRunStatus plus status and hasActiveRun fields, so the PR uses existing row data rather than adding a new Gateway API. (ui/src/ui/types.ts:384, 09132effa82a)
  • Current main copy supports the reported confusion: The English locale labels the lookback field Active and says it is updated in the last N minutes, matching the linked report's misleading-label complaint. (ui/src/i18n/locales/en.ts:159, 09132effa82a)
  • PR implements the visible status projection: The PR head adds status formatting, resolves live/idle/terminal badge labels from status and hasActiveRun, and renders the new Status header and per-row badge. (ui/src/ui/views/sessions.ts:178, ea757bd9200a)
  • PR adds focused regression coverage: The PR adds unit coverage for Live, Idle, and Failed badges and browser layout coverage for visible status and nowrap behavior across responsive viewports. (ui/src/ui/views/sessions.test.ts:417, ea757bd9200a)

Likely related people:

  • BunsDev: The GitHub profile name maps to Val Alexander, who has current-main Control UI dashboard and style commits in the affected UI area; this makes the author a relevant routing candidate beyond merely proposing this PR. (role: recent Control UI contributor; confidence: medium; commits: e697ec273a85, 284961108a97, 3bbbe33a1b91; files: ui/src/ui/views/sessions.ts, ui/src/styles/components.css, ui/src/styles/layout.mobile.css)
  • Peter Steinberger: Current-main blame for the Sessions table block and responsive table styling points to commit 59fd3e6, and local history shows repeated recent touches to the same UI/i18n/style surface. (role: recent area contributor; confidence: high; commits: 59fd3e6481bf, eeef4864494f; files: ui/src/ui/views/sessions.ts, ui/src/styles/components.css, ui/src/styles/layout.mobile.css)

Remaining risk / open question:

  • Rows with a persisted running status after a missed terminal event may still look live; the PR explicitly leaves richer heartbeat/stall semantics to the related activity issues.
  • I did not independently run a live provider-backed Gateway session in this read-only review; the verdict relies on source inspection, PR proof, and CI.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 09132effa82a.

@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented May 10, 2026

@clawsweeper re-review

@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented May 10, 2026

@clawsweeper review

@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 10, 2026

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

Re-review progress:

@BunsDev BunsDev force-pushed the meow/sessions-live-status branch from 5b92740 to ea757bd Compare May 10, 2026 08:10
@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented May 10, 2026

@clawsweeper review

@clawsweeper
Copy link
Copy Markdown
Contributor

clawsweeper Bot commented May 10, 2026

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

Re-review progress:

@BunsDev BunsDev force-pushed the meow/sessions-live-status branch from ea757bd to 5f8994a Compare May 10, 2026 08:22
@BunsDev BunsDev merged commit 5069060 into main May 10, 2026
86 checks passed
@BunsDev BunsDev deleted the meow/sessions-live-status branch May 10, 2026 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard Sessions view: no live/active indicator, 'Active N' label is misleading

1 participant