Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

fix

Justin D'Souzac371be76d30a
diff --git a/cli/beacon/internal/onboarding/wizard.go b/cli/beacon/internal/onboarding/wizard.go
index 0b4d9ca6..c176b259 100644
--- a/cli/beacon/internal/onboarding/wizard.go
+++ b/cli/beacon/internal/onboarding/wizard.go
@@ -717,26 +717,22 @@ func (m wizardModel) View() string {
title = "Ready to set up Beacon"
if m.result.Destination == DestinationAsymptote {
// The account is the identity this machine will enroll under. It has to
- // be on this screen: confirming is what starts forwarding.
+ // stay on screen: the alt-screen renderer drops lines above the terminal
+ // height, and a default 80×24 terminal is the one this view has to fit.
if m.options.Email != "" {
- body = "Account: " + m.options.Email + "\n\n"
+ body = "Account: " + m.options.Email + "\n"
}
- // Values share a column: "Destination:" is one character shorter than
- // "Capture mode:", so it takes one more space.
- body += "Beacon Cloud is operated by Asymptote Labs, Inc." +
- "\n\n" +
- " Destination: Beacon Cloud\n" +
- " Capture mode: " + managedprivacy.Label(m.result.PrivacyMode) +
- "\n\n" +
- wizardWarn.Render("This installs Beacon and starts forwarding to beacon.sh.") +
- "\n\n" +
- "Turn off research and AI training any time in Beacon Cloud:\n" +
- "click your profile picture (top right), then Settings.\n" +
- "Change capture mode any time with `beacon endpoint connect --privacy-mode`.\n" +
- "Stop sending any time with `beacon endpoint disconnect`.\n" +
+ body += "Beacon Cloud is operated by Asymptote Labs, Inc.\n" +
+ "Destination: Beacon Cloud\n" +
+ "Capture mode: " + managedprivacy.Label(m.result.PrivacyMode) + "\n" +
+ wizardWarn.Render("This installs Beacon and starts forwarding to beacon.sh.") + "\n" +
+ "Turn off research and AI training any time in Beacon Cloud: " +
+ "click your profile picture (top right), then Settings. " +
+ "Change capture mode any time with `beacon endpoint connect --privacy-mode`. " +
+ "Stop sending any time with `beacon endpoint disconnect`. " +
"To delete your data, email [email protected]."
if m.options.BackfillDays > 0 {
- body += "\n\n" + fmt.Sprintf("It also uploads your agent sessions from the last %d days, read from their session history on this machine.", m.options.BackfillDays)
+ body += fmt.Sprintf(" It also uploads your agent sessions from the last %d days, read from their session history on this machine.", m.options.BackfillDays)
}
} else {
label, _ := destinationCopy(m.result.Destination)
@@ -753,7 +749,7 @@ func (m wizardModel) View() string {
}
}
if m.options.OfferAgentTools {
- body += "\n\nAgent tools: " + m.agentToolsSummary()
+ body += "\nAgent tools: " + m.agentToolsSummary()
}
}
diff --git a/cli/beacon/internal/onboarding/wizard_test.go b/cli/beacon/internal/onboarding/wizard_test.go
index aca7a096..3abceb3d 100644
--- a/cli/beacon/internal/onboarding/wizard_test.go
+++ b/cli/beacon/internal/onboarding/wizard_test.go
@@ -302,7 +302,7 @@ func TestConfirmScreenNamesWhatConfirmingStarts(t *testing.T) {
PresetDestination: DestinationAsymptote,
PresetPrivacyMode: mode,
})
- model.width, model.height = 100, 40
+ model.width, model.height = 80, 24
model.screen = confirmScreen
model.result.Destination = DestinationAsymptote
model.result.PrivacyMode = mode
@@ -343,6 +343,43 @@ func TestConfirmScreenNamesWhatConfirmingStarts(t *testing.T) {
}
}
+// bubbletea's alt-screen renderer keeps the last height lines of a frame. On a
+// default 80×24 terminal that used to drop the account and the operator line
+// while leaving "enter install and connect" on screen.
+func TestConfirmScreenFitsDefaultTerminal(t *testing.T) {
+ model := newWizardModel(WizardOptions{
+ SignedIn: true,
+ Email: "[email protected]",
+ OfferManaged: true,
+ OfferAgentTools: true,
+ PresetDestination: DestinationAsymptote,
+ PresetPrivacyMode: "standard",
+ BackfillDays: 30,
+ })
+ model.width, model.height = 80, 24
+ model.screen = confirmScreen
+ model.result.Destination = DestinationAsymptote
+ model.result.PrivacyMode = "standard"
+
+ view := model.View()
+ lines := strings.Split(view, "\n")
+ if len(lines) > 0 && lines[len(lines)-1] == "" {
+ lines = lines[:len(lines)-1]
+ }
+ if len(lines) > 24 {
+ t.Fatalf("confirm screen is %d lines at 80 columns; an 80×24 terminal drops the top:\n%s", len(lines), view)
+ }
+ for _, want := range []string{
+ "Account: [email protected]",
+ "operated by Asymptote Labs",
+ "This installs Beacon and starts forwarding to beacon.sh.",
+ } {
+ if !strings.Contains(view, want) {
+ t.Fatalf("80×24 confirm screen missing %q:\n%s", want, view)
+ }
+ }
+}
+
// signInWizard builds a wizard whose sign-in runs in place, the way RunWizard does.
func signInWizard(t *testing.T, signIn SignInFunc) wizardModel {
t.Helper()