Skip to content

Disambiguate duplicate session titles#955

Closed
TurboTheTurtle wants to merge 1 commit into
openclaw:mainfrom
TurboTheTurtle:fix/954-session-title-disambiguation
Closed

Disambiguate duplicate session titles#955
TurboTheTurtle wants to merge 1 commit into
openclaw:mainfrom
TurboTheTurtle:fix/954-session-title-disambiguation

Conversation

@TurboTheTurtle

@TurboTheTurtle TurboTheTurtle commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Closes #954.

What Problem This Solves

The Sessions page rendered raw gateway display names, so forked or otherwise colliding sessions could be indistinguishable.

Summary

  • Reuse one session-title formatter across native chat and the Sessions page.
  • Add deterministic suffixes when key-derived qualifiers still collide, without exposing raw session keys.
  • Preserve original keys for navigation and session actions.

Validation

  • Exact-head Windows test job: 2,753 Shared, 1,660 Tray, 399 Connection, 126 CLI, 18 Integration, 10 Functional UI, 423 SetupEngine, 78 Tray UI, and 19 real-process UI/accessibility tests passed.
  • Three exact-head Windows E2E shards passed.
  • win-x64 and win-arm64 release build/publish checks passed; PR-only MSIX/release jobs skipped as expected.
  • Focused formatter/provider regression suite: 234 passed.

Real behavior proof

GitHub-hosted Windows exercised the built app at 2f2439392e1faa5a54b0ad7948121f8e7c0713d7 through UI Automation. The transcript and original capture are preserved in the test-results artifact.

Sessions page showing OpenClaw Windows Tray and OpenClaw Windows Tray (main/fork)

input key=agent:main:main displayName="OpenClaw Windows Tray"
input key=agent:main:fork displayName="OpenClaw Windows Tray"
UIA title key=agent:main:main value="OpenClaw Windows Tray"
UIA title key=agent:main:fork value="OpenClaw Windows Tray (main/fork)"
UIA open-chat title="OpenClaw Windows Tray" selectedKey=agent:main:main
UIA open-chat title="OpenClaw Windows Tray (main/fork)" selectedKey=agent:main:fork
result=pass

Manual UI validation:

  • Inspected the exact-head Windows capture: both session rows are visible with distinct titles and their Open chat controls; the image contains only isolated synthetic test data.

@clawsweeper

clawsweeper Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codex review: needs changes before merge. Reviewed July 9, 2026, 7:25 PM ET / 23:25 UTC.

Summary
The branch extracts a shared session-title formatter, applies it to native chat and Sessions page rows, adds duplicate-title unit/UIA proof tests, and changes CI proof-summary wiring.

Reproducibility: yes. Current main has a source-level reproduction because SessionsPage projects raw duplicate display names, and the PR body provides exact-head UIA proof showing the fixed two-row scenario.

Review metrics: 2 noteworthy metrics.

  • Diff size: 10 files changed, +707/-67. The branch combines the app fix, regression proof, and one workflow-scope change that is not required for the feature.
  • Workflow surface: 1 workflow changed. The workflow edit is the maintainer-raised blocker and affects merge authority rather than session-title behavior.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #954
Summary: This PR is the candidate fix for the duplicate session-title issue; the fork-creation issue is adjacent because it can create duplicate sessions but has a separate remaining root cause.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

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

Rank-up moves:

  • Remove the .github/workflows/ci.yml changes while leaving the session-title app and test changes intact.

Risk before merge

  • [P1] The workflow diff is optional for the feature and can block normal maintainer merging because editing .github/workflows/ci.yml requires workflow-token scope.

Maintainer options:

  1. Drop the workflow edit (recommended)
    Remove the .github/workflows/ci.yml proof-summary changes and keep the app/test session-title fix as the landing patch.
  2. Sponsor workflow plumbing separately
    If maintainers want proof-summary behavior, land it in a separate workflow-scoped PR with an owner who can merge workflow changes.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Remove the .github/workflows/ci.yml changes from the PR and leave all session-title app/test files unchanged; do not edit CHANGELOG.md.

Next step before merge

  • [P2] A single mechanical repair can remove the optional workflow diff that maintainers identified as the only blocker.

Security
Cleared: No concrete security or supply-chain regression was found; the workflow edit is an automation/merge-scope issue, not a secrets or permission expansion.

Review findings

  • [P2] Remove the workflow proof-summary plumbing — .github/workflows/ci.yml:284-287
Review details

Best possible solution:

Land the shared formatter, app wiring, and regression proof after removing the optional workflow proof-summary change; leave the unwanted fork root cause tracked separately at #952.

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

Yes. Current main has a source-level reproduction because SessionsPage projects raw duplicate display names, and the PR body provides exact-head UIA proof showing the fixed two-row scenario.

Is this the best way to solve the issue?

No for the full branch as submitted. The shared formatter and tests are the narrow maintainable fix, but the optional workflow proof-summary edit should be removed before merge.

Full review comments:

  • [P2] Remove the workflow proof-summary plumbing — .github/workflows/ci.yml:284-287
    A maintainer comment says this CI edit is optional and blocks maintainers without workflow-token scope from merging the app/test fix. The session-title UIA test still runs without these env vars, so drop the workflow change and keep the behavior proof in the PR body/artifacts. This prior blocker remains present at the current head.
    Confidence: 0.93

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Label changes

Label justifications:

  • P2: The PR fixes a bounded user-facing session-list ambiguity with limited blast radius and one narrow merge blocker.
  • merge-risk: 🚨 automation: The diff changes GitHub Actions proof-summary behavior and discussion says that workflow change blocks normal maintainer merging without workflow-token scope.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The PR body includes exact-head Windows UIA transcript output and an inspected screenshot showing duplicate synthetic sessions rendered with distinct titles and preserving original session keys.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body includes exact-head Windows UIA transcript output and an inspected screenshot showing duplicate synthetic sessions rendered with distinct titles and preserving original session keys.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body includes exact-head Windows UIA transcript output and an inspected screenshot showing duplicate synthetic sessions rendered with distinct titles and preserving original session keys.
Evidence reviewed

Acceptance criteria:

  • [P1] ./build.ps1.
  • [P1] dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore.
  • [P1] dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore.
  • [P1] dotnet test tests/OpenClaw.Tray.UITests --no-build -c Debug -r win-x64 --filter Category=Accessibility.

What I checked:

Likely related people:

  • shanselman: Blame ties the current Sessions row projection and chat title formatter baseline to Scott Hanselman's 4166e0f commit, and the PR thread shows shanselman approved the behavior while requesting workflow removal. (role: introduced behavior and reviewer; confidence: high; commits: 4166e0fd63f8; files: src/OpenClaw.Tray.WinUI/Pages/SessionsPage.xaml.cs, src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs)
  • TurboTheTurtle: Current-main history shows TurboTheTurtle recently changed native chat session selection in the same provider area before this PR. (role: recent area contributor; confidence: high; commits: c1bd9ae58b9e; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.cs)
  • karkarl: Current workflow history shows Karen introduced the real-process accessibility scan summary that this PR modifies, and Karen authored the linked duplicate-title issue. (role: adjacent automation owner; confidence: medium; commits: e0a2301ce2e8; files: .github/workflows/ci.yml)
  • calebeden: Recent current-main commits by Caleb Eden changed native chat provider behavior near the affected session/thread surfaces. (role: recent adjacent contributor; confidence: medium; commits: 02f2421a5e75, c9b5476a873f; files: src/OpenClaw.Tray.WinUI/Chat/OpenClawChatDataProvider.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.
Review history (8 earlier review cycles)
  • reviewed 2026-07-09T20:16:08.378Z sha d73422b :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-09T20:35:03.054Z sha d73422b :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-09T20:40:10.069Z sha d73422b :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-09T20:51:03.263Z sha eb1aaf6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-09T21:02:06.967Z sha eb1aaf6 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T21:08:01.780Z sha 2f24393 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T21:20:57.585Z sha 2f24393 :: needs maintainer review before merge. :: none
  • reviewed 2026-07-09T23:17:15.509Z sha 2f24393 :: needs changes before merge. :: [P2] Remove the workflow proof-summary plumbing

@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. P2 Normal priority bug or improvement with limited blast radius. labels Jul 9, 2026
@TurboTheTurtle TurboTheTurtle marked this pull request as ready for review July 9, 2026 20:31

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 9, 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.

@shanselman

Copy link
Copy Markdown
Contributor

@TurboTheTurtle can I get a screenshot?

@TurboTheTurtle TurboTheTurtle force-pushed the fix/954-session-title-disambiguation branch from d73422b to eb1aaf6 Compare July 9, 2026 20:46
@TurboTheTurtle TurboTheTurtle force-pushed the fix/954-session-title-disambiguation branch from eb1aaf6 to 2f24393 Compare July 9, 2026 21:03
@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. 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: 🧂 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. labels Jul 9, 2026
@TurboTheTurtle

Copy link
Copy Markdown
Contributor Author

@shanselman Yep — this is the current-head Windows capture from CI. The two synthetic sessions start with the same gateway display name; the Sessions page renders them as distinct rows.

Sessions page showing OpenClaw Windows Tray and OpenClaw Windows Tray (main/fork)

@TurboTheTurtle

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 9, 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.

@shanselman

Copy link
Copy Markdown
Contributor

@TurboTheTurtle cool ya I saw this yesterday as well. The gateway is also returning a TON of weirdly named sessions

@shanselman shanselman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed with >90% confidence. CI and exact-head UI/accessibility proof are green; local current-head build passed; maintainer also ran the branch against a real profile with duplicate session titles and approved the behavior. Title disambiguation preserves original session keys for navigation/actions and avoids raw key exposure.

@shanselman

Copy link
Copy Markdown
Contributor

This PR is approved and ready, but the only blocker is the optional .github/workflows/ci.yml proof-summary plumbing. It is not required for the session-title feature or its assertions: without the env vars, SessionTitleBehaviorProofTests still runs and only skips writing the extra proof artifact/summary.\n\nCould you please remove the .github/workflows/ci.yml change from this PR? Once that workflow diff is gone, maintainers without workflow token scope can merge the app/test changes normally.

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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. labels Jul 9, 2026
shanselman added a commit that referenced this pull request Jul 10, 2026
Share session-title formatting between native Chat and the Sessions page, adding deterministic disambiguation when display names collide while preserving original session keys for navigation and actions.

This is the #955 app/test change set without the optional workflow proof-summary plumbing.

Validation: focused local OpenClawChatDataProvider/SessionTitleFormatter test run passed (234 tests); GitHub Build and Test, CodeQL, E2E, win-x64/win-arm64 builds all passed. Maintainer live-tested against a real profile containing duplicate session titles.

Co-authored-by: Andy Ye <35905412+TurboTheTurtle@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@shanselman

Copy link
Copy Markdown
Contributor

Superseded by #959, which carries the same app/test session-title changes without the optional workflow proof-summary diff that required workflow-scope token permissions.

@shanselman shanselman closed this Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 automation 🚨 Merging this PR could break CI, automerge, proof capture, label sync, or automation. 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: 🦐 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Chat session names are not unique (fork creates duplicate "OpenClaw Windows Tray")

2 participants