Skip to content

fix: traffic chart spike after page blur and terminal scroll speed#12281

Open
jakub961241 wants to merge 1 commit into1Panel-dev:dev-v2from
jakub961241:fix/traffic-spike-terminal-scroll
Open

fix: traffic chart spike after page blur and terminal scroll speed#12281
jakub961241 wants to merge 1 commit into1Panel-dev:dev-v2from
jakub961241:fix/traffic-spike-terminal-scroll

Conversation

@jakub961241
Copy link

Summary

Two bug fixes:

1. Traffic chart spike after page blur (#12067)

When switching to another tab, polling pauses. On return, accumulated network bytes create a massive spike in the chart.

Fix: Skip the first chart data point after resuming from blur (detected by skipNextChart flag or timeInterval > 10s). Only updates the raw counters without pushing to the chart arrays.

2. Terminal mouse wheel scrolls too fast (#11911)

scrollSensitivity had 4 different default values across the codebase:

Location Old Value
Store default 10
Component fallback 15
Settings preview 15
Reset to defaults 6

Fix: Unified all to 5 and changed || to ?? so that setting 0 (the minimum) is properly respected.

Changed files

  • frontend/src/views/home/index.vue - Skip chart update after blur
  • frontend/src/components/terminal/index.vue - Fix fallback value
  • frontend/src/store/modules/terminal.ts - Fix store default
  • frontend/src/views/terminal/setting/index.vue - Fix preview and reset defaults
fix: Traffic chart no longer spikes after switching tabs; terminal scroll sensitivity unified to consistent default (#12067, #11911)

…-dev#12067, 1Panel-dev#11911)

Two fixes:

1. Traffic data spike after page blur (1Panel-dev#12067)
   When the page loses focus, polling pauses. On resume, accumulated
   network bytes divided by a small interval caused a massive spike.
   Now skips the first data point after resume (or when timeInterval
   > 10s), only updating counters without chart push.

2. Terminal scroll sensitivity inconsistency (1Panel-dev#11911)
   scrollSensitivity had 4 different defaults across the codebase:
   - Store: 10, Component: 15, Preview: 15, Reset: 6
   Unified all to 5 (lower = less sensitive in xterm.js).
   Changed || to ?? so setting 0 is respected.

Fixes 1Panel-dev#12067, 1Panel-dev#11911
@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Mar 22, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ssongliu for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant