Skip to content

fix(desktop): prevent extra Dock icons and fix CORS for cloud connect#247

Merged
lefarcen merged 13 commits intomainfrom
refactor/simplify-model-settings
Mar 18, 2026
Merged

fix(desktop): prevent extra Dock icons and fix CORS for cloud connect#247
lefarcen merged 13 commits intomainfrom
refactor/simplify-model-settings

Conversation

@lefarcen
Copy link
Copy Markdown
Collaborator

@lefarcen lefarcen commented Mar 18, 2026

Summary

  • Dock icon fix: Add LSUIElement=true to mac.extendInfo so child processes (spawned with ELECTRON_RUN_AS_NODE) don't create extra Dock icons; restore main process Dock icon via early app.dock?.show() call
  • CORS fix: Remove conflicting cors({origin:"*"}) override for desktop endpoints — it breaks credentials:"include" on cross-origin POST requests (cloud login)
  • Error handling: Add try/catch around cloud-register fetch for clearer error messages
  • Includes prior merged changes: SDK migration, model settings simplification, desktop stability improvements

Test plan

  • After CI build, launch desktop client and verify no extra "exec" icons appear in the Dock
  • Click "Login to Nexu account" and verify browser authorization flow works
  • After cloud connection completes, verify models load correctly

🤖 Generated with Claude Code

lefarcen and others added 11 commits March 18, 2026 12:30
- Convert all API routes to createRoute + app.openapi() (model-routes,
  desktop-local-routes, auth-routes, desktop-auth-routes)
- Add shared Zod schemas in packages/shared/src/schemas/provider.ts
- Regenerate openapi.json, sdk.gen.ts, types.gen.ts
- Replace all raw fetch() in frontend with generated SDK functions
  (models.tsx, welcome.tsx, home.tsx, auth.tsx, community-skill-detail.tsx,
  use-community-catalog.ts)
- Set NEXU_DESKTOP_MODE=true in generate-openapi.ts so desktop routes
  enter the OpenAPI spec
- Update AGENTS.md with explicit OpenAPI SDK rules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix import ordering (welcome.tsx, desktop-auth-routes.ts)
- Fix formatting (model-routes.ts)
- Remove unused variable (auth.tsx)
- Replace non-null assertion with type assertion (community-skill-detail.tsx)
- Add 404/410 response schemas to desktop-authorize route

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Display provider name (Nexu Official, Anthropic, OpenAI, Google AI)
  next to selected model name in trigger button and status bar
- Show provider logo icon instead of generic CPU icon
- Fix expanded group logic for link/ models (was using raw provider
  instead of group key "nexu")
- Extract getGroupKey and PROVIDER_LABELS to module scope

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Desktop routes are now always registered (so they appear in the OpenAPI
spec naturally). A runtime middleware guard on /api/internal/desktop/*
returns 404 when not in desktop mode, replacing the conditional
registration approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove per-model enable/disable toggles from settings page
- Add current model selector dropdown at top of providers tab
- Auto-select first available model when provider is configured
- Simplify sidebar to single list (no enabled/disabled groups)
- Homepage: only show "change config" button when no channels connected
- Remove model dropdown from homepage (moved to settings)
- Remove tab selector from channel manager panel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The user name, email, and logout button in the sidebar are unnecessary
in the Electron desktop client. Wrap the account section with an
isDesktopClient guard so it only renders in the web version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tailwind v4 preflight no longer sets cursor: pointer on buttons and
other interactive elements. Add the rule back in the base layer so
buttons, links, selects, and summary elements show the pointer cursor.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add LSUIElement=true to mac.extendInfo so child processes (spawned with
  ELECTRON_RUN_AS_NODE) don't create extra Dock icons
- Call app.dock?.show() early to restore main process Dock icon
- Remove conflicting cors({origin:"*"}) for desktop endpoints — it
  breaks credentials:"include" on cross-origin POST requests
- Add try/catch around cloud-register fetch for better error messages
- Add auth page auto-close countdown and i18n strings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 18, 2026

Deploying nexu-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 756f882
Status: ✅  Deploy successful!
Preview URL: https://8b09e28f.nexu-docs.pages.dev
Branch Preview URL: https://refactor-simplify-model-sett.nexu-docs.pages.dev

View logs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@lefarcen lefarcen merged commit 64c1380 into main Mar 18, 2026
7 checks passed
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