Skip to content

feat(ADFA-4197): add Check All toggle to Git commit UI#1434

Merged
hal-eisen-adfa merged 4 commits into
stagefrom
ADFA-4197-git-check-all-button
Jun 23, 2026
Merged

feat(ADFA-4197): add Check All toggle to Git commit UI#1434
hal-eisen-adfa merged 4 commits into
stagefrom
ADFA-4197-git-check-all-button

Conversation

@hal-eisen-adfa

@hal-eisen-adfa hal-eisen-adfa commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

Implements ADFA-4197 / #1355 — a user-requested "Check All button for git branch" to make committing a large changeset easier.

Today the Git bottom-sheet lists every changed file with an individual checkbox, all starting unchecked, so committing many files means ticking each one by hand. This adds a single toggle to stage/unstage everything at once, plus a few quality-of-life fixes to the changes list.

Changes

  • Check All / Uncheck All toggle in the branch/PULL header row. Label reads "Check All"; tapping selects every non-conflicted file and flips to "Uncheck All"; tapping again clears the selection. The label tracks selection state, so manually ticking the last box also flips it. Conflicted files (which can't be staged) are excluded.
  • Defaults unchanged — the sheet still opens with everything unchecked.
  • Persistent vertical scrollbar on the changes list so it's clear how much of a long list is off-screen (no longer fades out).
  • Status icons no longer overlap the scrollbar — list content is inset and the scrollbar uses outsideOverlay.
  • Tighter row spacing in the file-change rows.

Files

  • GitFileChangeAdapter.ktselectAll() / clearSelection() / areAllSelected() helpers reusing the existing selection callback.
  • GitBottomSheetFragment.kt — wire the toggle, sync its label, reset after commit, and show it only when there are changes.
  • fragment_git_bottom_sheet.xml — toggle button in the header row; scrollbar attributes on the RecyclerView.
  • item_git_file_change.xml — reduced vertical padding.
  • resources/.../values/strings.xmlcheck_all / uncheck_all.

Testing

  • :app:assembleV8Debug builds clean.
  • Manual on-device verification of the toggle / scrollbar / spacing against a repo with many changed files is still pending.

Adds a Check All / Uncheck All toggle to the Git bottom-sheet so a large
changeset can be staged in one tap instead of ticking each file. The button
sits in the branch/PULL header row and its label tracks selection state.

Also improves the changes list: a persistent vertical scrollbar indicates how
much of a long list is off-screen, content is inset so status icons no longer
overlap the scrollbar, and row spacing is tightened.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.

Tip: disable this comment in your organization's Code Review settings.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f6697af-a53b-4c91-a87e-cbfea5b8e632

📥 Commits

Reviewing files that changed from the base of the PR and between aa2b82d and 673bdd1.

📒 Files selected for processing (3)
  • app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/git/adapter/GitFileChangeAdapter.kt
  • app/src/main/res/layout/item_git_file_change.xml
💤 Files with no reviewable changes (1)
  • app/src/main/res/layout/item_git_file_change.xml
🚧 Files skipped from review as they are similar to previous changes (2)
  • app/src/main/java/com/itsaky/androidide/fragments/git/adapter/GitFileChangeAdapter.kt
  • app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt

📝 Walkthrough
  • New Feature: Added a “Check All” / “Uncheck All” toggle to the Git commit bottom-sheet header to quickly select/deselect all non-conflicted files in a changeset.
  • Dynamic Label & State Sync: Toggle label updates automatically based on selection state (including when selecting files individually) and after commit submission/cleanup.
  • Conflict Handling: Conflicted files are excluded from the toggle behavior since they can’t be staged.
  • UI Improvements: Added a persistent vertical scrollbar to the changes list (using outsideOverlay to prevent overlap), and reduced file-row vertical padding 8dp → 4dp for tighter spacing.
  • Behavior Preservation: Bottom-sheet still opens with all files unchecked by default.
  • Risks / Best-practice checks: Manual device testing is still pending for toggle behavior, scrollbar rendering, and spacing across screen sizes/densities; additionally verify edge cases around control visibility (hidden when not in a Git repo or when there are no eligible non-conflicted files).

Walkthrough

Adds a "Check All / Uncheck All" MaterialButton to the Git bottom sheet toolbar. The adapter gains selectablePaths, areAllSelected(), selectAll(), and clearSelection() APIs that exclude conflicted files. The fragment wires the button's click handler to these APIs and introduces updateCheckAllButton() to keep the button label synchronized with the current selection state.

Changes

Git Check/Uncheck All Selection

Layer / File(s) Summary
Layout and string resources for btnCheckAll
resources/src/main/res/values/strings.xml, app/src/main/res/layout/fragment_git_bottom_sheet.xml, app/src/main/res/layout/item_git_file_change.xml
Adds check_all/uncheck_all string resources; inserts btnCheckAll MaterialButton between the branch name and pull button (initially gone); updates the branch name end constraint; adjusts RecyclerView scrollbar style to outsideOverlay with fading disabled; reduces item row vertical padding from 8dp to 4dp.
Adapter selection APIs
app/src/main/java/com/itsaky/androidide/fragments/git/adapter/GitFileChangeAdapter.kt
Adds selectablePaths (non-conflicted files), areAllSelected(), selectAll(), and clearSelection() to GitFileChangeAdapter; each selection mutator calls notifyItemRangeChanged() and emits onSelectionChanged. Updates onCurrentListChanged() to prune removed items from selectedFiles and emit selection callbacks.
Fragment button wiring and label sync
app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt
Hides btnCheckAll for no-repo and no-changes states, shows it when non-conflicted changes exist; click handler toggles selectAll()/clearSelection() based on areAllSelected(); new updateCheckAllButton() sets label to "Uncheck All" or "Check All" and is called from onSelectionChanged, submitList callback, and post-commit cleanup.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • appdevforall/CodeOnTheGo#1038: Introduced the git status file-list foundation in GitBottomSheetFragment and GitFileChangeAdapter that this PR extends with check-all selection behavior.
  • appdevforall/CodeOnTheGo#1167: Both PRs handle ChangeType.CONFLICTED in the Git bottom sheet — this PR excludes conflicted files from check-all selection logic.
  • appdevforall/CodeOnTheGo#1199: Modified GitFileChangeAdapter selection handling around conflicted files — this PR's selectablePaths and clearSelection() logic builds on the same conflicted-item exclusion pattern.

Suggested reviewers

  • jomen-adfa
  • itsaky-adfa
  • Daniel-ADFA
  • jatezzz

Poem

🐇 A button appeared, so tidy and bright,
"Check All!" it proclaimed, with a toggle so light.
Conflicted files? Not welcome here, dear.
selectablePaths keeps the selection clear.
One click to rule them — all checked or none,
The rabbit hops off, the commit work's done! ✅

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary feature: adding a Check All toggle to the Git commit UI, matching the main change across all modified files.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, detailing the new Check All/Uncheck All toggle feature, quality-of-life improvements, and affected files.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 ADFA-4197-git-check-all-button

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt`:
- Around line 144-154: The btnCheckAll button is set to visible without checking
if there are any selectable (non-conflicted) files available. When
fileChangeAdapter.submitList(allChanges) is called and allChanges contains only
conflicted entries, the button remains visible but selectAll() becomes a no-op
since the adapter excludes conflicted paths. Modify the visibility logic for
btnCheckAll to check whether there are any non-conflicted files available before
setting it to visible, or disable the button when there are no selectable items.
Apply this fix at all three locations mentioned (the initial section around line
144-154 and the additional sections at 195-202 and 303-308).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 13556d33-bf2e-4a4c-8ab6-a3694c762e0c

📥 Commits

Reviewing files that changed from the base of the PR and between 8917fca and 86538cf.

📒 Files selected for processing (5)
  • app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt
  • app/src/main/java/com/itsaky/androidide/fragments/git/adapter/GitFileChangeAdapter.kt
  • app/src/main/res/layout/fragment_git_bottom_sheet.xml
  • app/src/main/res/layout/item_git_file_change.xml
  • resources/src/main/res/values/strings.xml

Comment thread app/src/main/java/com/itsaky/androidide/fragments/git/GitBottomSheetFragment.kt Outdated
@hal-eisen-adfa hal-eisen-adfa requested a review from a team June 23, 2026 06:58
@hal-eisen-adfa hal-eisen-adfa merged commit 9e1d5b8 into stage Jun 23, 2026
2 checks passed
@hal-eisen-adfa hal-eisen-adfa deleted the ADFA-4197-git-check-all-button branch June 23, 2026 22:48
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