Skip to content

Gitty 0.1.6

Choose a tag to compare

@baojie baojie released this 14 Aug 10:48
· 125 commits to master since this release

Added

  • Ctrl+F finds text in whatever the right-hand pane is showing: a
    diff, a file, rendered markdown, an HTML preview, a blame or a file's history.
    Matches are highlighted with the current one picked out; Enter /
    Shift+Enter and the arrows walk them, wrapping at either end;
    Esc closes; the count says where you are. The search reads the
    rendered text, so a phrase is found across markdown's bold and code spans.
    Views that render in chunks render the rest as the strip opens, so the count
    covers the whole file or diff; a collapsed file in a multi-file diff is not
    searched.
  • Ctrl+Shift+C copies as well as Ctrl+C, everywhere in
    the window. In a terminal it takes xterm's own selection instead of reaching
    the shell as an interrupt; in an HTML preview, the selection inside the frame.
    With nothing selected, the key is left alone.
  • Clicking the Gitty brand in the title bar opens an About dialog: the
    version, build time, author, and the Electron, Chromium and Node versions. It
    is drawn by the renderer, so the home-page link opens in the system browser.
  • Whole-file blame is syntax-highlighted like the code viewer, so the lines in
    the blame pane carry the same token colours as the diff and the file.
  • Each blame row shows the date of the commit that last touched the line, read
    through the same time-zone and relative-time settings as the rest of the UI.
  • Markdown source lines, a View setting: each block of a rendered document
    is numbered in the left gutter with the line it starts on in the source.
    Headings, paragraphs, list items, tables, fenced code and images all get one,
    so a passage in the preview can be found in the file. Off by default.

Changed

  • Font size goes from 9 to 20, where it was 11 to 16.
  • Monospace font and Shell are dropdowns rather than text fields.
    Fonts are the monospace families installed on this machine, measured by
    probing; shells come from /etc/shells plus the usual paths, COMSPEC and
    PowerShell on Windows. A stored value the machine no longer offers stays in
    the list.
  • Settings is three tabs — Appearance, View, Session — rather than one column
    that had grown long enough to scroll. The panels stay mounted behind the
    tabs, so every control keeps its state and the dialog is sized by its tallest
    section rather than jumping as you switch. It opens on Appearance each time:
    a short-lived dialog that resumes where it was left is a small puzzle.
  • Browsing a whole repository — the work tree, or a commit's snapshot — starts
    with every directory collapsed, while a list of changes still opens expanded.
    What you expand stays open while that tree is on screen; showing another tree
    starts from the default again.
  • The file tree lists directories before files at every level, so a folder is
    never buried among the names of its siblings.
  • File sorting in Settings: natural (the default) or git's byte order, for
    anyone who wants the tree to match what git ls-files prints.
  • The file tree sorts names naturally. Git orders paths by byte, which puts
    SKILL_W10 between SKILL_W0 and SKILL_W1 and every capital before every
    lowercase letter; the tree reads the digits in a name as a number and treats
    case as a tiebreak. It sorts in one place for all five commands the entries
    come from, by path segment — a whole-string compare could drop a.txt
    between two files in a/, drawing the a/ heading twice.
  • The markdown outline is a resizable panel: drag the line between it and the
    document (it used to be a fixed 210 pixels). The size is shared by every
    document in the repository and lasts as long as the window.
  • Open Repository moved from the right-hand end of the title bar to a +
    beside the repository button, drawn in the accent colour — with one repository
    open it is the control the window still needs to offer.
  • The work tree row's right-click menu offers Browse Working Tree: the
    repository as it is on disk right now, tracked and untracked files alike,
    contents read from the work tree. It used to say Browse Snapshot and open
    the tree at HEAD, omitting uncommitted work. A commit's Browse Snapshot
    still browses that revision.
  • The blame pane's rows now show just the author and a compact date — the SHA
    column is gone. A date from the current year drops the year ("Jul 1"); an
    older one keeps it ("Jan 15, 2025"). The author and date carry the colour the
    SHA used to carry, so adjacent commits are still told apart by hue. The full
    SHA is in the row's tooltip; right-clicking a row copies it.

Fixed

  • Two user-visible strings bypassed the message tables — the lazy-chunk loading
    fallback and the oversized-image notice. Both now read through the tables.
  • Rendered markdown, the code viewer and blame rebuilt their DOM on every state
    change — markdown the whole document on every scroll, the others every line.
    React sets innerHTML whenever the dangerouslySetInnerHTML prop is a different
    object, and a fresh {__html} per render always is; the {__html} is now
    memoised, leaving the nodes alone — which large files feel and which the find
    highlights need to survive.