Skip to content

Move the Git checkout choice onto the Git status row - #159

Merged
marmeladema merged 1 commit into
mainfrom
claude/git-info-ui-design-54ikod
Aug 15, 2026
Merged

Move the Git checkout choice onto the Git status row#159
marmeladema merged 1 commit into
mainfrom
claude/git-info-ui-design-54ikod

Conversation

@marmeladema

@marmeladema marmeladema commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Where a thread's working tree comes from was filed in the mode-and-permission popover, under a control whose own title reads "Mode & permission preset for this thread". It is neither, and that popover is closed by default — so a one-time, irreversible choice was invisible until you happened to open a card about something else.

It now sits on the Git status row above the composer:

▸ ⑂ main │ 1 +1 −0                    [Worktree ▾]  Review all  ⟳
  Your 1 uncommitted change stays in the project's checkout.

That row is the right home because it describes the very tree the choice changes — the branch a worktree would start from, and the changed files it would leave behind.

Where the explanation goes

It splits along the line that matters, because the two halves are needed at different moments.

What the option is"Starts from the last commit, on a branch of its own" — is the select's title. The row is 27px of small chips with no width for a sentence, and this half is orientation rather than warning.

What it would cost"Your 1 uncommitted change stays in the project's checkout" — is printed on a line under the row. It is the fact needed before sending, and a tooltip cannot be read on a phone. It appears only when something is genuinely at stake, so a clean tree or a shared checkout leaves the row quiet rather than making the line into furniture the eye learns to skip. It is a polite live region, and it is emptied rather than merely hidden: text left behind would be announced again the next time the row returned, describing a decision no longer on the table.

aria-label names the control, since the row has no room for a visible label. The options are named Shared and Worktree rather than the sentences they were.

Consequences

  • The turn chip stops appending · Worktree. The choice has its own control a hand's width away, and one fact belongs in one place.
  • A workspace that is not a Git repository has no status row, so it has no dropdown and no "nothing to branch from" text either. There was no choice to make in that case, and the control is absent rather than shown dead.

Also fixed

A grammar bug the move made visible: the sentence pluralised the noun but not the verb, so a single change read "1 uncommitted change stay in the project's checkout" — at exactly the moment it is asking to be trusted about what it drops.

Verification

  • cargo fmt --check, cargo clippy --all-targets -- -D warnings, and the full cargo test suite are green.
  • Driven against the running giskard-server-replay UI at 1100px and 390px, with identical behaviour at both — which was the point of printing the cost rather than hovering it. Checked: control visible and enabled on a draft, tooltip tracking the selection, warning appearing only for a worktree over a dirty tree, warning emptied when the choice is taken back, control gone once the thread exists while the Git row stays, no console errors, no horizontal overflow.
  • New assertions are mutation-tested. One of them initially survived its mutation — source.contains("warning.textContent = cost;") still matched when a guard was prepended, which is precisely the regression that would leave a stale warning on screen — so it now pins the adjacent statements, and the e2e spec asserts the clearing as behaviour rather than as source text.
  • The README screenshots are unaffected and not regenerated: the generator captures an open thread, where this control is absent by design.

The Playwright spec is updated to drive the select directly; it needs Docker, so CI is its first real run.

Known limitation

The title half is unreachable by touch. That is a deliberate trade for keeping the row uncluttered, and it is why the cost half is printed rather than hovered — the warning, which is the part that matters before sending, is readable everywhere. docs/git-worktrees.md says so rather than implying the tooltip is always available.


Generated by Claude Code

Summary by CodeRabbit

  • New Features

    • Added a Git checkout selector directly to the Git status row for draft threads.
    • Choose between Shared and Worktree checkout strategies.
    • Added guidance and warnings when uncommitted changes may remain behind.
  • Bug Fixes

    • Invalid checkout selections now safely default to Shared.
    • Checkout controls are hidden for non-Git projects and after thread creation.
  • Documentation

    • Updated Quick Start and Git worktree documentation with the revised workflow.

Where a thread's working tree comes from was filed in the mode and
permission popover, under a control whose own title reads "Mode &
permission preset for this thread". It is neither, and that popover is
closed by default, so a one-time and irreversible choice was invisible
until you happened to open a card about something else.

It now sits on the Git status row above the composer, as a dropdown
reading Shared or Worktree. That row is the right home because it
describes the very tree the choice changes: the branch a worktree would
start from, and the changed files it would leave behind.

The explanation splits along the line that matters, because its two
halves are needed at different moments:

* What the option *is* -- "starts from the last commit, on a branch of
  its own" -- is the select's `title`. The row is 27px of small chips
  with no width for a sentence, and this half is orientation rather than
  warning.
* What it would *cost* -- "your 1 uncommitted change stays in the
  project's checkout" -- is printed on a line under the row. It is the
  fact needed before sending, and a tooltip cannot be read on a phone.
  The line appears only when something is genuinely at stake, so a clean
  tree or a shared checkout leaves the row quiet rather than making it
  furniture the eye learns to skip. It is a polite live region, and it is
  emptied rather than merely hidden: text left behind would be announced
  again the next time the row returned, describing a decision no longer
  on the table.

`aria-label` names the control, since the row has no room for a visible
label. The option names are "Shared" and "Worktree" -- names rather than
the sentences they were.

Two consequences fall out:

* The turn chip stops appending "- Worktree". The choice has its own
  control a hand's width away, and one fact belongs in one place.
* A workspace that is not a repository has no Git row, so it has no
  dropdown and no "nothing to branch from" text either. There was no
  choice to make in that case, and the control is absent rather than
  shown dead.

Also fixes a grammar bug the move made visible: the sentence pluralised
the noun but not the verb, so a single change read "1 uncommitted change
stay in the project's checkout" at exactly the moment it is asking to be
trusted about what it drops.

The README's screenshots are unaffected -- they capture an open thread,
where this control is absent by design -- so they are not regenerated.
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: f734b5e9-0db9-47d4-80df-2ee15de0cd83

📥 Commits

Reviewing files that changed from the base of the PR and between 9786044 and 89d7818.

📒 Files selected for processing (7)
  • README.md
  • crates/giskard-server/static/app.css
  • crates/giskard-server/static/app.js
  • crates/giskard-server/static/index.html
  • crates/giskard-server/tests/ui.rs
  • docs/git-worktrees.md
  • tests/e2e/tests/worktree.spec.ts

📝 Walkthrough

Walkthrough

The Git checkout strategy selector moved from the turn-settings picker to the Git status row. Draft repository threads can select Shared or Worktree, with strategy guidance and warnings for uncommitted changes. Tests and documentation now cover the new behavior.

Changes

Git checkout strategy

Layer / File(s) Summary
Git row control and presentation
crates/giskard-server/static/index.html, crates/giskard-server/static/app.css
The Git row now contains the checkout selector and live warning region. The former picker control and full-width styling were removed.
Strategy validation and warning behavior
crates/giskard-server/static/app.js
The client accepts shared and worktree, defaults invalid values to shared, limits the control to repository-backed drafts, and displays dirty-worktree warnings.
Behavior coverage and usage documentation
crates/giskard-server/tests/ui.rs, tests/e2e/tests/worktree.spec.ts, README.md, docs/git-worktrees.md
Tests and documentation now cover row placement, guidance, warnings, draft reset behavior, validation, and checkout effects.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 89d78

The UI change is merge-ready after normal checks; no actionable merge-blocking risk remains.

Possibly related PRs

Suggested reviewers: claude

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: moving the Git checkout choice to the Git status row.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/git-info-ui-design-54ikod

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@marmeladema
marmeladema merged commit ffb6420 into main Aug 15, 2026
5 checks passed
@marmeladema
marmeladema deleted the claude/git-info-ui-design-54ikod branch August 15, 2026 17: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.

2 participants