adds claude-generated commit messages and a recent commits panel to the git view - adds log tailing in the explorer, branch merging and a clean up button
This commit is contained in:
+22
-10
@@ -48,20 +48,21 @@ The title-bar panel toggle group now reads `Git N · Schema · Explorer · File
|
||||
|
||||
## Screen: Git view (full screen)
|
||||
|
||||
A `position: fixed; inset: 0` layer, `z-index: 44`, background `#101720`, min-width 900px, laid out as a flex column. It sits above the app shell and below the file diff overlay (45), context menu (60/61), modal (70) and toast (80). This lets the confirm modals and the commit menu appear on top of it.
|
||||
A `position: fixed; inset: 0` layer, `z-index: 44`, background `#101720`, min-width 900px, laid out as a flex column. It sits above the app shell and below the file diff overlay (45), context menu (60/61), modal (70) and toast (80). This lets the confirm modals and the context menus appear on top of it.
|
||||
|
||||
From top to bottom:
|
||||
|
||||
### 1. Top bar — 44px
|
||||
- Background `#18202B`, bottom border `1px #232C39`, padding `0 14px`, flex row, gap 14px, items centred.
|
||||
- Background `#18202B`, bottom border `1px #232C39`, padding `0 14px` (left: the traffic-light inset, 14px in full screen), flex row, gap 14px, items centred.
|
||||
- **`[ GIT ]`**: Plex Mono 700, 11px, letter-spacing .14em, uppercase, `#828D9A`.
|
||||
- **Branch**: Lucide `git-branch` icon at 13px, then the branch name. Plex Mono 500, 12px, `#E8913A`, truncated with an ellipsis.
|
||||
- **Sync label**: Plex Mono 400, 12px, `#828D9A`. Text is `2 behind origin`, `1 ahead · 2 behind origin`, or `in sync with origin`.
|
||||
- A flex spacer, then three buttons, each 28px tall:
|
||||
- A flex spacer, then four buttons, each 28px tall:
|
||||
- Shared style: padding `0 11px`, border `1px #232C39`, radius 2px, transparent background, Plex Sans 500 12px `#BAC0C0`, icon 14px, gap 7px.
|
||||
- Hover: text `#F4F5F4`, border `#3A424C`.
|
||||
- **Pull**: icon `arrow-down-to-line`, label `Pull` (`Pulling…` while busy), then the count `↓2` in Plex Mono 600 11px `#E8913A`. The count is hidden when 0.
|
||||
- **Push**: icon `arrow-up-from-line`, label `Push` (`Pushing…` while busy), then the count `↑1` in the same amber style.
|
||||
- **Clean up** (native build only): icon `eraser`, label `Clean up`, no count. Disabled (40% opacity, default cursor) when nothing is unstaged or untracked, during a merge conflict, or while a pull or push runs.
|
||||
- **Close**: icon `minimize-2`, label `Close`, then the key hint `⌘G` in amber mono 11px.
|
||||
|
||||
### 2. Commit block
|
||||
@@ -71,15 +72,15 @@ From top to bottom:
|
||||
- Padding `14px 16px`, Plex Mono 400, 14px / 1.6, colour `#F4F5F4`, caret `#E8913A`.
|
||||
- Placeholder: `Commit message`. The field gets focus when the Git view opens.
|
||||
- **Footer row**: 52px tall, padding `0 14px 0 16px`, gap 16px.
|
||||
- **Gen. Commit Message** (small secondary), first on the left: 32px tall, padding `0 12px`, radius 2px, a `1px #232C39` border, the pass-on spark glyph (12px, stroke) then the label in the commit-button type, text `#BAC0C0`; hover fills `#1E2733` and turns glyph and text `#F4F5F4`. While it runs the label reads `Generating…`. Disabled (40% opacity, default cursor, no clicks) when nothing is staged or while it runs. A click sends the staged diff to the Claude CLI and puts its one-line answer in the message field (replacing the draft, lowercased like typed text) and focuses the field; a failure toasts `Couldn't generate a commit message` with the reason (`claude not found`, the CLI's first error line, `timed out`). Native build only.
|
||||
- Author `Jonathan van Rij <jonathan@blijnder.nl>` in Plex Mono 12px `#828D9A`. In the real build, read this from `git config user.name` and `user.email`.
|
||||
- Hint `⌘↵ commits` in Plex Mono 12px `#6C7783`.
|
||||
- A spacer, then a **split button**, radius 2px, 32px tall:
|
||||
- Main part: min-width 160px, padding `0 18px`, Plex Sans 600 13px.
|
||||
- Label: `Commit N file(s)`, or `Nothing staged` when nothing is staged.
|
||||
- Ready state (≥1 staged file **and** a non-empty message): background `#E8913A`, text `#101720`.
|
||||
- Otherwise: background `#232C39`, text `#828D9A`. It stays clickable, so git's own error appears in the console.
|
||||
- Caret part: 32×32px, `chevron-down` icon at 14px, separated from the main part by a `1px #101720` left border. It opens a context menu with `Commit` (icon `check`) and **`Commit and push`** (icon `arrow-up-from-line`, bold).
|
||||
- Hover on either part: `filter: brightness(.92)`. (Real build: use amber-deep `#C4741F` instead, per Kade.)
|
||||
- A spacer, then **three buttons** side by side, gap 8px, each radius 2px, 32px tall, padding `0 18px`, Plex Sans 600 13px:
|
||||
- **Add, Stage & Commit** (secondary), on the left: the same look as Commit. Stages every unstaged path with `git add -- <paths>`, then commits without a push. An empty message stages nothing and focuses the message field. Disabled (40% opacity, default cursor, no clicks) with no changes, during a merge conflict, or while a push or pull runs.
|
||||
- **Commit** (secondary): min-width 160px, label `Commit N file(s)`, or `Nothing staged` when nothing is staged. Transparent with a `1px #232C39` border and text `#BAC0C0`; hover fills `#1E2733` and turns the text `#F4F5F4`.
|
||||
- **Commit and push** (primary), on the right. Ready state (≥1 staged file **and** a non-empty message): background `#E8913A`, text `#101720`, hover amber-deep `#C4741F`. Otherwise: background `#232C39`, text `#828D9A`, hover `#202834`. With files staged it stays clickable, so git's own error appears in the console.
|
||||
- Nothing staged: Commit and Commit and push are disabled, 40% opacity, default cursor, clicks do nothing. ⌘↵ still runs `git commit`.
|
||||
- Native build only; the prototype still draws the old split button.
|
||||
|
||||
### 3. File sections (scrolling area, `flex: 1`, padding-bottom 24px)
|
||||
Sections appear in this fixed order, and only when they contain files:
|
||||
@@ -151,6 +152,7 @@ If there are no changes at all, the area shows only: `— No changes. The workin
|
||||
### 5. Bottom strip — 230px, split 50/50
|
||||
- Background `#18202B`, top border `1px #232C39`.
|
||||
- `display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr)`. The left half has a `1px #232C39` right border.
|
||||
- Native build: console and branches each stop at 820px. When at least 260px is left after them, a **commits** list fills the rest behind a `1px #232C39` left border; below that the rest stays empty. Not in the prototype.
|
||||
|
||||
**Left — Console**
|
||||
- **Header**: 32px tall, padding `0 12px 0 16px`.
|
||||
@@ -207,6 +209,15 @@ If there are no changes at all, the area shows only: `— No changes. The workin
|
||||
- Switching to a remote branch with no local branch runs `git switch <name>`, which auto-creates a tracking branch. It logs `branch '<name>' set up to track 'origin/<name>'.` and `Switched to a new branch '<name>'`, then adds the branch to the local list.
|
||||
- After a switch: the title bar, status bar and Git top bar show the new branch; ahead/behind are recalculated; expanded diffs are cleared; a toast reads `Switched to <name>`.
|
||||
|
||||
**Far right — Commits** (native build only)
|
||||
- **Header**: 32px tall, padding `0 16px`, `[ COMMITS ]` in the console header style; right side, the current branch in 12px mono `#828D9A`, ellipsis.
|
||||
- **List**: scrolls, overlay scrollers, padding-bottom 12px. The last 30 commits of HEAD (`git log -n 30`), newest first.
|
||||
- **Commit row**: 28px tall, padding `0 16px`, gap 10px, no hover, default cursor. From left to right:
|
||||
- Short hash: Plex Mono 500 12px amber.
|
||||
- Subject: Plex Mono 12px `#E4E7E6`, one line, ellipsis; it takes the free width.
|
||||
- Right-aligned: `author · 3 h ago` 11px `#6C7783`, the author cut at 140px.
|
||||
- **Empty**: `no commits yet`, or `— no repository`, in 12px mono `#6C7783`, padding `0 16px`.
|
||||
|
||||
---
|
||||
|
||||
## Screen: Schema view (full screen)
|
||||
@@ -332,6 +343,7 @@ Real build: run `php artisan helder:schema` in the project root (respect the pro
|
||||
- ` create mode 100644 <path>` / ` delete mode 100644 <path>` for added and deleted files
|
||||
- After a commit: the message clears, the staged section disappears, ahead increases by 1, and the commit is added to `git log`.
|
||||
- **Commit and push** pushes right after a successful commit.
|
||||
- **Add, Stage & Commit** runs `git add -- <every unstaged path>` first, then the same commit; a failed `add` runs no commit.
|
||||
|
||||
**Push**
|
||||
- Ahead 0: `Everything up-to-date`.
|
||||
|
||||
Reference in New Issue
Block a user