Skip to content

Simplify session status presentation - #1057

Merged
RomneyDa merged 10 commits into
mainfrom
session-status-presentation
Aug 6, 2026
Merged

RomneyDa merged 10 commits into
mainfrom
session-status-presentation

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Jul 26, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a shared SessionRunState adapter that combines Gateway run outcome with hasActiveRun, with current Gateway liveness taking precedence when present.
  • Present only three primary statuses: Working, Ready, and Needs attention. A stopped run is secondary context, not a fourth badge.
  • Hide only successful completed sessions by default; keep failed, timed-out, stopped, and reusable sessions visible and available in the chat picker.
  • Use the same rule in Sessions, Connection, tray dashboard, tray menu, and session tests.
  • Rebase onto current main, retain sparse Gateway run fields, and update the accessibility fixture for the flattened classification contract.

Validation

Native Windows validation on a clean Parallels Windows 11 ARM64 VM (.NET SDK 10.0.302; Windows SDK 10.0.26100; WebView2 150.0.4078.65), at 782a112:

  • Passed: ./build.ps1 - Shared, CLI, WinNode CLI, SetupEngine, and WinUI.
  • Passed: dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore - 3,400 passed, 32 expected integration skips.
  • Passed: dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore - 2,054 passed, 0 skipped.
  • Passed: git diff --check origin/main...HEAD and XML parsing for all five localized resource files.
  • Passed: ./.agents/skills/autoreview/scripts/autoreview --mode branch --base origin/main - no accepted/actionable findings.

Real behavior proof

Current-head tests exercise Gateway hasActiveRun parsing, terminal-outcome precedence, sparse-update retention, the three-state mapping, session-list visibility/sorting, dashboard/menu counters, and chat-thread liveness. In particular, a terminal historical outcome does not override an explicit active current run, while completed runs otherwise leave chat sessions ready and selectable rather than assigning the legacy Ended status.

Not verified / blocked: an interactive WinUI screenshot of the changed session list was not captured through the Parallels automation surface. The native WinUI assembly and focused tests passed; visible UI capture remains the only missing proof item.

User-facing model

Display state Meaning
Working A run is currently active
Ready The session can receive the next turn
Needs attention The last run failed or timed out

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Jul 26, 2026
@clawsweeper

clawsweeper Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 9:03 PM ET / August 6, 2026, 01:03 UTC.

ClawSweeper review

What this changes

The PR introduces a shared interpretation of Gateway run liveness and outcomes, then uses Working, Ready, and Needs attention consistently in session, chat, tray, connection, and localized UI surfaces.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open. Current main still marks chat activity from nonempty activity text; the PR head routes it through the shared liveness rule and resolves the prior chat-activity finding. The final head still needs required validation evidence because the reported native run predates its last commit.

Priority: P2
Reviewed head: a627d88eb0855ff04d5d44348cdf3d1776f989ba

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and resolves the prior source-level finding, with a final-head validation refresh still needed before merge.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR is not subject to the external-contributor proof gate; its body nevertheless documents that current-head native WinUI capture remains blocked and should be refreshed with validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR is not subject to the external-contributor proof gate; its body nevertheless documents that current-head native WinUI capture remains blocked and should be refreshed with validation.
Evidence reviewed 4 items Current-main behavior remains incomplete: Current main derives a chat thread's activity from CurrentActivity rather than the session's run state, so stale text can still present a non-working session as Working.
Prior finding addressed on PR head: The supplied head diff changes chat activity to SessionVisibilityFilter.ToChatThreadActivity, which derives it from the shared liveness decision rather than CurrentActivity.
Current-main ownership trail: Recent main history shows a substantial chat-provider refactor after the PR base, making Barbara Kudiess a relevant adjacent owner for the merge refresh.
Findings None None.
Security None None.

How this fits together

The Gateway provides session snapshots to the Windows tray app. Shared session-state logic turns current-run liveness and prior outcomes into presentation data for the session list, chat picker, dashboard, tray menu, and connection page.

flowchart LR
  A[Gateway session snapshots] --> B[Shared run-state rule]
  B --> C[Display state and visibility]
  C --> D[Sessions page]
  C --> E[Chat picker]
  C --> F[Tray dashboard and menu]
  C --> G[Connection status]
Loading

Before merge

  • Resolve merge risk (P1) - The reported build and test run is at 782a112, before final commit a627d88 changed chat activity, so required validation has not been shown for the current head.
  • Resolve merge risk (P1) - The PR changes the liveness contract used to select and label sessions across chat and tray surfaces; current-main merge refresh and regression coverage must preserve the same decision everywhere.
  • Complete next step (P2) - No discrete code repair remains after the latest commit; the remaining action is normal maintainer merge review plus current-head validation refresh.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Change surface 24 files, +466/-130 The shared rule affects Gateway parsing, WinUI chat, session presentation, tray summaries, connection status, resources, and regression tests.

Merge-risk options

Maintainer options:

  1. Refresh validation on the final head (recommended)
    Rebase or merge-refresh against current main, then rerun the required build and shared/tray tests so the final chat-liveness change is covered before merge.
  2. Pause for a smaller refresh
    Pause this branch if its session-presentation changes cannot be validated cleanly with the current chat-provider refactor.

Technical review

Best possible solution:

Land one shared liveness rule after rerunning the required Windows build and test subset on the final rebased head, with native UI evidence or a documented current blocker for the session list.

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

Not applicable: this PR changes the session-presentation contract rather than reporting a standalone failing behavior. The prior defect is source-verifiable in current main and the proposed regression case covers its liveness rule.

Is this the best way to solve the issue?

Yes, with the final validation refresh: deriving both chat status and activity from the same shared liveness decision is the narrowest way to prevent stale activity text from contradicting run state.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR is not subject to the external-contributor proof gate; its body nevertheless documents that current-head native WinUI capture remains blocked and should be refreshed with validation.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P2: This is a bounded session-presentation change with multiple user-visible Windows tray surfaces.
  • merge-risk: 🚨 session-state: Merging changes how gateway liveness and terminal outcomes determine working, ready, and attention-needed session state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR is not subject to the external-contributor proof gate; its body nevertheless documents that current-head native WinUI capture remains blocked and should be refreshed with validation.

Evidence

What I checked:

Likely related people:

  • RomneyDa: Main history credits Dallin Romney for recent session classification and session-name work, and the PR head completes the related liveness alignment. (role: session feature contributor; confidence: high; commits: 23414509b9d0, 959b3527ac7b, a627d88eb085; files: src/OpenClaw.Tray.WinUI/Services/SessionVisibilityFilter.cs, src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs)
  • Barbara Kudiess: Barbara Kudiess authored the current-main chat-provider refactor that the PR's chat activity change must merge with. (role: recent adjacent contributor; confidence: high; commits: ad472243bcb8; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Rerun the required build and shared/tray test subset on a627d88 or its current-main merge result.
  • Attach a redacted native WinUI session-list capture if the documented capture blocker is cleared.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (30 earlier review cycles; latest 8 shown)
  • reviewed 2026-08-04T22:05:19.660Z sha dfc152c :: found issues before merge. :: [P2] Honor explicit current-run liveness first | [P2] Preserve run fields on sparse Gateway updates
  • reviewed 2026-08-05T08:13:47.123Z sha dfc152c :: found issues before merge. :: [P2] Honor explicit current-run liveness first | [P2] Retain liveness on sparse Gateway updates | [P2] Preserve status on sparse Gateway updates
  • reviewed 2026-08-05T23:25:08.397Z sha 3febfa7 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-05T23:37:06.102Z sha dfc152c :: found issues before merge. :: [P2] Preserve omitted session state across Gateway updates
  • reviewed 2026-08-06T00:17:53.166Z sha 882ab36 :: found issues before merge. :: [P1] Close each resource entry before adding session strings
  • reviewed 2026-08-06T00:31:03.825Z sha 1809081 :: needs changes before merge. :: [P1] Close the preceding resource entry before adding session strings
  • reviewed 2026-08-06T00:39:41.784Z sha 782a112 :: needs changes before merge. :: [P2] Derive chat activity from the canonical run state
  • reviewed 2026-08-06T00:55:26.618Z sha 782a112 :: found issues before merge. :: [P2] Align chat activity with canonical liveness

@RomneyDa
RomneyDa force-pushed the session-status-presentation branch from 6db917b to 0cf2a77 Compare July 29, 2026 04:43
@RomneyDa

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 29, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. 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. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Jul 30, 2026
@RomneyDa
RomneyDa force-pushed the session-status-presentation branch from dfc152c to 882ab36 Compare August 6, 2026 00:14
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 6, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 6, 2026
@RomneyDa
RomneyDa marked this pull request as ready for review August 6, 2026 00:51
@RomneyDa

RomneyDa commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 6, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. labels Aug 6, 2026
@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. 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. labels Aug 6, 2026
@RomneyDa

RomneyDa commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

The prior P2 is fixed at a627d88: the picker activity now derives from the canonical SessionRunState.IsWorking predicate, with provider-level regression coverage for stale activity. Fresh Windows proof passed (full builds; 3,400 Shared tests; 2,054 Tray tests; the previously flaky timeline test passed 1/1). The hosted exact-head retry is running.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 6, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa merged commit cdcb74f into main Aug 6, 2026
32 of 33 checks passed
@RomneyDa
RomneyDa deleted the session-status-presentation branch August 6, 2026 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 session-state 🚨 Merging this PR could lose, corrupt, stale, or mis-associate session or agent state. P2 Normal priority bug or improvement with limited blast radius. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant