Repository navigation
feat(git-history): page the commit log; hide the mobile reconnect action when healthy - #1664
Merged
Merged
Conversation
The phone's machine page called the row 「定时任务设置」 while the desktop already calls it 「定时任务」 everywhere (rail, remote peer page, page title). Drop the suffix so both read the same, and update the harness cases, the screenshot scenarios and the docs that matched on the old label.
… end The device sheet always drew its "Reconnect all" under the status line, so a phone whose machines were all connected still opened onto a button that reads as a fault report. Nothing there needs pressing: the transport retries on its own (1s-30s backoff, then a quiet retry every five minutes), returning to the foreground and the network coming back recover every runtime, the 15s presence watchdog revives a socket that went quiet, and the machines the sheet is not reading are rebuilt every 60s. `reconnectable` now excludes the "up" state, so the action appears exactly when there is something to reach: a machine down, a machine held by another device, a failure to retry, or a pairing to drop. A single machine in standby is not green, so taking it back keeps its action.
The sheet no longer draws "Reconnect all" under a status line that says every machine is connected, so the two READMEs stop implying the action is always there.
The history was one bounded read — `COMMIT_LIMIT = 200` — and both views printed "the oldest commits are not shown" under the last row with nothing to press. A repository with a real history therefore ended mid-scroll with no way further back. `list` now takes a `skip` and answers one page from there. The log is still read from the top of the history and cut to the page afterwards rather than asked for with `--skip`: a row's lanes are what the rows above it left behind, so a page laid out on its own would start every line of work at column 0 and the picture would break at the seam. `pages_concatenate_into_ the_single_page_drawing` pins that by paging a merge fixture two commits at a time and comparing the result with the one-page drawing. The read is bounded by `SKIP_CEILING` (20 000), which is what keeps a deep page from reading and laying out the whole history. The phone appends a page when the list reaches its end (with a footer button as the same request for a screen reader), and the desktop's panel appends on a button of its own; both dedupe by sha, because a commit landed between two reads shifts the page's start. A host or peer that predates paging answers the second request with the first page again — nothing new, `truncated` still true — so the client stops there and keeps the old "not shown" line instead of offering a button that cannot advance. The request carries the offset in the protocol's existing `offset` field; `git_graph_v1` is unchanged, since an older client simply never sends it.
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.
What
The git-history views could not go past 200 commits, the phone's device sheet always offered a "Reconnect all" action even when every machine was connected, and the phone named its scheduled-tasks row differently from the desktop. This branch makes the history page, hides the reconnect action when there is nothing to reach, and aligns the label.
Commits
Verification
Run locally on the branch tip (
a6abe186d), pinned toolchain 1.99.1:cargo fmt --all -- --check— cleancargo check -p future-host— cleancargo test -p future-host --lib— 2336 passed, 0 failed, 15 ignored (451s)cargo check -p futureos(desktopsrc-tauri) — cleannpx tsc --noEmitclean;npx eslinton the 5 changed files clean;npx vitest run src/features/git-history src/features/remote-peer— 997 passednpm run typecheckclean;npx eslinton the 8 changed files clean;npx jest --runInBandon the 3 touched suites — 53 passedmake check-docs— 425 docs OK, channel matrix 13 rows OKUser-visible changes
9ad50c8ee.cfc6f5c8a.049a74144.Notes
offsetfield oflist_git_commits, andgit_graph_v1is untouched, so an older client never sends an offset and an older host answers every request with the first page.git log --skip, because a row's lanes depend on the rows above it; paging that way is what keeps the drawing continuous at the seam.