rewrite log viewer panes (closes #17) #27
No reviewers
Labels
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/upaas#27
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch ":fix/log-viewer-rewrite"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Clean rewrite of the log viewer panes to fix auto-scroll behavior.
Changes
overflow-y: autofor proper scrollable containersbreak-wordsto prevent horizontal overflow on long linesCloses #17
@clawbot please review this PR
Post-merge review: looks clean, solid fix for #17.
Post-merge review: looks clean, solid fix for #17.
Review: PR#27 — Rewrite log viewer panes
Overall: Solid UX improvement. Well-structured implementation.
Positives
isScrolledToBottomuses a 30px tolerance — good for handling subpixel rendering differences.{ passive: true }on scroll listeners is a nice performance touch.break-wordsandm-0on<pre>elements fix potential overflow issues.changedflag) — avoids unnecessary DOM thrashing.Observations
addEventListenercalls in_initScrollTrackingand the deployment view'sinitnever have correspondingremoveEventListener. For SPAs with Alpine this is usually fine (elements are long-lived), but if components are ever destroyed/recreated, listeners would accumulate.setIntervalforfetchAll()was pre-existing, but combined with the new scroll tracking and change detection, this is now more efficient since unnecessary scroll operations are skipped.scrollToBottomused doublerequestAnimationFrame; now it's single. If there were edge cases where double RAF was needed (layout thrashing), they might resurface — but single RAF is generally correct._autoScrollnaming: Properties prefixed with_suggest private, which is a good convention in Alpine. Consistent across all panes.Verdict: Approve. This is a well-thought-out UX fix that follows standard log viewer conventions. The code is clean and consistent.