Skip to content

fix(ui): unblock sidebar navigation line-cap checks - #158778

Merged
steipete merged 1 commit into
mainfrom
codex/sidebar-navigation-cap-unblock
Sep 26, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/sidebar-navigation-cap-unblock

Conversation

@steipete

@steipete steipete commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Core lint rejects the sidebar navigation file at 701 lines against its 700-line cap after #158639 composed with the mainline import refactor in #158198.

User Impact

No user-visible behavior changes. This unblocks the existing lint gate without changing its cap or exemptions.

Why This Change Was Made

Obtain the session key inside the existing session-route guard, removing the redundant route check and temporary variable. The getter still runs exactly once for session routes and never for other routes; lineage loading and child scheduling retain their order.

Evidence

  • The unmodified main file reproduces the exact 701-line lint error; the corrected file passes the same focused, type-aware core lint command.
  • Existing sidebar lineage-freshness and background-scope suites: 35 tests passed.
  • Formatting and diff checks passed. Independent review found no actionable issues through P2; ClawSweeper’s completed review also has no findings.
  • Full changed checks passed, including the six selected test type graphs, production UI types, all three unused-export scans, lint, catalog and policy guards. Exact-head CI run 36232272701 passed for 9c5598ce9c5b3c3c9d68b9847e70764f91ad6d1d.

The earlier saved-pane reviewed head passed before merge composition added two import lines. This correction preserves that historical distinction; it does not claim the earlier checks covered the composed main tree.

Compute the route session key inside its existing session-route guard, removing the duplicate predicate and temporary local without changing navigation behavior. The reviewed saved-pane head was within the cap; mainline import refactoring added two lines when the patches composed. Related: #158639.
@clawsweeper

clawsweeper Bot commented Sep 26, 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.

@steipete
steipete marked this pull request as ready for review September 26, 2026 09:16
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Sep 26, 2026
@clawsweeper

clawsweeper Bot commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 26, 2026, 5:23 AM ET / 09:23 UTC.

ClawSweeper review

What this changes

The branch moves the Control UI sidebar’s session-key lookup inside its existing session-route guard, removing one counted source line.

Merge readiness

✅ Ready for maintainer review

Current main still exceeds the sidebar file’s local lint cap by one counted line. The proposed change brings it within the cap while retaining the session-route guard and existing call order, so the PR remains useful.

Priority: P3
Reviewed head: 9c5598ce9c5b3c3c9d68b9847e70764f91ad6d1d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, source-supported correction has relevant reported validation and no actionable defect.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This MEMBER-authored internal lint repair changes the sidebar update method; the PR reports a focused before-and-after lint check and related tests, while this read-only review independently checked the source count and did not run Oxlint. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER-authored internal lint repair changes the sidebar update method; the PR reports a focused before-and-after lint check and related tests, while this read-only review independently checked the source count and did not run Oxlint. No stored-data contract changes.
Evidence reviewed 6 items Introduced change: The pinned PR delta removes the conditional temporary key and reads the key once inside the existing route guard. The verified test merge introduces the same hunk.
Current main still needs the correction: Fetched main retains the redundant key assignment and second route check. A read-only nonblank, noncomment source count yields 701 lines on main and 700 on the PR head; the PR body reports the corresponding focused lint failure and pass. Oxlint was not run in this review.
Lint contract: The TypeScript rule caps ordinary files at 700 counted lines; repository documentation says local lint treats the cap as an error while GitHub Actions reports size violations as warnings.
Findings None None.
Security None None.

How this fits together

The Control UI sidebar receives the active route and session key from application state. For session routes, it loads session lineage before scheduling child-session reads that feed the sidebar.

flowchart LR
A[Active route] --> B{Session route?}
B -->|Yes| C[Read session key]
C --> D[Load session lineage]
B -->|All routes| E[Schedule child reads]
D --> F[Sidebar sessions]
E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -1. Total -1 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 1 2 -1
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 1 2 -1

Review metrics

Metric Value Why it matters
Counted sidebar lines 701 → 700; cap 700 The focused change restores the documented local lint budget without changing the rule.

Technical review

Best possible solution:

Preserve the 700-line rule and the sidebar’s session-only lineage loading behavior when landing this correction.

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

Yes, current-main source counts 701 nonblank, noncomment lines against the 700-line rule, while the PR head counts 700. This review did not execute Oxlint.

Is this the best way to solve the issue?

Yes. The route predicate is unchanged, and inlining the key read removes the excess line without changing the lint rule or the order of lineage and child-session work.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a narrow developer lint correction with no intended user-visible behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored internal lint repair changes the sidebar update method; the PR reports a focused before-and-after lint check and related tests, while this read-only review independently checked the source count and did not run Oxlint. No stored-data contract changes.

Label justifications:

  • P3: This is a narrow developer lint correction with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER-authored internal lint repair changes the sidebar update method; the PR reports a focused before-and-after lint check and related tests, while this read-only review independently checked the source count and did not run Oxlint. No stored-data contract changes.

Evidence

What I checked:

  • Introduced change: The pinned PR delta removes the conditional temporary key and reads the key once inside the existing route guard. The verified test merge introduces the same hunk. (ui/src/components/app-sidebar-session-navigation.ts:267, 9c5598ce9c5b)
  • Current main still needs the correction: Fetched main retains the redundant key assignment and second route check. A read-only nonblank, noncomment source count yields 701 lines on main and 700 on the PR head; the PR body reports the corresponding focused lint failure and pass. Oxlint was not run in this review. (ui/src/components/app-sidebar-session-navigation.ts:267, 5f3781df412c)
  • Lint contract: The TypeScript rule caps ordinary files at 700 counted lines; repository documentation says local lint treats the cap as an error while GitHub Actions reports size violations as warnings. (.oxlintrc.json:349, 9c5598ce9c5b)
  • Behavior boundary: The route predicate recognizes chat and dashboard routes, the key getter reads the same application and Gateway state, and lineage loading delegates to the existing controller. Child scheduling remains after the guard. (ui/src/components/app-sidebar-session-navigation.ts:326, 9c5598ce9c5b)
  • Related merged history: The two PRs cited in the body are merged sidebar and UI work in this path. Current main includes their work but still has the over-cap form, so they do not supersede this correction. (ui/src/components/app-sidebar-session-navigation.ts, 3bdec3895706)
  • Release check: No local release tag contains the proposed head; the correction is still absent from fetched main. (9c5598ce9c5b)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@steipete
steipete merged commit 4831588 into main Sep 26, 2026
176 checks passed
@steipete
steipete deleted the codex/sidebar-navigation-cap-unblock branch September 26, 2026 09:32
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 27, 2026
Compute the route session key inside its existing session-route guard, removing the duplicate predicate and temporary local without changing navigation behavior. The reviewed saved-pane head was within the cap; mainline import refactoring added two lines when the patches composed. Related: openclaw#158639.
steipete added a commit that referenced this pull request Sep 28, 2026
Compute the route session key inside its existing session-route guard, removing the duplicate predicate and temporary local without changing navigation behavior. The reviewed saved-pane head was within the cap; mainline import refactoring added two lines when the patches composed. Related: #158639.
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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.

1 participant