Skip to content

[leas code] Simplify boolean guards - #13401

Merged
nwparker merged 5 commits into
mainfrom
nwparker/leas-code-modern-booleans
Aug 10, 2026
Merged

nwparker merged 5 commits into
mainfrom
nwparker/leas-code-modern-booleans

Conversation

@nwparker

@nwparker nwparker commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Replace five multi-branch boolean helpers with equivalent direct predicates, remove comments that repeated the implementation, and preserve short-circuit order and strict connectionId semantics. Net reduction: 34 lines.

Stacked on #13400, which is now merged.

Screenshots

No visual change.

Testing

  • pnpm lint
  • pnpm typecheck:web
  • Five focused Vitest files (41 tests)
  • pnpm test
  • pnpm build
  • Added or updated high-quality tests that would catch regressions, or explained why tests were not needed
  • pnpm run check:code-quality:changed
  • Commit-time oxlint, React Doctor, and formatting checks

AI Review Report

The review compared each direct predicate with the removed branch implementation, including nullish values, short-circuit order, and strict connection-ID equality. It also checked macOS, Linux, and Windows behavior: the existing platform predicates and Windows PTY gate remain unchanged, and the PR changes no shortcuts, labels, paths, shell commands, SSH behavior, folder-workspace behavior, or Electron platform boundaries.

Security Audit

No command execution, path handling, authentication, secrets, dependencies, IPC, or external input handling changed. The simplified predicates retain the same authorization-neutral visibility and activity decisions as their previous implementations.

Notes

No new platform-specific behavior. The cleanup is intentionally semantics-preserving.

@nwparker
nwparker changed the base branch from nwparker/leas-code to main August 10, 2026 01:30
@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Five renderer predicates now return combined boolean expressions instead of using sequential early returns. The changes cover activity visibility, active terminal repair, workspace Enter suppression, native Windows PTY eligibility, and active Git status consumer detection. Function signatures and observable conditions remain unchanged.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Title check ✅ Passed The title clearly identifies the main change, although the leading bracketed text is unnecessary.
Description check ✅ Passed The description covers the required summary, screenshots, testing, AI review, security audit, and platform notes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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.

@nwparker
nwparker merged commit 8a33ce2 into main Aug 10, 2026
44 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* refactor: remove unreachable code

* refactor: simplify boolean guards
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