Problem
The review editor uses !!origin as a proxy for "is there a server backing this UI?" in multiple places:
useCodeAnnotationDraft({ isApiMode: !!origin, ... }) (line 175)
useExternalAnnotations({ enabled: !!origin }) (line 189)
if (!origin) return; // Demo mode in the keyboard shortcut handler (line 954)
- Conditional UI rendering (
{origin ? ( at line 1102)
origin is an identity field ("claude-code", "opencode", "pi") indicating who launched the review. It's not a connectivity signal. The standalone dev server (apps/review/) doesn't set origin, so all server-dependent features are silently disabled there.
Proposed Fix
Add a dedicated isApiMode boolean state to ReviewApp, matching the pattern already used in the plan editor (packages/editor/App.tsx):
const [isApiMode, setIsApiMode] = useState(false);
Set it in the /api/diff fetch:
.then(...) → setIsApiMode(true)
.catch(...) → remains false
Replace all !!origin API-mode checks with isApiMode. Leave origin for its intended purpose: display branding and agent-specific features.
Files
packages/review-editor/App.tsx — main change
packages/ui/hooks/useCodeAnnotationDraft.ts — already accepts isApiMode param, just needs the correct value passed in
Problem
The review editor uses
!!originas a proxy for "is there a server backing this UI?" in multiple places:useCodeAnnotationDraft({ isApiMode: !!origin, ... })(line 175)useExternalAnnotations({ enabled: !!origin })(line 189)if (!origin) return; // Demo modein the keyboard shortcut handler (line 954){origin ? (at line 1102)originis an identity field ("claude-code","opencode","pi") indicating who launched the review. It's not a connectivity signal. The standalone dev server (apps/review/) doesn't setorigin, so all server-dependent features are silently disabled there.Proposed Fix
Add a dedicated
isApiModeboolean state toReviewApp, matching the pattern already used in the plan editor (packages/editor/App.tsx):Set it in the
/api/difffetch:.then(...)→setIsApiMode(true).catch(...)→ remainsfalseReplace all
!!originAPI-mode checks withisApiMode. Leaveoriginfor its intended purpose: display branding and agent-specific features.Files
packages/review-editor/App.tsx— main changepackages/ui/hooks/useCodeAnnotationDraft.ts— already acceptsisApiModeparam, just needs the correct value passed in