feat(ui): add git context to header and title - #14
Merged
Conversation
Add working directory, git branch, and worktree info to the meatcheck UI. Display context in both the HTML <title> and a header bar on the page. The plan includes 2 stages: git context detection using os/exec git commands, and UI display in the header and title with graceful fallback for non-git repos. Extract requirements to docs/requirements/review-ui.md
Detect git repository info at startup (branch, working directory, worktree status) and display it in the HTML title and a new header context bar. The context bar shows branch and directory labels with muted styling. Gracefully degrades to plain "Meatcheck" title when not in a git repo.
Long working directory paths now truncate with ellipsis instead of wrapping or breaking layout. The label stays visible, values shrink with text-overflow.
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's Changed
Adds git context detection (branch, working directory, worktree status) displayed in the HTML
<title>tag and a new header context bar showing branch and directory. Gracefully degrades to plain "Meatcheck" when not in a git repository or git is unavailable.Requirements
Functional Requirements (EARS)
<title>shall include branch name and directory when in a git repo, and be just "Meatcheck" otherwiseAcceptance Criteria
Suggested Review Order
GitContextstruct and addsGit *GitContextfield toReviewModeldetectGitContext()function that detects branch, directory, and worktree status via git subcommandsdetectGitContext()early inRun()and passes result to model<title>to include branch/directory; adds.header-contextdiv with branch and directory display.header-context,.ctx-item,.ctx-label,.ctx-valuewith flex layout, text truncation, and overflow ellipsisdetectGitContext(): in-repo detection, non-git fallback, worktree detection, detached HEAD