Repository navigation
fix(ui): cap sidebar child sessions with show-more, drop Subagent prefix in tree - #110604
Conversation
…gent prefix in tree
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da2d9ac242
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| child.hasActiveRun || | ||
| child.status === "running" || | ||
| child.runningChildCount > 0, |
There was a problem hiding this comment.
Keep live descendant branches visible past the cap
When a quiet child after the first four only has a live grandchild, runningChildCount is still 0 here because descendants are only counted from already-built children; fetchChildSessionRows asks sessions.list with spawnedBy: parentKey, and the server-side spawnedBy filter only returns direct children for that parent. In that common nested-subagent case the grandchild row is not in rowsByKey yet, so this filter hides the child that carries the only toggle needed to load/reveal the running branch.
Useful? React with 👍 / 👎.
|
Codex review: needs real behavior proof before merge. Reviewed July 18, 2026, 6:48 AM ET / 10:48 UTC. Summary PR surface: Source +210, Tests +29. Total +239 across 8 files. Reproducibility: no. high-confidence live reproduction is supplied: the source and prior review identify a concrete lazy nested-child path, but the provided screenshot has only one child and does not exercise it. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep the cap only after the sidebar has authoritative descendant activity for each child branch, add regression coverage for the actual lazy-loading path, and post redacted Control UI evidence showing cap, reveal, reset, and a nested live branch remaining visible. Do we have a high-confidence way to reproduce the issue? No high-confidence live reproduction is supplied: the source and prior review identify a concrete lazy nested-child path, but the provided screenshot has only one child and does not exercise it. Is this the best way to solve the issue? No. The four-row cap is a reasonable UI direction, but filtering must not precede authoritative nested run-state discovery; a test that prepopulates the field is not sufficient proof of the lazy-loading path. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: unclear because the file could not be read completely. Codex review notes: model internal, reasoning high; reviewed against 347ee4589503. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +210, Tests +29. Total +239 across 8 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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
Review history (1 earlier review cycle)
|
|
Merged via squash.
|
…fix in tree (openclaw#110604) * fix(ui): cap sidebar child sessions at four with show-more, drop Subagent prefix in tree * test(ui): split child-session cap cases under the max-lines budget
…fix in tree (openclaw#110604) * fix(ui): cap sidebar child sessions at four with show-more, drop Subagent prefix in tree * test(ui): split child-session cap cases under the max-lines budget
What Problem This Solves
Two child-session (subagent) issues in the sidebar tree, continuing the quiet-sidebar series (#110448/#110459/#110470/#110524):
session-display.tsprepends it), which is redundant under an indented child row and truncates the actual title ("Subagent: Reading rec…").Why This Change Was Made
Maintainer request: show at most 4 children with a muted "Show {count} more" affordance, and drop the prefix where the hierarchy is already visible.
User Impact
visuallyActive/containsActiveDescendant) and any branch with live runs (hasActiveRun/status running/transitiverunningChildCount) always render, even past the cap.includeSubagentPrefixoption. Untitled subagents keep the "Subagent:" fallback rather than rendering an empty row.sessionsView.showMoreChildren(English source; locales are bot-generated).Evidence
node scripts/run-vitest.mjs ui/src/components/app-sidebar.test.ts— 109 pass, including new cases: 6-child parent shows 4 + "Show 2 more"; reveal-all; collapse-reset; unprefixed child labels; and a quiet child past the cap with a running grandchild stays visible ("Show 1 more").ui/src/lib/session-display.test.ts— 11 pass (prefix default, opt-out, fallback).isSessionChildrenExpandedcalls use.