Embed plan review surface and fix cross-surface issues#758
Open
backnotprop wants to merge 11 commits into
Open
Embed plan review surface and fix cross-surface issues#758backnotprop wants to merge 11 commits into
backnotprop wants to merge 11 commits into
Conversation
8 component/hook files in packages/ui/ still had bare fetch('/api/...')
calls that weren't caught during the code review migration:
- Settings.tsx, InlineMarkdown.tsx, AttachmentsButton.tsx, ExportModal.tsx
- settings/HooksTab.tsx, goal-setup/GoalSetupSurface.tsx
- plan-diff/PlanDiffViewer.tsx, hooks/useLinkedDoc.ts
Also set window.__PLANNOTATOR_API_BASE__ in SessionProvider so
non-hook consumers (apiPath for <img src> in ImageThumbnail) get
session-scoped paths.
Rewrite useAnnotationDraft with onRestore callback pattern (same as useCodeAnnotationDraft). Legacy tuple format preserved. Toast on restore. ConfirmDialog removed from plan review App.tsx.
Strip ThemeProvider, TooltipProvider, Toaster when __embedded. h-full instead of h-screen. headerLeft prop passed through to AppHeader for sidebar trigger. App.d.ts type declaration added.
When keep-alive hides a surface with visibility:hidden, its keyboard listeners on window/document stay active. Without guards, Mod+Enter on the visible code review would also fire the hidden plan review's submit handler. Both App.tsx files now check getComputedStyle(rootRef).visibility at the start of every keyboard handler. If hidden, return early.
All session modes now render production surfaces: - review → ReviewAppEmbedded - plan, annotate, archive, goal-setup → PlanAppEmbedded Added @plannotator/plan-review dependency, Vite aliases, and styles. SessionSurface simplified — review gets code review, everything else gets plan review (which determines its mode from /api/plan response).
1322905 to
b0d3534
Compare
… mode When running inside the frontend app (__embedded), the CompletionOverlay blocked the entire viewport including the sidebar. Now: - Embedded surfaces show a CompletionBanner (colored bar below the header) - Action buttons hide after submission (plan review hides via AppHeader submitted prop, code review hides via !submitted guard) - Standalone mode keeps the original full-screen overlay with auto-close - No window.close() fires in embedded mode since useAutoClose lives inside CompletionOverlay which is skipped
6255fa5 to
7d2a626
Compare
The daemon now serves the production frontend HTML (apps/frontend/) at session URLs. The debug frontend is only loaded when PLANNOTATOR_DEBUG_SHELL=1, read from disk at runtime — never bundled in the compiled binary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Layer 7 in the daemon stack. Embeds the plan review component alongside the code review, covering all five session modes (plan, review, annotate, archive, goal-setup). Also fixes cross-surface issues discovered during adversarial review.
useSessionFetch— Settings, InlineMarkdown, AttachmentsButton, ExportModal, HooksTab, GoalSetupSurface, PlanDiffViewer, useLinkedDoc. Pluswindow.__PLANNOTATOR_API_BASE__set in SessionProvider for<img src>paths.PlanAppEmbeddedexported withheaderLeftpropuseAnnotationDraftrewritten withonRestorecallback (same as code review). Restore dialog removed, toast notification added.getComputedStyle(rootRef).visibility) to allwindow/documentkeyboard listeners. Hidden surfaces no longer respond to shortcuts..animate-in/.fade-inclasses removed from code review CSS (conflicted withtailwindcss-animate).review→ ReviewAppEmbedded, everything else → PlanAppEmbeddedStack
feat/single-server-runtimefeat/plannotator-daemon-runtimefeat/runtime-frontend-shellfeat/websocket-event-hubfeat/frontend-initial-viewfeat/frontend-code-review-surfacefeat/frontend-plan-review-surfaceTest plan
bun run dev:frontend— daemon + frontend startMod+Enteron code review does NOT trigger plan review submitbun run --cwd apps/frontend checkpassesbun run typecheckpassesbun test— 1,463 pass, 0 fail