GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(tui): full-auto permission mode, and classify local dev servers separately by Vasanthdev2004 · Pull Request #883 · Twigpine/zero

feat(tui): full-auto permission mode, and classify local dev servers separately #883

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
kevincodex1 merged 32 commits into main from split/permission-mode-and-classifier
Nov 24, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

feat(tui): full-auto permission mode, and classify local dev servers separately #883

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1bcb2bf
feat(tui): put unsafe mode in the shift+tab cycle behind a confirm key
Vasanthdev2004 Aug 8, 2026
eda9f30
fix(sandbox): stop classifying local dev servers as network egress
Vasanthdev2004 Aug 8, 2026
dbdd281
refactor: rename the unsafe permission mode to full-auto
Vasanthdev2004 Aug 8, 2026
f608752
fix: keep the old permission-mode constant names as deprecated aliases
Vasanthdev2004 Aug 8, 2026
874db9f
fix: make the full-auto rename reach the values that travel as data
Vasanthdev2004 Aug 9, 2026
30459e1
test(tui): move the plan-mode guard onto advancePermissionMode
Vasanthdev2004 Aug 10, 2026
54613e4
fix(sandbox,cli,tui): keep serving commands gated, and accept the can…
Vasanthdev2004 Aug 11, 2026
714ce64
fix(tui): cancel the full-auto offer when the terminal loses focus
Vasanthdev2004 Aug 19, 2026
1cc95f3
fix(sandbox,tui,cli): close the unparseable network gap and the defer…
Vasanthdev2004 Aug 20, 2026
b75e7cb
fix(tui,sandbox): cancel the offer on a streaming partial, and derive…
Vasanthdev2004 Aug 21, 2026
677b3f0
fix(sandbox): a flagged invocation classifies like its unflagged self…
gnanam1990 Aug 24, 2026
32c3527
fix(sandbox): keep framework builds under the network gate
Vasanthdev2004 Sep 12, 2026
f87a0af
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Sep 12, 2026
3b52175
fix(tui): keep the full-auto offer visible before ctrl+g can accept it
Vasanthdev2004 Sep 13, 2026
c9d8ac9
Merge origin/main into split/permission-mode-and-classifier
Vasanthdev2004 Sep 15, 2026
89eab02
fix(tui): deliver peer callbacks to the event loop through an ordered…
Vasanthdev2004 Sep 15, 2026
6f228bf
test(cli): isolate user state in the full-auto parity helper and pin it
Vasanthdev2004 Sep 15, 2026
7be8920
fix(tui): only offer full-auto where the footer can show the confirma…
Vasanthdev2004 Sep 15, 2026
9f427ba
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Sep 21, 2026
8608699
fix(tui): end a full-auto offer on cross-session peer traffic
Vasanthdev2004 Sep 21, 2026
ccc041c
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Oct 12, 2026
6fce00c
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Oct 12, 2026
08a8b9f
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Oct 17, 2026
ad3c77c
chore: follow the Twigpine module path
Vasanthdev2004 Oct 17, 2026
786d4fc
refactor(cli): use PermissionModeFullAuto instead of its deprecated a…
Vasanthdev2004 Sep 24, 2026
65ded9d
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Oct 17, 2026
5880303
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Oct 25, 2026
ac14ed9
Merge remote-tracking branch 'origin/main' into split/permission-mode…
Vasanthdev2004 Nov 17, 2026
84afbd8
fix: honor the resolved mode, network inventory, and peer admission d…
jatmn Nov 17, 2026
b4399fd
fix: stop the models.dev refresh from racing test cleanup
jatmn Nov 17, 2026
e212793
fix: preserve network approval for quoted package-manager options
jatmn Nov 17, 2026
535a80b
fix: invalidate full-auto offers at BTW session boundaries
jatmn Nov 17, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
fix: invalidate full-auto offers at BTW session boundaries
A BTW fork copied the pending offer into both the side model and the
saved main model. Main-session events were then dispatched to the
hidden model before the visible side could drop its offer.

Disarm before taking the fork snapshot and at the common main-session
routing boundary. A fresh offer can still be confirmed on the side.

With the new tests on the previous code, Ctrl+G after forking,
restoring main, and receiving a main completion or permission request
returned full-auto (want ask). The tests pass with both resets.

Exercise the canonical --full-auto flag in the interactive root
flag-order matrix alongside its legacy alias.
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@jatmn
jatmn committed Nov 17, 2026
commit 535a80b9608e37d14e89c01d8518ce3881e60f7a

Some comments aren't visible on the classic Files Changed page.

There are no files selected for viewing

14 changes: 8 additions & 6 deletions 14 internal/cli/root_flag_order_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func rootFlagOrderings(groups [][]string) [][]string {
// order the operator wrote them in load-bearing: `zero --allow-escalation
// --theme auto` stranded `--theme auto` as an unknown command and exited with
// an argument error instead of launching. Every ordering of the three root
// flags, with --skip-permissions-unsafe absent or at any position, has to reach
// the TUI with all three applied.
// flags, with either spelling of --full-auto at any position or omitted, has
// to reach the TUI with all three applied.
func TestRootFlagsComposeInAnyOrder(t *testing.T) {
extra := t.TempDir()
resolvedExtra, err := filepath.EvalSymlinks(extra)
Expand All @@ -45,16 +45,18 @@ func TestRootFlagsComposeInAnyOrder(t *testing.T) {
}
groups := [][]string{{"--add-dir", extra}, {"--theme", "auto"}, {"--allow-escalation"}}
cases := rootFlagOrderings(groups)
cases = append(cases, rootFlagOrderings(append(groups, []string{"--skip-permissions-unsafe"}))...)
if len(cases) != 6+24 {
t.Fatalf("SETUP INVALID: %d orderings, want 30", len(cases))
for _, flag := range []string{"--full-auto", "--skip-permissions-unsafe"} {
cases = append(cases, rootFlagOrderings(append(groups, []string{flag}))...)
}
if len(cases) != 6+2*24 {
t.Fatalf("SETUP INVALID: %d orderings, want 54", len(cases))
}
for _, args := range cases {
t.Run(strings.Join(args, " "), func(t *testing.T) {
options := captureTUIOptions(t, args...)
wantMode := agent.PermissionModeAsk
for _, arg := range args {
if arg == "--skip-permissions-unsafe" {
if arg == "--full-auto" || arg == "--skip-permissions-unsafe" {
wantMode = agent.PermissionModeFullAuto
}
}
Expand Down
6 changes: 6 additions & 0 deletions 6 internal/tui/btw.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ func (m model) handleBTWCommand(question string) (model, tea.Cmd) {
// Foreground loops are session-scoped. Stop them only after the side session
// is ready, so a failed fork cannot destroy work in the main session.
parent := m
// The offer belongs to the foreground surface. Clear it before copying the
// side model so neither the fork nor the saved parent can carry it forward.
parent.unsafeArmed = false
clearedLoops := 0
if updated, cleared := parent.clearLoopsForSessionSwitch(); cleared > 0 {
parent = updated
Expand Down Expand Up @@ -344,6 +347,9 @@ func (m model) refreshHiddenParentFileView() (model, tea.Cmd) {
}

func (m model) routeBTWMessageToParent(msg tea.Msg) (model, tea.Cmd, bool) {
// Cross-session delivery ends the offer on the visible side. The hidden
// parent's update cannot clear the side model's confirmation state.
m.unsafeArmed = false
parentNext, cmd := m.btw.parent.updateModel(msg)
parent, ok := parentNext.(model)
if !ok {
Expand Down
90 changes: 90 additions & 0 deletions 90 internal/tui/btw_test.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

tea "charm.land/bubbletea/v2"

"github.com/Twigpine/zero/internal/agent"
"github.com/Twigpine/zero/internal/config"
"github.com/Twigpine/zero/internal/notify"
"github.com/Twigpine/zero/internal/sessions"
Expand Down Expand Up @@ -113,6 +114,95 @@ func TestBTWCreatesIsolatedForkAndReturnsWithoutMerge(t *testing.T) {
}
}

func TestBTWForkDiscardsFullAutoOffer(t *testing.T) {
main := newBTWTestModel(t)
main.width = 96
main.permissionMode = agent.PermissionModeAsk
main = pressKey(t, main, tea.Key(testKeyShift(tea.KeyTab)))
if !main.offerOwnsStatusChip() {
t.Fatal("expected a live full-auto offer on main")
}

// Test the fork boundary directly. The Enter key would clear the offer
// before calling it, masking an offer copied into the fork or saved parent.
side, _ := main.handleBTWCommand("")
if !side.btw.active || side.btw.parent == nil {
t.Fatal("expected a BTW fork")
}
confirmed, _ := side.Update(testKeyCtrl('g'))
if got := confirmed.(model).permissionMode; got != agent.PermissionModeAsk {
t.Errorf("Ctrl+G after forking = %s, want ask", got)
}
restored, _ := side.Update(testKeyCtrl('c'))
if restored.(model).btw.active {
t.Fatal("expected Ctrl+C to restore main")
}
confirmed, _ = restored.Update(testKeyCtrl('g'))
if got := confirmed.(model).permissionMode; got != agent.PermissionModeAsk {
t.Errorf("Ctrl+G after restoring main = %s, want ask", got)
}
}

func TestBTWParentDeliveryCancelsFullAutoOffer(t *testing.T) {
const mainRunID = 7
for _, tc := range []struct {
name string
msg tea.Msg
parentNeedsInput bool
}{
{
name: "completion",
msg: agentResponseMsg{runID: mainRunID},
},
{
name: "permission request",
msg: permissionRequestMsg{
runID: mainRunID,
request: testPromptPermissionRequest(),
},
parentNeedsInput: true,
},
} {
t.Run(tc.name, func(t *testing.T) {
main := newBTWTestModel(t)
main.width = 96
main.permissionMode = agent.PermissionModeAsk
main.runID, main.activeRunID, main.pending = mainRunID, mainRunID, true
side, _ := main.handleBTWCommand("")
if !side.btw.active || side.btw.parent == nil {
t.Fatal("expected a BTW fork with main still running")
}
updated, _ := side.Update(testKeyShift(tea.KeyTab))
side = updated.(model)
if !side.offerOwnsStatusChip() {
t.Fatal("expected a live full-auto offer in BTW")
}

updated, _ = side.Update(tc.msg)
side = updated.(model)
parent := side.btw.parent
if parent == nil || parent.pending != tc.parentNeedsInput ||
(parent.pendingPermission != nil) != tc.parentNeedsInput {
t.Fatal("delivery did not update the hidden main session")
}
if side.pendingPermission != nil {
t.Fatal("main permission prompt leaked into BTW")
}
updated, _ = side.Update(testKeyCtrl('g'))
side = updated.(model)
if side.permissionMode != agent.PermissionModeAsk {
t.Fatalf("Ctrl+G after main delivery = %s, want ask", side.permissionMode)
}

updated, _ = side.Update(testKeyShift(tea.KeyTab))
updated, _ = updated.Update(testKeyCtrl('g'))
if got := updated.(model).permissionMode; got != agent.PermissionModeFullAuto {
t.Errorf("Ctrl+G after a fresh BTW offer = %s, want full-auto", got)
}
})
}
}

func TestBTWCanOpenWhileParentRunContinues(t *testing.T) {
m := newBTWTestModel(t)
m.pending = true
Expand Down
3 changes: 2 additions & 1 deletion 3 internal/tui/model.go
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,8 @@ func (m model) updateModel(msg tea.Msg) (tea.Model, tea.Cmd) {
if next, cmd, routed := m.routeBTWParentMessage(msg); routed {
return next, batchCommands(cmd, resizeCmd)
}
// CROSS-SESSION TRAFFIC ENDS A FULL-AUTO OFFER, every kind of it.
// CROSS-SESSION TRAFFIC ENDS A FULL-AUTO OFFER. BTW parent deliveries
// are handled by the router above. Peer deliveries continue here.
//
// The offer is valid only until the next user-visible input transition,
// whatever delivers it (see sttPartialMsg below). Paste, blur, mouse, the
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.