Skip to content

feat: add a warning message when users enable allow dangerously skip …#485

Merged
bl-ue merged 1 commit intoPiebald-AI:mainfrom
brrock:warning-on-supress-perms-sudo
Feb 7, 2026
Merged

feat: add a warning message when users enable allow dangerously skip …#485
bl-ue merged 1 commit intoPiebald-AI:mainfrom
brrock:warning-on-supress-perms-sudo

Conversation

@brrock
Copy link
Copy Markdown
Contributor

@brrock brrock commented Feb 7, 2026

…permissions in sudo

Summary by CodeRabbit

  • New Features
    • Added security confirmation dialog for the permission bypass setting. When users attempt to enable this sensitive feature, a warning message now appears with explicit guidance. Confirmation requires pressing Enter, while Escape cancels the action.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 7, 2026

📝 Walkthrough

Walkthrough

The change enhances the "Allow bypassing permissions in sudo" setting in MiscView by adding a security confirmation workflow. When toggling the setting on, a warning modal now appears requiring explicit confirmation via Enter key before enabling, while toggling off remains immediate. Disabling shows the warning state conditionally.

Changes

Cohort / File(s) Summary
Security Warning UI for Sudo Permissions
src/ui/components/MiscView.tsx
Adds showSudoWarning state to trigger security warning panel when enabling sudo bypass. Modifies toggle behavior: on → shows warning (requires Enter to confirm); off → disables immediately. Implements conditional rendering between warning card and normal item list. Updates input handling to commit setting or cancel based on Enter/Escape keys.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • bl-ue

Poem

🐰 A warning appears with cautious care,
When sudo's walls might disappear,
Press Enter thrice to cross the gate,
Or Escape if you hesitate,
Security whispers, guards held dear!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a warning message when users enable the 'allow dangerously skip permissions' feature in sudo, which matches the file changes and PR objectives.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

@brrock
Copy link
Copy Markdown
Contributor Author

brrock commented Feb 7, 2026

can i get a review on this please

Copy link
Copy Markdown
Member

@bl-ue bl-ue left a comment

Choose a reason for hiding this comment

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

LGTM! Cool dialog. I'm going to make a few modifications to it after I merge it.

@bl-ue bl-ue merged commit 86c766b into Piebald-AI:main Feb 7, 2026
2 checks passed
@brrock
Copy link
Copy Markdown
Contributor Author

brrock commented Feb 7, 2026

LGTM! Cool dialog. I'm going to make a few modifications to it after I merge it.

Ok nice

@coderabbitai coderabbitai bot mentioned this pull request Feb 7, 2026
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