Skip to content

fix(ui): refresh filtered sidebar on agent navigation - #169774

Merged
vincentkoc merged 1 commit into
mainfrom
fix/fixes-recovery-20261012
Oct 12, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/fixes-recovery-20261012

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes: switching agents with a sidebar session filter can leave the session list empty until the selected chat finishes loading.

User Impact

Filtered sessions refresh immediately when you choose another agent, including when you switch back before the previous request finishes.

Why This Change Was Made

The existing session controller now consumes the selection owner's navigation intent before choosing an immediate or automatic refresh. Startup, reconnect, and background scope updates keep their existing chat-readiness ordering. No new state owner, Gateway API, or configuration is added.

Evidence

  • Mounted sidebar regression failed before the fix: selecting the second agent never requested its filtered list while chat remained unready.
  • All 35 focused sidebar/controller tests pass, covering explicit navigation, automatic scope changes after same-agent intent, delayed responses, reconnects, and filtered membership.
  • Focused test invocation: 17.07 seconds wall; the changed file's prior standalone run took 12.88 seconds wall (under 2 seconds of test execution). CI timing is pending.
  • Independent review found no actionable P0–P2 findings.
  • Source line-count ratchets and diff whitespace checks pass.
  • UI typecheck, targeted type-aware lint, and formatting checks pass.

This is a request-ordering repair with unchanged presentation; proof exercises the registered sidebar against a deterministic Gateway fixture.

@vincentkoc vincentkoc self-assigned this Oct 12, 2026
@clawsweeper

clawsweeper Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 12, 2026 08:41
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: web-ui App: web-ui size: S labels Oct 12, 2026
@vincentkoc
vincentkoc enabled auto-merge (squash) October 12, 2026 08:47
@clawsweeper

clawsweeper Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR refreshes filtered sidebar sessions immediately on explicit agent navigation while preserving deferred background refreshes.

Example: With Archived selected, switch from main to research while the selected chat is loading.

  • Before: The filtered research session list waits for chat readiness.
  • After: The filtered research list is requested immediately, and switching back keeps research responses out of main's sidebar.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A focused, apparently correct repair with meaningful mounted-boundary coverage; supplied runtime evidence remains harness-based.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; its supplied evidence exercises the registered sidebar and session controller through a mocked Gateway, without a shipped-browser capture.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Switching agents with sidebar filters can show an empty session list while chat startup remains pending.
Reason: A small repair restores responsive explicit navigation, preserves intentional background ordering, and has maintainer-authored direction.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR repairs a filtered-sidebar navigation delay still present on current main. No actionable introduced defects were found.

Priority: P2
Reviewed head: fda787433030bfa9ae45313eba844afa83edf7cc

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped-browser run of filtered agent switching during held chat startup is supplied; baseline failure and passing focused tests are reported in the body rather than independently executed here.
Agent review details

How this fits together

The Control UI session controller consumes agent-selection intent and sidebar filters, requests scoped session lists through the existing session capability, and publishes matching rows to the sidebar.

flowchart TD
  A[Agent selection] --> B[Session data controller]
  B --> C[Immediate refresh]
  B --> D[Background admission]
  C --> E[Scoped session list owner]
  D --> E
  E --> F[Filtered sidebar rows]
Loading

Technical review

Best possible solution:

Use the existing selection intent and scoped refresh owner to prioritize explicit filtered navigation without changing automatic startup admission.

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

Current-main source shows the filtered navigation request entering chat-readiness admission, and the supplied mounted regression exercises that trigger; no code was executed during this read-only review.

Is this the best way to solve the issue?

The repair fits the existing ownership model, reuses immediate refresh behavior, and consumes same-agent intent so later automatic changes retain their ordering.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 8571314385b5.

Provenance checked

  • Filtered sidebar scope-change admission changes intended behavior with a stated reason (b023df8: Prioritize selected transcript startup over automatic sidebar hydration while preserving explicit refreshes and other deliberate actions.)
  • Mounted filtered-roster regression keeps the original intent (b023df8: Protect current-agent filtered membership when an earlier scope read completes; this PR extends that contract to held chat readiness and automatic selection.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source +12, Tests +15, Docs +2. Total +29 across 3 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 13 1 +12
Tests 1 69 54 +15
Docs 1 2 0 +2
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 84 55 +29

Labels

Label changes:

  • add P2: Filtered agent navigation can leave the sidebar empty until chat startup completes; the impact is limited and recoverable.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Filtered agent navigation can leave the sidebar empty until chat startup completes; the impact is limited and recoverable.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 12, 2026, 4:47 AM ET / 08:47 UTC.

@vincentkoc
vincentkoc merged commit e47b800 into main Oct 12, 2026
133 checks passed
@vincentkoc
vincentkoc deleted the fix/fixes-recovery-20261012 branch October 12, 2026 08:51
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash auto-merge.

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 docs Improvements or additions to documentation size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant