audit(#2497): org-switcher fixes — port dropped from switch URL, error caches as 'No other organizations', apex-dot guard, keyboard access #2509

Closed
opened 2026-06-10 05:29:15 +00:00 by core-devops · 0 comments
Member

2026-06-10 audit MEDIUMs/LOWs on the concierge topbar switcher (canvas/src/lib/org-switch.ts + ConciergeShell.tsx):

  1. MEDIUM: switchOrgUrl takes hostname (no port) and emits no port → broken navigation on any non-443 deployment. Accept location.host and carry :port through.
  2. MEDIUM: a transient /cp/orgs failure caches setOrgs([]) forever (lazy-fetch gated on orgs===null) → misleading 'No other organizations' until reload. Reset to null on close-after-error.
  3. LOW: 2-label host with empty currentSlug → drop-first-label fallback yields a foreign apex (moleculesai.app → .app). Require a dot in the derived apex.
  4. LOW: the /cp/orgs fetch runs inside a setState updater (StrictMode double-fetch); org block has no onKeyDown (keyboard users can't open it).

🤖 Generated with Claude Code

2026-06-10 audit MEDIUMs/LOWs on the concierge topbar switcher (canvas/src/lib/org-switch.ts + ConciergeShell.tsx): 1. MEDIUM: switchOrgUrl takes hostname (no port) and emits no port → broken navigation on any non-443 deployment. Accept location.host and carry :port through. 2. MEDIUM: a transient /cp/orgs failure caches setOrgs([]) forever (lazy-fetch gated on orgs===null) → misleading 'No other organizations' until reload. Reset to null on close-after-error. 3. LOW: 2-label host with empty currentSlug → drop-first-label fallback yields a foreign apex (moleculesai.app → <slug>.app). Require a dot in the derived apex. 4. LOW: the /cp/orgs fetch runs inside a setState updater (StrictMode double-fetch); org block has no onKeyDown (keyboard users can't open it). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2509