Skip to content

feat: the window keeps up with what other programs do to the repository - #16

Merged
FrancescBagur merged 6 commits into
masterfrom
feat/keeps-up
Nov 13, 2026
Merged

FrancescBagur merged 6 commits into
masterfrom
feat/keeps-up

Conversation

@FrancescBagur

Copy link
Copy Markdown
Owner

Stacked on the key file's pull request, which is stacked on the terminal's: it touches what the terminal's says about keeping up. It shows only its own commit while those are open.

What this changes

The window keeps up by itself with what an editor, a terminal or an agent does to the repository in front. Until now it showed what was true when it last read, until somebody pressed the reload button.

What was decided

  • It looks; it is not told. GitKraken has the system watch every folder of the working tree, waits two seconds for the events to stop, and reads again the part they were about -- and has three messages for a watcher that would not start, that ran out of watches, that heard nothing. Here a thread that is not the one that paints walks the repository the way git status does. No dependency, no limit to run out of in a tree with a target or a node_modules in it, and the same code on all three systems -- against two seconds' wait where a watcher would have waited two seconds anyway.
  • Two seconds while the window is in use, five while it is not, and at once when the window or a tab is come back to. A walk that takes long is made less often, so looking is never more than a twentieth of the time.
  • A pulse, in two halves. One number for what Git keeps (HEAD, the references, the stashes, what is half-done) and one for the working tree (the list of changes and, beside each, when the file was written and which blob is staged, so a file saved a second time is not the same as the first). The tab keeps the pulse of what it shows, read in the same walk as the list it shows.
  • A look that matches does nothing. That is every look that found nothing, and every look that found what the window had just done itself. Otherwise only the half that moved is read: a saved file is the list of changes, and a commit message being written stays where it is; a branch that moved is the whole history, as the button would.
  • Which half is decided when the news arrives, not when it was seen. A look is a moment old by then, and a commit made from the window in that moment would otherwise look like one made behind its back.
  • Only the repository in front, and not a checkout on another machine, where every look is a round trip on a connection the window is using. Its reload button is where it was.

Checked

  • cargo test passes here, not just in CI -- 399, three of them new
  • It was run -- on Linux, on a virtual display: a commit, a new file and a branch made by another program each turned up without the window being touched, at about one part in a hundred of a processor while idle. Not on macOS or Windows
  • Anything that writes (index, stash, branches, remote) or touches the graph layout carries a test -- nothing is written; the pulse has one
  • Commits are signed off (git commit -s) and read as sentences

🤖 Generated with Claude Code

FrancescBagur and others added 5 commits November 12, 2026 20:19
…itory it is in

There is a Terminal button at the end of the action bar and Ctrl+` does
what it does: a panel opens under the graph, between the two side
panels, with a shell in the repository's folder. Each tab has its own.
The bar over it folds the panel, kills the shell or hides it and leaves
the shell running; a shell that exits takes the panel with it. Whether
it was open, and how tall, is remembered.

How it behaves was read out of GitKraken's bundle before any of it was
written -- the three states of the panel, what each button does to the
shell, the context menu, Ctrl+C that copies when something is selected
and interrupts when nothing is, the preferences and their limits. The
preferences are the ones that could be made to act: font size, line
height, cursor style, dimming when unfocused, and which shell.

Three things are here that are not there. The shell is started with the
name, the address and the key of the profile the repository is filed
under, so a commit typed in it is signed the way one made with the
button would be. A checkout on another machine gets a shell on that
machine, over ssh, in its folder. And since nothing here watches the
disk, the repository is looked at again once the shell has gone quiet,
and reloaded only if something moved -- a commit typed in the panel
turns up in the graph by itself.

The emulator is alacritty_terminal, eleven crates. A terminal that is
nearly right is one where vim and an interactive rebase are nearly
usable, and this one also brings the Windows pty. What is drawn is
drawn here: Fira Mono, bold by striking twice since there is only the
regular weight, and the box-drawing and block characters by hand, as
the font's own do not reach from one row to the next.

Not there: GitKraken's autocomplete suggestions, a choice of typeface,
and any letter the two bundled fonts lack. The profile is read when the
shell starts, so changing it applies to the next shell.

Run on Linux, on a virtual display. Read out of the code and not seen
on macOS or Windows, and the shell on another machine has not been
opened against one -- only the command it sends was tried, locally.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
A checkout on another machine could be reached with a password, with
the profile's key or through the agent. A server that hands out a .pem
is none of the three: the key is in a file of its own, belongs to no
profile and has never been near the agent.

The box for a remote checkout has a line for that file now, with the
desktop's chooser beside it. With a key named, the secret next to it is
that key's passphrase and the box says so; with none it is the password
it always was. A key that was named is that key and nothing after it --
a profile's key falls back to the agent because nobody chose it for
this server, and this one was chosen.

Where the key is gets remembered beside the checkout, as a fifth field
on its line in the settings, so Reconnect and the terminal knock with
it too. The passphrase is remembered nowhere: a key that has one is
reopened from the box, and in the terminal ssh asks for it itself. A
checkout is now remembered by where it is and not by how it was
reached, so opening it again with another key replaces the line
instead of adding one.

Two things said before they go wrong. A key file that is not there is
reported before anything is asked of the network, in those words and
not in libssh2's about the format of keys. And a key other people on
the machine can read -- which is how a downloaded .pem arrives -- opens
the checkout here but is refused by ssh in the terminal, so the box
says which chmod it wants.

Tried against an OpenSSH server in a container: an RSA key in the PEM
envelope with a passphrase and one without, a wrong passphrase, none,
a file that is not there; then in the window, on a virtual display,
the box, the saved checkout, Reconnect and the shell on that machine.
The test that goes with it starts its own sshd and so runs in CI and
not on a desk without one; it has not run yet. The chooser button was
not pressed -- it is the one the profiles already use.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
A repository is not only changed from here. An editor saves a file, a
terminal makes a commit, an agent does both for an hour, and the window
went on showing what was true when it last read until somebody pressed
the reload button -- which takes knowing it is stale.

GitKraken is told by the system: every folder of the working tree is
watched, it waits two seconds for the events to stop and reads again
the part they were about. That comes with three messages of its own,
for a watcher that would not start, that ran out of watches, that heard
nothing. This looks instead. A thread that is not the one that paints
walks the repository in front the way `git status` does, every two
seconds while the window is the one in use, every five while it is
not, and at once when the window or a tab is come back to. A walk that
takes long is made less often, so looking is never more than a
twentieth of the time.

What a look gives is a pulse: two numbers, one for what Git keeps --
HEAD, the references, the stashes, what is half-done -- and one for the
working tree, which is the list of changes and, beside each, when the
file was written and which blob is staged, so a file saved a second
time is not the same as the first. The tab keeps the pulse of what it
is showing, read in the same walk as the list it shows. A look that
matches it does nothing at all, which is every look that found nothing
and every look that found what the window had just done itself.
Otherwise only the half that moved is read again: a saved file is the
list of changes and the message being written stays where it is; a
branch that moved is the whole history, as the button would.

No dependency, no limit to run out of, the same on all three systems.
Only the repository in front -- the others are looked at when they are
brought forward -- and not a checkout on another machine, where a look
is a round trip on a connection the window is using.

Run on Linux, on a virtual display: a commit, a new file and a branch
made by another program each turned up without the window being
touched, at about one part in a hundred of a processor while idle.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
The terminal went into master squashed, so this branch and master each
carry it under a different name and Git reads the same lines as a clash.
Nothing is taken from either side: master's tree is the tree of the
terminal commit this branch already stands on.

Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
Base automatically changed from feat/remote-key to master November 13, 2026 06:59
The key file went into master squashed, as the terminal did before it,
so this branch and master each carry both under different names and Git
reads the same lines as a clash. Nothing is taken from either side:
master's tree is the tree of the key commit this branch already stands
on.

Signed-off-by: Francesc <francesc.bagur@coffeesoftware.io>
@FrancescBagur
FrancescBagur merged commit b019aa9 into master Nov 13, 2026
3 checks passed
@FrancescBagur
FrancescBagur deleted the feat/keeps-up branch November 13, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant