Skip to content

Fixed issue#249

Merged
Jordonbc merged 3 commits into
Devfrom
Fix-New-Branch-Checkout
May 8, 2026
Merged

Fixed issue#249
Jordonbc merged 3 commits into
Devfrom
Fix-New-Branch-Checkout

Conversation

@Jordonbc
Copy link
Copy Markdown
Collaborator

@Jordonbc Jordonbc commented May 8, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Based on my review of all changed files and the surrounding codebase context, here are my findings.


No blocking or important issues were found.

The PR correctly removes the global "checkout new branches after create" setting from the settings UI (settings.html, settings.ts, settingsGeneral.ts, and corresponding tests) while preserving:

  • The per-dialog checkout toggle in newBranch.html (which remains functional)
  • The backend field checkout_new_branch in AppConfig with its #[serde(default)]true behavior
  • The loadCheckoutDefault function in newBranch.ts that reads the backend value

Since collectGeneralSettings no longer serializes checkout_new_branch, the backend always receives a missing field and defaults it to true via serde — which matches the documented behavior ("checkout toggle in the Create Branch dialog; enabled by default"). The added test in newBranch.test.ts correctly verifies the checkout value flows through to vcs_create_branch.

The removed settings form element no longer has orphaned references in the codebase. The docs change in Features.md accurately reflects the new UX.

New%20session%20-%202026-05-08T06%3A50%3A12.379Z
opencode session  |  github run

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

No blocking or important issues found.

Minor: loadCheckoutDefault in newBranch.ts:58 retains an async keyword with no await expression after the get_global_settings call was removed. The function body is now fully synchronous (checkoutEl.checked = true). The async has no runtime effect since callers use void, but it misleadingly suggests async behavior and may violate lint rules. Remove the async keyword. Confidence: High.

New%20session%20-%202026-05-08T07%3A05%3A50.056Z
opencode session  |  github run

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

No blocking or important issues were found.

The PR cleanly removes the global "checkout new branches after create" setting from both frontend and backend, simplifying the behavior to always default the per-dialog checkbox to checked. All references are correctly cleaned up: the General struct field, the settings HTML element, the collectGeneralSettings/loadGeneralSettingsIntoForm handlers, the types.d.ts type, the restore-defaults path in settings.ts, the loadCheckoutDefault function (now synchronous with async removed), and the docs. Tests are updated to match. The remaining uses of default_true() in settings.rs are for other fields and unaffected.

New%20session%20-%202026-05-08T07%3A45%3A49.826Z
opencode session  |  github run

@Jordonbc Jordonbc merged commit dc23d38 into Dev May 8, 2026
7 checks passed
@Jordonbc Jordonbc deleted the Fix-New-Branch-Checkout branch May 8, 2026 07:52
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.

1 participant