Skip to content

Commit 8286fc8

Browse files
dede999alanpeixinhoAndré Luiz Abdalla Silveira
authored
feat: commit plotting mechanism update (#1854)
* fix: optimize TreeCommitHistory endpoint and add tree commits list view * Improve query performance for commit history * Include platform filter on query to speedup plot on hardware page * Add TreeCommitsListView and type models * Update frontend API and CommitNavigationGraph * Include tree_name and git_url on frontend requests * feat: add sliding window state and data accumulation for commit history Introduce a commit buffer that accumulates data from the backend and a sliding window of 4 commits over it. When the user navigates past the buffer boundary, a new fetch is triggered using the oldest known commit as anchor, and results are merged with deduplication. Navigation callbacks (goOlder, goNewer, goOldest, goNewest) are wired but not yet exposed in the UI — buttons come in the next commit. * feat: add navigation buttons to commit history graph (#1840) Add first/prev/next/last buttons below the commit history chart, allowing users to navigate through older commits one at a time. Uses MdFirstPage, MdArrowBackIos, MdArrowForwardIos, MdLastPage icons consistent with existing pagination controls. * fix: prevent chart flash and stuck navigation on older page fetch (#1840) When navigating past the initial 6-commit batch, the graph would flash back to the newest commits and get stuck because: 1. Changing the fetch anchor reset the TanStack Query status to 'pending', causing QuerySwitcher to replace the chart with a loading skeleton — even though we had buffered data to display. 2. setWindowEnd was called inside setAllCommits's updater function, which is a side effect in a pure function with undefined behavior in React, leading to inconsistent window positioning after merge. 3. Two competing effects (merge + init) both set windowEnd, creating race conditions on the window position. Refactored to: use a ref mirror (allCommitsRef) for synchronous buffer access, a single merge effect that handles both initial load and subsequent merges, and an effectiveStatus that keeps the chart visible during background fetches. Navigation buttons are disabled while a fetch is in flight to prevent double-triggers. * feat: Using the new endpoint to navigate pages using commits list * Uses new endpoint parametrized by commits list * aggregate tab specific logic into single structure Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi> --------- Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi> Co-authored-by: Alan Peixinho <alanpeixinho81@gmail.com> Co-authored-by: André Luiz Abdalla Silveira <andre.luiz.as@profusion.mobi>
1 parent 4e2dc1a commit 8286fc8

3 files changed

Lines changed: 342 additions & 196 deletions

File tree

0 commit comments

Comments
 (0)