Skip to content

fix(ui): keep Windows catalog sessions in one project group#111596

Open
ooiuuii wants to merge 2 commits into
openclaw:mainfrom
ooiuuii:fix/catalog-windows-path-identity
Open

fix(ui): keep Windows catalog sessions in one project group#111596
ooiuuii wants to merge 2 commits into
openclaw:mainfrom
ooiuuii:fix/catalog-windows-path-identity

Conversation

@ooiuuii

@ooiuuii ooiuuii commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Closes #111595

What Problem This Solves

Fixes an issue where users grouping native Codex or Claude sessions by project could see one Windows project split into multiple sidebar groups when catalog cwd values differed only by case, slash style, or a trailing separator. Case-varied Windows .CLAUDE/WORKTREES/... paths could also remain separate from their origin project.

Why This Change Was Made

Catalog grouping now uses a comparison-only identity for unambiguous Windows drive and backslash-rooted paths while retaining the first encountered path spelling for the visible key, label, and title. Windows worktree markers are matched case-insensitively; POSIX paths remain case-sensitive, including legal //... paths.

User Impact

Windows users see equivalent native session paths under one stable project group instead of duplicate folders. Existing display paths and POSIX grouping behavior are preserved.

Evidence

Current-head refresh validation:

upstream/main: 8a03f414ce2517a4cc01ee2835e7d4a4aeeefccc
PR head:       87c1791be8

node node_modules/vitest/vitest.mjs run ui/src/lib/sessions/catalog-project-grouping.test.ts
Test Files  1 passed (1)
Tests       20 passed (20)

autoreview --mode branch --base upstream/main
trufflehog: clean
autoreview clean: no accepted/actionable findings reported
overall: patch is correct (0.94)

git diff --check
(clean)

The regression cases prove:

C:\Work\Notes + c:/work/notes/ + C:/WORK/NOTES -> 1 group
direct Windows repo + case-varied .CLAUDE/WORKTREES cwd -> 1 group
//mnt/Repo + //mnt/repo -> 2 groups (POSIX remains case-sensitive)

Real Windows behavior proof

A live after-fix probe used two non-ephemeral Codex CLI sessions created on this Windows host from the same NTFS directory with different cwd casing. The session files were generated by Codex itself and were not edited. OpenClaw's production codex.cli.sessions.list command then read the real catalog entries before the production project-grouping module was invoked.

Redacted result:

source=production codex.cli.sessions.list
session A cwd=C:\<user>\.openclaw\workspace    messageCount=2
session B cwd=C:\<user>\.OPENCLAW\WORKSPACE    messageCount=2

upstream/main fef846a3f0: groups=2 sizes=[1,1]
PR behavior:             groups=1 sizes=[2]
result=PASS

The branch was subsequently rebased without conflict onto 8a03f414ce25; the current-head focused suite above reruns the same production grouping implementation plus the later root-kind boundary cases. This preserves the real-session result while validating the exact refreshed code.

This proves the reported behavior through real Windows Codex rollout files and the production catalog reader: current main rendered two project identities for equivalent cwd values, while the patched grouping renders one stable group containing both sessions. Session ids, the Windows account name, and message text are redacted.

@openclaw-barnacle openclaw-barnacle Bot added the app: web-ui App: web-ui label Jul 20, 2026
@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. P2 Normal backlog priority with limited blast radius. labels Jul 20, 2026
@clawsweeper

clawsweeper Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 21, 2026, 4:18 AM ET / 08:18 UTC.

Summary
The branch adds a comparison-only, root-kind-aware Windows path identity for Control UI catalog grouping while preserving the first encountered path spelling for display and adding Windows/POSIX boundary regression tests.

PR surface: Source +36, Tests +91. Total +127 across 2 files.

Reproducibility: yes. source-reproducible with high confidence: the supplied current-main path keyed groups by the cleaned display cwd, and the PR includes a real Windows production-reader run showing equivalent case/slash variants split before the change and group afterward.

Review metrics: 1 noteworthy metric.

  • Path-identity boundary: 3 Windows root kinds distinguished. Drive, UNC, and current-drive-rooted paths now normalize only within their own identity kind, which limits accidental cross-kind grouping.

Stored data model
Persistent data-model change detected: serialized state: ui/src/lib/sessions/catalog-project-grouping.test.ts, serialized state: ui/src/lib/sessions/catalog-project-grouping.ts, unknown-data-model-change: ui/src/lib/sessions/catalog-project-grouping.test.ts, unknown-data-model-change: ui/src/lib/sessions/catalog-project-grouping.ts. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
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:

  • [P2] Refresh the merge head against current main and confirm the required checks on the actual landing result.

Risk before merge

  • [P1] The branch is behind current main; before merge, maintainers should refresh the merge result and required checks so the Windows identity change is evaluated against the actual landing head.
  • [P1] The comparison identity intentionally folds Windows-looking path spellings, so preserving the tested drive/UNC/current-drive-root distinctions is the compatibility boundary to retain.

Maintainer options:

  1. Refresh against current main (recommended)
    Update the merge head and confirm required checks still pass while preserving the tested drive, UNC, rooted, and POSIX identity boundaries.
  2. Accept the current-head boundary
    Merge only if maintainers accept the existing proof and the platform-specific grouping equivalence boundary without an additional refresh.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Refresh the merge head and required checks; preserve the Windows root-kind and POSIX case-sensitivity regression coverage.

Next step before merge

  • [P2] No mechanical repair is identified; a maintainer should refresh the merge result/checks and decide whether to land the proof-backed compatibility change.

Security
Cleared: The two-file UI grouping and test diff adds no dependency, workflow, permission, secret, artifact-execution, or supply-chain surface.

Review details

Best possible solution:

Land the narrow comparison-only identity after a current-base merge/check refresh, keeping first-seen display spelling and the explicit root-kind/POSIX boundaries intact.

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

Yes, source-reproducible with high confidence: the supplied current-main path keyed groups by the cleaned display cwd, and the PR includes a real Windows production-reader run showing equivalent case/slash variants split before the change and group afterward.

Is this the best way to solve the issue?

Yes. A comparison-only identity at the catalog grouping boundary is narrower than changing filesystem or session storage semantics, and preserving the first display spelling avoids a visible-path rewrite.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This is a bounded Control UI catalog grouping defect affecting Windows session organization without evidence of message loss, data loss, or runtime unavailability.
  • merge-risk: 🚨 compatibility: The PR changes how existing Windows catalog cwd values collapse into visible project groups, so root-kind separation and current-base verification matter before merge.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides redacted after-fix Windows runtime output from real Codex session files read through the production catalog reader, plus a focused current-head regression suite; no additional contributor proof is required.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides redacted after-fix Windows runtime output from real Codex session files read through the production catalog reader, plus a focused current-head regression suite; no additional contributor proof is required.
Evidence reviewed

PR surface:

Source +36, Tests +91. Total +127 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 43 7 +36
Tests 1 91 0 +91
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 134 7 +127

What I checked:

  • Current-head implementation: The branch introduces a separate Windows comparison identity keyed by root kind and normalized path segments, while retaining the existing display path for group labels and titles. (ui/src/lib/sessions/catalog-project-grouping.ts:16, 87c1791be818)
  • Boundary coverage: The added focused tests cover equivalent drive-path spellings, distinct drive/UNC/current-drive-rooted identities, case-insensitive Windows worktree folding, root handling, and POSIX case sensitivity. (ui/src/lib/sessions/catalog-project-grouping.test.ts:79, 87c1791be818)
  • Real behavior proof: The PR body reports two real non-ephemeral Windows Codex sessions read through the production catalog reader: the cited main behavior produced two groups and the patched behavior produced one group containing both sessions. (ui/src/lib/sessions/catalog-project-grouping.ts:74, 87c1791be818)
  • Prior review continuity: The prior root-kind finding was explicitly addressed in the second branch commit and the prior completed ClawSweeper cycle reported no remaining findings. (ui/src/lib/sessions/catalog-project-grouping.ts:16, 87c1791be818)
  • Linked remaining work: The open bug report is explicitly linked with closing syntax, so this PR is the candidate fix and the issue should remain open until a merge occurs.

Likely related people:

  • ooiuuii: Authored the focused Windows path-identity implementation, root-kind follow-up, regression tests, and supplied Windows runtime proof; no separate merged-history owner was identifiable in the supplied review material. (role: current repair contributor; confidence: low; commits: 377b873aee02, 87c1791be818; files: ui/src/lib/sessions/catalog-project-grouping.ts, ui/src/lib/sessions/catalog-project-grouping.test.ts)
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 (6 earlier review cycles)
  • reviewed 2026-07-20T01:48:40.388Z sha 6eb42b8 :: needs real behavior proof before merge. :: [P2] Preserve the Windows root kind in the identity
  • reviewed 2026-07-20T06:26:49.588Z sha 6eb42b8 :: needs changes before merge. :: [P2] Preserve the Windows root kind in the identity
  • reviewed 2026-07-20T10:09:06.177Z sha 54f568d :: needs maintainer review before merge. :: none
  • reviewed 2026-07-20T11:13:56.657Z sha 54f568d :: needs maintainer review before merge. :: none
  • reviewed 2026-07-20T11:57:55.218Z sha 54f568d :: needs maintainer review before merge. :: none
  • reviewed 2026-07-21T07:32:36.801Z sha 87c1791 :: needs maintainer review before merge. :: none

@ooiuuii

ooiuuii commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Added redacted real Windows behavior proof on the current head: two non-ephemeral Codex CLI sessions from the same NTFS directory with case-varied cwd values were read through the production codex.cli.sessions.list path. Current upstream main produced two project groups; this PR head produced one group containing both sessions. @clawsweeper re-review

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 Jul 20, 2026
@ooiuuii

ooiuuii commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the Windows root-kind review finding on the current head:

  • preserves distinct drive, UNC, and current-drive-rooted identities
  • keeps equivalent UNC spellings grouped
  • leaves local filesystem roots and root worktrees ungrouped
  • keeps UNC share roots groupable because the share itself can be a valid project root
  • retains POSIX case sensitivity

Verification:

  • node scripts/run-vitest.mjs ui/src/lib/sessions/catalog-project-grouping.test.ts (18/18 passed)
  • pnpm exec oxfmt --check ...
  • pnpm exec oxlint --type-aware ...
  • git diff --check
  • full branch autoreview: clean, patch correct (0.97)

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

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

@ooiuuii
ooiuuii force-pushed the fix/catalog-windows-path-identity branch from d9ee15f to 1b434ea Compare July 20, 2026 09:01
@ooiuuii

ooiuuii commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Rebased the focused fix onto current upstream main and reconciled the new custom-group ordering without changing its behavior. Current-head proof: catalog grouping tests 20/20 passed; oxfmt, type-aware oxlint, and git diff --check are clean; full branch autoreview is clean (patch correct, confidence 0.91). @clawsweeper re-review

@ooiuuii
ooiuuii force-pushed the fix/catalog-windows-path-identity branch from 1b434ea to 54f568d Compare July 20, 2026 10:05
@ooiuuii

ooiuuii commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current upstream main at 7fe1d70 so this head uses the canonical scripts/pr wrapper; the previous core-tooling-4 failure was the stale-wrapper guard, shared across this batch. No fix behavior changed. Current-head validation: catalog grouping tests 20/20 passed; type-aware oxlint and git diff --check are clean. The focused branch autoreview was already clean before this base-only refresh. @clawsweeper re-review

@ooiuuii
ooiuuii force-pushed the fix/catalog-windows-path-identity branch from 54f568d to 87c1791 Compare July 21, 2026 07:29
@clawsweeper clawsweeper Bot added status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Jul 23, 2026
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 merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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.

[Bug]: Equivalent Windows cwd spellings split catalog project groups

2 participants