Skip to content

allow editing sandbox prompt rules#38

Open
bnii wants to merge 3 commits into
carderne:mainfrom
bnii:main
Open

allow editing sandbox prompt rules#38
bnii wants to merge 3 commits into
carderne:mainfrom
bnii:main

Conversation

@bnii

@bnii bnii commented May 7, 2026

Copy link
Copy Markdown

Adds an editable rule field to sandbox permission prompts (claude code like)

When a read/write/domain permission prompt appears, pressing tab on an
allow option lets the user adjust the rule before granting it. This makes
it possible to add broader patterns

Edited rules are validated against the domain/path before being applied.

pis

@bnii bnii marked this pull request as ready for review May 7, 2026 11:41
Copilot AI review requested due to automatic review settings May 7, 2026 11:41

Copilot AI 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.

Pull request overview

Adds an “edit rule” workflow to sandbox permission prompts so users can adjust the domain/path rule before granting access, with validation to ensure the edited rule still matches the blocked domain/path.

Changes:

  • Extends permission prompt handling to return both the chosen scope (session/project/global/abort) and the (possibly edited) rule value.
  • Adds inline editing UI (Tab to edit) for allow options, including validation feedback.
  • Applies the edited rule value when persisting/updating allowlists and updates related user-facing messages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.ts Outdated
Comment thread index.ts

Copilot AI 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.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

@carderne

carderne commented May 7, 2026

Copy link
Copy Markdown
Owner

Hi @bnii this is a really nice change, but I'm a bit averse to accepting such big changes until I've refactored the codebase to the point it's a bit more maintainable. It's purely because (a) I don't spend much time on this and (b) I'd much rather the project stagnates than accidentally ship vulnerabilities. I'll leave this here for a bit, and if I get the time to either do the refactor (really just splitting out files a bit) or review it then I'll let you know.

@bnii

bnii commented May 7, 2026

Copy link
Copy Markdown
Author

Hi @bnii this is a really nice change, but I'm a bit averse to accepting such big changes until I've refactored the codebase to the point it's a bit more maintainable. It's purely because (a) I don't spend much time on this and (b) I'd much rather the project stagnates than accidentally ship vulnerabilities. I'll leave this here for a bit, and if I get the time to either do the refactor (really just splitting out files a bit) or review it then I'll let you know.

makes sense, thanks!

@unrelentingfox

Copy link
Copy Markdown
Contributor

Really great change.

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.

4 participants