Skip to content

[pull] master from Ehco1996:master#318

Merged
pull[bot] merged 3 commits into
Kiterepo:masterfrom
Ehco1996:master
May 5, 2026
Merged

[pull] master from Ehco1996:master#318
pull[bot] merged 3 commits into
Kiterepo:masterfrom
Ehco1996:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 5, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Ehco1996 and others added 3 commits May 5, 2026 14:35
published_at is always slightly later than BuildTime for the same
artifact (goreleaser publishes the release seconds after building),
so the time-based comparison always fired -> false "update available"
for the very release the user just installed.

Switch to comparing constant.GitRevision against the commit SHA the
release tag points at (GET /commits/{tag}). Bare `go build` (no
revision injected) and GitHub fetch failures stay conservative -> no
spurious prompts; user can --force.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The home page previously only surfaced instantaneous rates, so there
was no way to answer "how much has this node moved in the last N
hours". Add two new KPI strips driven by the existing time-window
selector:

- windowed: total in/out (trapezoidal integration of the rate series
  already fetched for the throughput chart) + peak in/out
- lifetime: in/out from XraySnapshot + last config reload (relative)

Also add a lifetime-total column to the top-users list (already
available on XrayUser as upload_total + download_total).

Backend: OverviewResp gains last_reload_at (sourced from a new
Config.LastLoadTime accessor over the existing lastLoadTime field).
Boot time is intentionally not duplicated here — settings page
already shows it.

Note on accuracy: windowed totals are computed from bucketed average
rates, so they slightly under-count short bursts; peaks at long
windows (30d → 4h step) are bucket-averaged peaks, not instantaneous.
Good enough for v1; a monotonic cum_in/cum_out column on node_metrics
would make this exact.
The systemd restart kills this process before any "restarting/done"
state can be polled, so the 5-state machine produced UIs stuck on
"Downloading" while the update actually succeeded. Drop the state
tracking entirely:

- updater.Apply no longer takes onState; runs to completion or returns
  error.
- /api/v1/update/apply is fire-and-forget (HTTP 202); /update/status is
  removed along with JobStatus and updateJob.
- Dashboard polls /api/v1/version every 2s after click; success when
  git_revision changes; 60s timeout surfaces "check journalctl" hint.
- Failure path stays in s.l logger -> journalctl, same as before.

Net -193 lines.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators May 5, 2026
@pull pull Bot added the ⤵️ pull label May 5, 2026
@pull pull Bot merged commit 0f174ee into Kiterepo:master May 5, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant