Repository navigation
feat(ui): group history by day - #1011
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
benvinegar
marked this pull request as ready for review
September 6, 2026 23:31
Contributor
Greptile SummaryThis PR redesigns interactive
Confidence Score: 4/5The PR should not merge until large-history viewport jumps are made bounded enough to avoid freezing the interactive log. Jump-to-last and search can load the full history and then invoke a quadratic viewport-fitting loop several times during selection and rendering. Files Needing Attention: packages/hunk/src/ui/log/geometry.ts Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart LR
Input[Keyboard, mouse, search, or refresh] --> Controller[LogController]
Controller --> Load[Load history pages]
Load --> Rows[History graph rows]
Rows --> Geometry[Plan viewport geometry]
Geometry --> Grouped{Graph view enabled?}
Grouped -->|No| Days[Day headings and timeline]
Grouped -->|Yes| Graph[Topology lanes]
Days --> Projection[Responsive row projection]
Graph --> Projection
Projection --> Render[Themed interactive log]
Geometry -. quadratic jump near EOF .-> Controller
Prompt To Fix All With AI### Issue 1
packages/hunk/src/ui/log/geometry.ts:72-73
**Quadratic viewport planning**
When `G` or search loads a large history and moves from an early viewport to a commit near EOF, this loop advances `top` one row at a time while `selectionFits` rescans every remaining row. This makes viewport planning quadratic in the number of commits. Because planning also runs multiple times during selection and rendering, repositories with thousands of commits can freeze the interactive log. Please compute the fitting start directly or limit each scan to the few entries that can fit within `bodyHeight`.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(ui): preserve responsive history con..." | Re-trigger Greptile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Interactive
hunk logused a per-commit topology graph and full author names/dates, which made ordinary chronological browsing busier than GitHub’s grouped commit history. Its content also used only a few generic colors instead of carrying the active Hunk theme through the history surface.Approach
tor View → Theme…HEADref summary when full decorations do not fit, otherwise use a real ellipsis and preserve the closing delimiter--color never,NO_COLOR, and dumb terminalshunk logoutput unchangedExact forge usernames are not always present in offline commit metadata. GitHub noreply addresses use their embedded username; other addresses fall back to the email local part, then the author name.
Visual evidence
Real Hunk TUI, Linux/tmux, 100×20:
A colored Dracula-theme real-TTY run emitted nine distinct active-theme foreground/background SGR roles, including cyan, green, white, and layered grays, and exited cleanly. Reference design: https://glance.sh/0ixtgYKAPiI1Yrg5irfb.png
Validation
bun run typecheckbun run lintbun run deps:checkbun run test— 2,100 passed, 2 skippedbun run test:integration— 153 passed, 1 platform skipbun run test:tty-smoke— 9 passedt, the theme picker, grouped rendering, live resizing, no-wrap SHA placement, narrow timeline preservation, copy hit-testing, and Graph viewOne unrelated note-composer PTY test timed out during an earlier integration run; it passed both an isolated rerun and subsequent complete integration runs. macOS and Windows were not tested locally.
This PR description was generated by Pi using gpt-5.6-sol