Skip to content

Add tray live dashboard glance#829

Open
bkudiess wants to merge 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-tray-live-dashboard
Open

Add tray live dashboard glance#829
bkudiess wants to merge 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-tray-live-dashboard

Conversation

@bkudiess

@bkudiess bkudiess commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Problem: the tray flyout exposed actions and rich sub-flyouts, but the top-level surface did not provide a compact live status summary.
  • Why it matters: operators should be able to see gateway health, freshness, session activity, node/session counts, and usage at a glance before choosing a deeper action.
  • What changed: added a render-free TrayDashboardSummaryBuilder, a dashboard glance card in the tray menu, snapshot fields for heartbeat/preview data, a Diagnostics action, and unit coverage for summary behavior.
  • What did NOT change (scope boundary): No gateway protocol changes, no capability permission changes, no tray right-click behavior changes, no MCP server behavior changes, and no conversation message text in the tray glance.

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs / instructions
  • Tests / validation
  • Security hardening
  • Chore / infra

Scope (select all touched areas)

  • Tray / WinUI UX
  • Windows node capability
  • Local MCP / winnode
  • Gateway / connection / pairing
  • Setup / onboarding
  • Permissions / privacy / security
  • Tests / CI / docs

Linked Issue/PR

  • Closes #
  • Related #
  • Related to a bug or regression

Validation

  • ./build.ps1 — passed; built Shared, Cli, WinNodeCli, SetupEngine, WinUI.
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore — passed: 2513 passed, 31 skipped, 2544 total.
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore --filter "FullyQualifiedName~TrayDashboardSummaryBuilderTests" — passed: 42 passed, 0 skipped, 42 total.
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore — passed: 1257 passed, 0 skipped, 1257 total.

Real behavior proof

  • Environment tested: Windows ARM64, direct unpackaged WinUI app.
  • Exact steps or command run:
    • ./run-app-local.ps1 -NoBuild -AllowNonMain
    • Opened the OpenClaw tray flyout from the notification area.
    • Captured and cropped the connected-state tray dashboard.
  • Evidence after fix:
tray-live-dashboard-connected
  • Screenshot shows the new top-level dashboard glance: Connected · localhost:18789, freshness (Updated 17s ago), node/session summary (1/1 node · 1 session), main session/model without message preview text, existing Gateway/Windows Node/Sessions/Usage rows, and the new Diagnostics action.
  • Safe diagnostic log line from isolated proof run: {"event":"app.start","metadata":{"nodeMode":false,"useSshTunnel":false}}.
  • Focused dashboard summary tests validate the health, heartbeat, metrics, active-session selection, and token math behavior.
  • Observed result: the tray flyout displays a readable live dashboard summary above the existing detailed rows and action list.
  • Not verified / blocked: N/A

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

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

Review Conversations

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

No bot review conversations exist yet; this is a draft PR.

Add a compact status summary to the tray flyout that surfaces gateway health, refresh freshness, session and usage metrics, and the current session preview before the existing action rows.

Wire a Diagnostics action into the tray menu and keep the summary computation in a testable, render-free builder shared by existing usage/session rows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 26, 2026, 2:03 PM ET / 18:03 UTC.

Summary
The PR adds a tray dashboard glance with gateway health, freshness, node/session and usage summaries, active-session metadata, a Diagnostics tray action, and focused summary tests.

Reproducibility: not applicable. this is a feature PR rather than a current-main bug. The PR body and inspected screenshot show the after-change connected tray behavior.

Review metrics: 3 noteworthy metrics.

  • Changed files: 6 files; +1002, -17. The diff is bounded to tray UI, snapshot data, and tests, but changes a visible operator surface.
  • Focused tests added: 553 test lines added. The render-free summary behavior has dedicated coverage, leaving visual acceptance and required CI as the main gates.
  • Status checks: 1 setup-connect E2E job failing; main test job passing. Required validation is not green at the inspected head, even though the failed job is not obviously explained by the tray-only diff.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

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

Rank-up moves:

  • Decide whether top-level session title/model/context metadata belongs in the tray glance and accessibility name.

Mantis proof suggestion
A short visible tray pass would help maintainers review connected, disconnected, and active-session layout/privacy behavior. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis visual task: verify the tray dashboard glance renders connected, disconnected, and active-session states without overlap or message preview text.

Risk before merge

  • [P1] The top-level tray flyout and accessibility name expose active session title, model/detail, and context percentage; message text is gone, but maintainers still need to accept that metadata privacy boundary.
  • [P1] The latest status rollup has the setup-connect E2E job failing; the tray-only diff does not reveal a narrow source-level repair from inspection alone.

Maintainer options:

  1. Trim top-level session metadata
    Keep the top-level glance aggregate-only by removing session title, model/detail, and context percentage from both the visible card and accessibility name, while leaving detailed metadata in the existing Sessions flyout.
  2. Accept the metadata boundary
    Maintainers can intentionally land the PR as-is after deciding that session title, model/detail, and context percentage are acceptable in the top-level tray and accessibility surfaces.
  3. Pause the dashboard direction
    Pause or close the PR if the tray menu should remain action-focused instead of becoming a live dashboard surface.

Next step before merge

  • [P2] Maintainer judgment is needed on the tray metadata/privacy boundary and the failed setup-connect E2E check; no narrow automated repair is safe until that direction is chosen.

Security
Needs attention: No new network, token, permission, dependency, or command-execution surface was found, but the top-level tray/accessibility metadata exposure needs maintainer privacy acceptance.

Review details

Best possible solution:

Land the tray glance only after maintainers accept or trim the metadata/privacy boundary and required validation is green, preserving the no-message-preview rule.

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

Not applicable: this is a feature PR rather than a current-main bug. The PR body and inspected screenshot show the after-change connected tray behavior.

Is this the best way to solve the issue?

Unclear until maintainer acceptance: the render-free builder and tests are a maintainable shape, but top-level session title/model/context exposure is a product/privacy decision. A safer alternative is an aggregate-only top-level glance with detailed session metadata left in the existing Sessions flyout.

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: This is a visible tray UX feature with limited blast radius but normal maintainer priority.
  • merge-risk: 🚨 security-boundary: The PR surfaces active session metadata in a top-level tray and accessibility surface, so sensitive metadata exposure needs maintainer acceptance.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body includes a real Windows tray screenshot showing the connected-state dashboard after message-preview removal, with no private message text visible.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes a real Windows tray screenshot showing the connected-state dashboard after message-preview removal, with no private message text visible.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes a real Windows tray screenshot showing the connected-state dashboard after message-preview removal, with no private message text visible.
Evidence reviewed

Security concerns:

  • [low] Accept top-level session metadata exposure — src/OpenClaw.Tray.WinUI/Services/TrayMenuStateBuilder.cs:446
    The glance renders the selected session title, model/detail, and context percentage in the tray flyout and accessibility name; this is a sensitive metadata boundary maintainers should explicitly approve or trim.
    Confidence: 0.82

What I checked:

  • Repository policy read: AGENTS.md was read fully; its tray UX and validation guidance applies to this review, though no build/test commands were run because this is a read-only review with no local changes. (AGENTS.md:1, 1c377cb64b65)
  • Current main lacks the new top-level glance: Current main adds the brand row and then proceeds directly to pairing/gateway rows and existing actions; there is no TrayDashboardSummary, BuildDashboardGlance, LastUpdated snapshot field, or top-level Diagnostics tray action. (src/OpenClaw.Tray.WinUI/Services/TrayMenuStateBuilder.cs:117, 1c377cb64b65)
  • PR wires the visible tray glance: The PR head builds TrayDashboardSummary from the tray snapshot and inserts the dashboard glance immediately below the brand row. (src/OpenClaw.Tray.WinUI/Services/TrayMenuStateBuilder.cs:120, c19bc93ff376)
  • Message preview removed but metadata remains: The latest summary model carries session label, title, detail, and context percent only; the glance renders session title/model/context and includes them in the automation name. (src/OpenClaw.Tray.WinUI/Services/TrayMenuStateBuilder.cs:446, c19bc93ff376)
  • Real behavior proof inspected: The linked screenshot is a 417x817 PNG showing the connected tray dashboard glance with endpoint, freshness, node/session summary, model text, Diagnostics action, and no message preview text. (c19bc93ff376)
  • GitHub status check state: At inspection, the main test job was successful but the setup-connect E2E job in the status rollup had failed, so required validation is not green on the latest head. (c19bc93ff376)

Likely related people:

  • ranjeshj: Authored the merged commit applying the bkudiess tray UX stack and Diagnostics page work adjacent to this PR's tray dashboard and Diagnostics action. (role: recent tray UX stack integrator; confidence: high; commits: 429be9ba9368; files: src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Pages/DebugPage.xaml.cs, src/OpenClaw.Tray.WinUI/Windows/HubWindow.xaml.cs)
  • bkudiess: Current main contains a merged tray UX stack explicitly applying bkudiess tray work, so they are relevant to this tray UX behavior beyond only authoring this PR. (role: recent adjacent tray contributor; confidence: medium; commits: 429be9ba9368; files: src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Pages/DebugPage.xaml.cs)
  • Régis Brid: Recently touched App.xaml.cs and diagnostics-adjacent notification routing near the tray action wiring this PR changes. (role: recent app/tray adjacent contributor; confidence: medium; commits: 1a07759a7e6e; files: src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Pages/DebugPage.xaml.cs)
  • AlexAlves87: Recently refactored App.xaml.cs tray icon coordination adjacent to the tray menu capture and action wiring surface. (role: recent tray app refactor contributor; confidence: low; commits: 1cc37fea3e01; files: src/OpenClaw.Tray.WinUI/App.xaml.cs, src/OpenClaw.Tray.WinUI/Services/TrayIconCoordinator.cs)
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 rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jun 26, 2026
@bkudiess bkudiess marked this pull request as ready for review June 26, 2026 15:51
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jun 26, 2026
@bkudiess

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Removed the top-level tray dashboard message preview text per the privacy finding. The glance now keeps health, endpoint, heartbeat, node/session summary, model/context metadata, usage, and Diagnostics only. Validation after the change: build passed; Shared.Tests 2513 passed / 31 skipped; focused dashboard tests 42 passed; Tray.Tests 1257 passed.

@clawsweeper

clawsweeper Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦞🧹
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 added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 26, 2026
Keep the tray dashboard focused on health, freshness, session metadata, and usage while avoiding conversation message text in the top-level flyout.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bkudiess bkudiess force-pushed the bkudiess-tray-live-dashboard branch from ac4edd4 to c19bc93 Compare June 26, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant