Skip to content

fix: let Logs wheel scrolling reach the newest entries - #188945

Merged
shakkernerd merged 1 commit into
mainfrom
ci-logs-initial-auto-follow
Oct 31, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
ci-logs-initial-auto-follow

Conversation

@shakkernerd

@shakkernerd shakkernerd commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

With Auto-follow disabled, a wheel scroll toward the bottom can stop before the newest Logs row is fully visible in WebKit.

User Impact

Readers can reach the newest retained log while keeping Auto-follow off. Paused reading, trimming, End and re-enabling follow retain their existing behavior.

Why This Change Was Made

Row measurement could write a compensating scroll offset while WebKit was still completing wheel travel, cutting it short. The existing virtualizer now leaves ordinary size adjustments alone during reported scrolling when follow is off, then restores normal anchoring at rest. Measurement pinning in that mode begins at the end instead of within the last 120 pixels.

The landed measurement, key and offset-readback owner remains intact.

Evidence

  • The failing bundled WebKit case ran the landed LogsView and stopped 207px short; the newest-row geometry assertion was unreached.
  • Scoped formatting/lint and all four selected type groups pass.
  • All 29 tests across the complete Logs view, page, scroll and auto-follow owners pass on the repair, including the landed resize/hidden-append regressions, all three original scroll cases, full newest-row geometry, bounded rendering, paused-reader trimming, Refresh, End, visibility and re-enable-follow controls.

Selected CI and Workflow Sanity pass. All five additional scroll, layout and real-Gateway lifecycle cases pass. Independent review is clean. The matched visual evidence below shows the bottom gap changing from 128px to 0px.

Visual evidence

Before After
Before: wheel stops 128px short; newest retained row 2499 remains below the viewport. After: row 2499 is fully visible at the bottom with Auto-follow still off.

Auto-follow off: wheel up, trim, then wheel down 1,000,000 px to row 2499.

focused.webm

Visual verification

  • Baseline: ac897d3
  • Exact head: a317c816d47e4ccc3862e5b8888153645e9a153e
  • Scenario: Load 2,000 synthetic logs, disable Auto-follow, wheel to the top, append/trim 500 rows, then wheel down 1,000,000 px to the newest retained row.
  • Runtime/build: Production Control UI bundle from a317c81 (tree e215489); Linux, Node 24.22.1 and WebKit 27.2. UI footer version is synthetic Gateway fixture data.
  • Trigger: Wheel down 1,000,000 px over Logs, Auto-follow off
  • Before / after bottom gap: 128px → 0px
  • Newest row after repair: 2499 entirely within stream and viewport
  • Mounted rows: 20 after, below the 100-row bound
  • Same 1440×1000 viewport, light theme, DPR 1, synthetic data and original gestures.
  • All 29 focused tests pass; the recorded scroll, layout and lifecycle batch passed all five cases.
  • Matching screenshots and complete native recordings inspected; synthetic content only.
  • Production source matches the published commit; only the test fixture adds recording and post-outcome collection.
  • Original source recordings retained. Duration difference includes the baseline failed assertion wait; no latency improvement is claimed.

@shakkernerd shakkernerd self-assigned this Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR suppresses ordinary row-size scroll compensation during manual scrolling with Auto-follow disabled.

Example: In desktop WebKit, scroll to the newest entry in a 2,000-row retained Logs buffer with Auto-follow disabled.

  • Before: The reported wheel interaction stops 207 pixels short of the bottom.
  • After: The intended result is a fully visible newest row while Auto-follow remains disabled.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and has no established correctness finding, but the required observable browser proof is still pending.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: With Auto-follow disabled, WebKit wheel scrolling can stop before the newest retained log is fully visible.
Reason: Restoring manual reachability has clear user value, and the maintainer-authored direction preserves the existing follow and retention contracts.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a concrete Logs scrolling failure still present in current main; no actionable introduced defect was found.

Priority: P2
Reviewed head: a317c816d47e4ccc3862e5b8888153645e9a153e

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide inspected, sanitized before/after browser captures showing the fixed WebKit wheel interaction reaches the fully visible newest row with Auto-follow disabled.
Agent review details

How this fits together

The Logs page supplies retained Gateway log rows and follow preferences to LogsView, whose virtualizer measures rows and controls the scroll viewport.

flowchart LR
  A[Gateway log tail] --> B[Logs page retained rows]
  B --> C[LogsView]
  D[Reader input and Auto-follow] --> C
  C --> E[Virtualizer measurement and anchoring]
  E --> F[Visible log viewport]
Loading

Technical review

Best possible solution:

Keep measurement policy within the existing virtualizer and preserve idle anchoring, trimming, explicit End, and Auto-follow behavior.

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

Source inspection identifies the compensation writes and an existing browser scenario matching the reported failure; this read-only review did not independently reproduce WebKit's timing-dependent result.

Is this the best way to solve the issue?

The focused change uses the dependency's existing adjustment hook and preserves established scroll ownership without introducing another state manager or configuration option.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Virtualized Logs scrolling and measurement anchoring keeps the original intent (372a1aa: Window the retained log buffer while preserving keyed reader position and measured end navigation.)
  • End threshold and wheel reachability changes intended behavior with a stated reason (516bbeb: Keep newest logs reachable while consolidating scrolling under the virtualizer.)
  • Compensation offset readback keeps the original intent (769373d: Apply append/trim anchors after DOM commit and read compensation back before subsequent row measurements.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Pinned introduced change: The introduced diff changes only measurement-compensation policy and the follow-off end threshold, retaining the existing virtualizer, append/trim anchoring, and post-commit readback. (ui/src/pages/logs/view.tsx:147, a317c816d47e)
  • Current main still needs the change: The fetched-main LogsView is identical to the introduced base and therefore retains the unconditional default measurement compensation and 120-pixel end threshold. (ui/src/pages/logs/view.tsx:154, a825acc286e0)
  • Existing browser regression: The existing wheel scenario disables Auto-follow, trims the retained buffer, wheels downward, and asserts full newest-row visibility, bounded rendering, and unchanged follow state. (ui/src/e2e/logs-scroll.e2e.test.ts, a317c816d47e)
  • Prior fixes establish ownership and intent: fix: keep the newest Gateway logs reachable #188476 established wheel reachability and single-owner scrolling; fix(ui): keep logs following after row resize compensation #188617 established post-commit compensation and offset readback, both preserved here. (ui/src/pages/logs/view.tsx:233, 769373dc062a)
  • Imported dependency contract verified: LogsView imports virtual-core, pinned at 3.19.2; that version exposes the custom size-adjustment predicate while handling end pinning separately, explaining why this PR also narrows scrollEndThreshold. (packages/virtual-core/src/index.ts:1853, 7c20899ba738)
  • Proof supplied and inspection limits: The full PR body reports focused tests passing and explicitly says visual evidence is pending; comments contain no additional behavioral proof. The linked failing job metadata was readable, but its log download was blocked by the network allowlist. Installed Solid documentation is absent, and some historical blobs are unavailable; these inspection limits are not contributor defects. (a317c816d47e)

Likely related people:

  • Peter Steinberger: Raw commit 769373d adds ui/src/pages/logs/view.tsx:140 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 769373dc062a; files: ui/src/pages/logs/view.tsx)

PR surface

Source +17. Total +17 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 19 2 +17
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 19 2 +17

Labels

Label changes:

  • add P2: The failure limits manual access to the newest Logs entries in WebKit without breaking log collection or the core agent workflow.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab 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: The failure limits manual access to the newest Logs entries in WebKit without breaking log collection or the core agent workflow.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab 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 30, 2026, 10:02 PM ET / October 31, 2026, 02:02 UTC.

@shakkernerd
shakkernerd merged commit d07273d into main Oct 31, 2026
118 checks passed
@shakkernerd
shakkernerd deleted the ci-logs-initial-auto-follow branch October 31, 2026 03:09
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: wheel scrolling reaches the newest logs with Auto-follow disabled.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
Keep Logs wheel scrolling from stopping before the newest retained entry when Auto-follow is disabled.
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 P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. 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