Move the Git checkout choice onto the Git status row - #159
Conversation
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.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThe Git checkout strategy selector moved from the turn-settings picker to the Git status row. Draft repository threads can select ChangesGit checkout strategy
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The UI change is merge-ready after normal checks; no actionable merge-blocking risk remains. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
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:
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-labelnames the control, since the row has no room for a visible label. The options are namedSharedandWorktreerather than the sentences they were.Consequences
· Worktree. The choice has its own control a hand's width away, and one fact belongs in one place.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 fullcargo testsuite are green.giskard-server-replayUI 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.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 Playwright spec is updated to drive the select directly; it needs Docker, so CI is its first real run.
Known limitation
The
titlehalf 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.mdsays so rather than implying the tooltip is always available.Generated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes
Documentation