Skip to content

fix(ui): stop sidebar refresh loops with legacy session participants - #172575

Merged
fuller-stack-dev merged 2 commits into
mainfrom
fix/sidebar-owner-query-feedback
Oct 14, 2026
Merged

fuller-stack-dev merged 2 commits into
mainfrom
fix/sidebar-owner-query-feedback

Conversation

@fuller-stack-dev

@fuller-stack-dev fuller-stack-dev commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes continuous sidebar reloads on personal gateways when legacy sessions contain other participants. The loop can make sidebar controls unusable and flood the gateway with identical session-list requests.

User Impact

Chat and sidebar filtering settle normally, and legacy conversations stay visible. Explicit owner selections still apply, including owners with no matching sessions. No configuration or data migration is required.

Why This Change Was Made

The sidebar used participant visibility in filtered rows to decide whether to apply the owner filter. Applying the filter could remove those rows and reverse that decision. Query selection now uses the gateway's complete owner inventory; participant information continues to control attribution display.

The model-picker browser fixtures also unmount their Lit renderer before removing their container. Removing only the DOM left a 300-option picker reacting to later tests and caused the agent-menu CI timeout. All four model-picker behavior cases and their assertions remain intact.

Evidence

Current head 8466519217a6dcb82e7288ba20131aea8c512844 passed CI: all 28 jobs, including all three UI shards, browser E2E, performance, lint, types, and security. The additional CI repair changes only test fixture ownership. Original product proof below is reused because all three owner-query fix files are unchanged.

  • Synthetic browser reproduction on canonical main: 283 sessions.list requests in two seconds, without gateway events. The same fixture with the fix settles at two total requests across six seconds, including one Chat-pane request.
  • Base controls settle when selecting All or removing only the legacy row's participant information. A two-owner inventory also settles.
  • Regression tests fail on the base for visible and truncated legacy participants and a same-ID human/agent owner. All 122 focused sidebar tests pass with the fix.
  • Independent code review found no actionable P0–P2 findings.

Independent browser validation passed all five clauses: stable idle requests; preserved draft and selection; All/My filter changes; an explicit empty owner; and one refresh after a real list invalidation. Five unrelated presence updates and menu toggles caused no further requests.

Changed-file lint, formatting, UI and affected test type checks pass. The broader changed-check command remains red for the existing environment-variable budget and unused exports in 12 unchanged files. No failing check is represented as passing.

Attached before/after screenshots and raw browser recordings use synthetic data only. Request counts above are measured by the mock Gateway, not inferred from video. This proves the sidebar feedback bug; it does not establish the cause of every native WebKit freeze.

Test scope and audit

node scripts/run-vitest.mjs ui/src/components/app-sidebar.owner-query.test.ts ui/src/components/session-owner-filter-controller.test.ts ui/src/components/app-sidebar.personal-agent-scope.test.ts ui/src/components/app-sidebar.sessions.test.ts --maxWorkers=1

Four files, 122 passing tests, 10.15 seconds wall time. The final four-regression run passes in 2.92 seconds wall time. The first exact-head CI run failed two browser cases. The agent-menu timeout was traced to an abandoned model-picker renderer. A minimal ordered replay on unchanged base took 31.63 seconds for the menu test; explicit renderer teardown reduced it to 0.815 seconds. The repaired candidate passes the original 23-file worker sequence, 226 tests in 41.82 seconds; the agent-menu case fell from 48.38 seconds to 0.654 seconds. Targeted lint, formatting, and diff checks pass. Independent P0-P2 review is clean.

The separate RTL390 occlusion failure is inherited: PR #172081 CI job reported the identical [false,true,false,true] sequence before this owner-query fix. A bounded pointer experiment was inconclusive; no causal repair is claimed and its assertions are unchanged. Both failing files passed in a Linux Chromium replay, 15 tests in 17.45 seconds. The Testbox payload passed; a cleanup-settlement timeout was reconciled through native stop.

The entire model-picker.browser.test.ts was audited. Its four distinct cases cover a large catalog, provider details and unknown models, free-form entry, and hover/selection behavior. The broad body-removal hook and duplicate host removal are replaced by per-fixture renderer disposal and container removal. Tooltip disposal is preserved. No tests or assertions were removed.

The entire new app-sidebar.owner-query.test.ts file was audited. It exercises the mounted sidebar with the real session capability, observes requests and rendered rows, covers explicit empty-owner selection, and disposes its own fixture. A bounded response budget lets the failing test report the loop without starving the runner. No existing coverage was removed.

The repository-wide environment-variable budget check fails on untouched base as well: 455 names versus a budget of 454. The changed files introduce no environment variables.

Artifact manifest
{
  "repository": "openclaw/openclaw",
  "base": "923e59a01e20549965381a1e72a471762981db9d",
  "head": "e3b9a451405a33736143ba49a4e6ebf58d1a2503",
  "environment": "macOS arm64, system Chrome, synthetic Gateway, private browser context",
  "before": {
    "sessions.list": [
      143,
      283
    ],
    "sampleSeconds": [
      1,
      2
    ]
  },
  "after": {
    "sessions.list": [
      2,
      2,
      2,
      2,
      2,
      2
    ],
    "sampleSeconds": [
      1,
      2,
      3,
      4,
      5,
      6
    ]
  },
  "proofReuse": "Recorded patch on d37f4756; final rebase adds unrelated Moonshot schema and server MCP transport changes. All three changed files byte-identical. No affected UI, request owner, fixture, or dependency changes.",
  "validation": "122 focused tests pass; final four regressions pass; independent code review clean P0-P2; source-blind browser 5/5 clauses pass.",
  "files": {
    "after-requests.json": {
      "sha256": "f41ee076d2b648f8a8bd5e635818672b7ef51981955873faab09402099ac0ecc",
      "bytes": 4136
    },
    "after.png": {
      "sha256": "768a8ef9f49a938651f9ade2df3d79c312f237d133a11b2186fa583461608248",
      "bytes": 31285
    },
    "after.webm": {
      "sha256": "2d56adc076aef27d8f5245efdafa07a164bc82fbf9cb839677dd80e68febcab8",
      "bytes": 98073
    },
    "before-requests.json": {
      "sha256": "dabed8a46eeab1cd3ec68a55d77fa8790f2c415ed42e34289009c96c00fb693c",
      "bytes": 5488
    },
    "before.png": {
      "sha256": "99d4d600d856b7df2656dea275e60feb6913dd25076b6bca0c54ac6c8d6f8d47",
      "bytes": 28915
    },
    "before.webm": {
      "sha256": "98be8d86d636e2cedc336d1c137695fe2fccc818a52c68018dcfe18ebf3ffef7",
      "bytes": 70409
    }
  }
}

before

after

before.webm
after.webm

@fuller-stack-dev
fuller-stack-dev marked this pull request as ready for review October 14, 2026 22:08
@clawsweeper

clawsweeper Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper reviews are opt-in for maintainers. If a review is required, finish the work and validation first, then comment @clawsweeper review. Please avoid repeated requests while a review is queued or running; agents should not request reviews automatically.

@fuller-stack-dev
fuller-stack-dev enabled auto-merge (squash) October 14, 2026 22:11
@fuller-stack-dev
fuller-stack-dev merged commit a7bddbc into main Oct 14, 2026
99 checks passed
@fuller-stack-dev
fuller-stack-dev deleted the fix/sidebar-owner-query-feedback branch October 14, 2026 23:09
@fuller-stack-dev

Copy link
Copy Markdown
Member Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 15, 2026
…penclaw#172575)

* fix(ui): stop sidebar refresh loops with legacy session participants

* test(ui): dispose model picker fixtures before removing DOM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant