Skip to content

Commit 625f2d7

Browse files
authored
failed the script when bundle:default fails and cleanup "alpha" (#8580)
1 parent a5a497b commit 625f2d7

File tree

5 files changed

+9
-37
lines changed

5 files changed

+9
-37
lines changed

Justfile

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,13 @@ run-ui-only:
140140
@echo "Running UI..."
141141
cd ui/desktop && pnpm install && pnpm run start-gui
142142

143-
debug-ui *alpha:
144-
@echo "🚀 Starting goose frontend in external backend mode{{ if alpha == "alpha" { " with alpha features enabled" } else { "" } }}"
143+
debug-ui:
144+
@echo "🚀 Starting goose frontend in external backend mode"
145145
cd ui/desktop && \
146146
export GOOSE_EXTERNAL_BACKEND=true && \
147147
export GOOSE_SERVER__SECRET_KEY="${GOOSE_SERVER__SECRET_KEY:-test}" && \
148-
{{ if alpha == "alpha" { "export ALPHA=true &&" } else { "" } }} \
149148
pnpm install && \
150-
pnpm run {{ if alpha == "alpha" { "start-alpha-gui" } else { "start-gui" } }}
149+
pnpm run start-gui
151150

152151
# Run UI with main process debugging enabled
153152
# To debug main process:
@@ -173,12 +172,6 @@ package-ui:
173172
codesign --force --deep --sign - --entitlements ui/desktop/entitlements.plist ui/desktop/out/Goose-darwin-arm64/Goose.app
174173
@echo "Done! Launch with: open ui/desktop/out/Goose-darwin-arm64/Goose.app"
175174

176-
# Run UI with alpha changes
177-
run-ui-alpha:
178-
@just release-binary
179-
@echo "Running UI with alpha features..."
180-
cd ui/desktop && pnpm install && ALPHA=true pnpm run start-alpha-gui
181-
182175
# Run UI with latest (Windows version)
183176
run-ui-windows:
184177
@just release-windows
@@ -254,11 +247,6 @@ make-ui:
254247
@just release-binary
255248
cd ui/desktop && pnpm run bundle:default
256249

257-
# make GUI with latest binary and alpha features enabled
258-
make-ui-alpha:
259-
@just release-binary
260-
cd ui/desktop && pnpm run bundle:alpha
261-
262250
# make GUI with latest Windows binary
263251
make-ui-windows:
264252
@just release-windows

ui/desktop/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
"start:test-error": "GOOSE_TEST_ERROR=true electron-forge start",
1818
"package": "pnpm run i18n:compile && electron-forge package",
1919
"make": "pnpm run i18n:compile && electron-forge make",
20-
"bundle:default": "node scripts/prepare-platform-binaries.js && pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
21-
"bundle:alpha": "ALPHA=true node scripts/prepare-platform-binaries.js && ALPHA=true pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_alpha.zip\") || echo \"${APP_BUNDLE} not found; either the binary is not built or you are not on macOS\"",
20+
"bundle:default": "node scripts/prepare-platform-binaries.js && pnpm run make && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-arm64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}.zip\")",
2221
"bundle:intel": "node scripts/prepare-platform-binaries.js && pnpm run make --arch=x64 && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && APP_DIR=\"out/${BUNDLE_NAME}-darwin-x64\" && APP_BUNDLE=\"${APP_DIR}/${BUNDLE_NAME}.app\" && (cd \"$APP_DIR\" && ditto -c -k --sequesterRsrc --keepParent \"${BUNDLE_NAME}.app\" \"${BUNDLE_NAME}_intel_mac.zip\")",
2322
"debug": "echo 'run --remote-debugging-port=8315' && BUNDLE_NAME=\"${GOOSE_BUNDLE_NAME:-Goose}\" && lldb \"out/${BUNDLE_NAME}-darwin-arm64/${BUNDLE_NAME}.app\"",
2423
"test-e2e": "pnpm run generate-api && playwright test",
@@ -38,7 +37,6 @@
3837
"test:integration": "vitest run --config vitest.integration.config.ts",
3938
"test:integration:watch": "vitest --config vitest.integration.config.ts",
4039
"test:integration:debug": "DEBUG=1 vitest run --config vitest.integration.config.ts",
41-
"start-alpha-gui": "ALPHA=true pnpm run start-gui",
4240
"i18n:extract": "formatjs extract 'src/**/*.{ts,tsx}' --out-file src/i18n/messages/en.json --flatten && pnpm run i18n:compile",
4341
"i18n:check": "node scripts/i18n-check.js",
4442
"i18n:compile": "node scripts/i18n-compile.js"

ui/desktop/src/components/GooseSidebar/EnvironmentBadge.tsx

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/Tooltip';
33
import { defineMessages, useIntl } from '../../i18n';
44

55
const i18n = defineMessages({
6-
alpha: {
7-
id: 'environmentBadge.alpha',
8-
defaultMessage: 'Alpha',
9-
},
106
dev: {
117
id: 'environmentBadge.dev',
128
defaultMessage: 'Dev',
@@ -19,18 +15,13 @@ interface EnvironmentBadgeProps {
1915

2016
const EnvironmentBadge: React.FC<EnvironmentBadgeProps> = ({ className = '' }) => {
2117
const intl = useIntl();
22-
const isAlpha = process.env.ALPHA;
2318
const isDevelopment = import.meta.env.DEV;
2419

25-
// Don't show badge in production
26-
if (!isDevelopment && !isAlpha) {
20+
if (!isDevelopment) {
2721
return null;
2822
}
2923

30-
const tooltipText = isAlpha
31-
? intl.formatMessage(i18n.alpha)
32-
: intl.formatMessage(i18n.dev);
33-
const bgColor = isAlpha ? 'bg-purple-600' : 'bg-orange-400';
24+
const tooltipText = intl.formatMessage(i18n.dev);
3425

3526
return (
3627
<Tooltip>
@@ -41,13 +32,13 @@ const EnvironmentBadge: React.FC<EnvironmentBadgeProps> = ({ className = '' }) =
4132
aria-label={tooltipText}
4233
>
4334
<div className="absolute -inset-1" />
44-
<div className={`${bgColor} w-2 h-2 rounded-full`} />
35+
<div className="bg-orange-400 w-2 h-2 rounded-full" />
4536
</div>
4637
</TooltipTrigger>
4738
<TooltipContent
4839
side="bottom"
49-
className={bgColor}
50-
arrowClassName={isAlpha ? 'fill-purple-600 bg-purple-600' : 'fill-orange-400 bg-orange-400'}
40+
className="bg-orange-400"
41+
arrowClassName="fill-orange-400 bg-orange-400"
5142
>
5243
{tooltipText}
5344
</TooltipContent>

ui/desktop/src/i18n/messages/en.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -932,9 +932,6 @@
932932
"envVarsSection.variableName": {
933933
"defaultMessage": "Variable name"
934934
},
935-
"environmentBadge.alpha": {
936-
"defaultMessage": "Alpha"
937-
},
938935
"environmentBadge.dev": {
939936
"defaultMessage": "Dev"
940937
},

ui/desktop/vite.renderer.config.mts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import tailwindcss from '@tailwindcss/vite';
44
// https://vitejs.dev/config
55
export default defineConfig({
66
define: {
7-
// This replaces process.env.ALPHA with a literal at build time
8-
'process.env.ALPHA': JSON.stringify(process.env.ALPHA === 'true'),
97
'process.env.GOOSE_TUNNEL': JSON.stringify(process.env.GOOSE_TUNNEL !== 'no' && process.env.GOOSE_TUNNEL !== 'none'),
108
},
119

0 commit comments

Comments
 (0)