feat: component wiring integration — orphan cleanup, Memory page, WS handlers
Memory page: Added REST endpoints (routes/memory.ts, 3 GETs: list/daily/dreams), React route in App.tsx, nav link in ProjectSidebar (Brain icon). Orphan components wired: KeyboardShortcutsDialog (? key in AppShell), McpResponseDisplay (MCP tool results in ToolCallLine), CacheShapeBadge (StatsLine in MessageBubble). MessageBoundary + MessageListErrorBoundary confirmed already wired in MarkdownRenderer/MessageList. Dead code cleanup: useDraftPersistence integrated into ChatInput (localStorage draft save/restore/clear on send). message-parts barrel made canonical — MessageBubble imports from it; StatsLine updated with CacheShapeBadge parity. api.settings.inference typed wrapper added; InferenceSettings raw fetch replaced. WS frame handlers: reasoning_delta (accumulates like delta), tool_trace_start, tool_trace_finish, collision_warning, agent_message acknowledged in useSessionStream. CollisionWarningEvent + AgentMessageEvent added to sessionEvents union. Forwarding in useCoderUserEvents. reasoning_delta + collision_warning added to web WsFrame type. useSidebar default case fixes pre-existing fallthrough error. Workflow engine: services/workflow/index.ts documented as experimental; coder flow-runner (apps/coder/src/services/flow-runner.ts) is canonical. Verification: web type-check clean, server build clean, 627 tests pass.
This commit is contained in:
@@ -9,6 +9,7 @@ import { Session } from '@/pages/Session';
|
||||
import { Settings } from '@/pages/Settings';
|
||||
import { Analytics } from '@/pages/Analytics';
|
||||
import { Results } from '@/pages/Results';
|
||||
import { Memory } from '@/pages/Memory';
|
||||
import { Toaster } from '@/components/ui/sonner';
|
||||
import { useUserEvents } from '@/hooks/useUserEvents';
|
||||
import { useCoderUserEvents } from '@/hooks/useCoderUserEvents';
|
||||
@@ -19,6 +20,7 @@ import { useViewport } from '@/hooks/useViewport';
|
||||
import { ThemeFx } from '@/components/fx/ThemeFx';
|
||||
import { FlowLauncherDialog } from '@/components/FlowLauncherDialog';
|
||||
import { ArenaLauncherDialog } from '@/components/ArenaLauncherDialog';
|
||||
import { KeyboardShortcutsDialog } from '@/components/KeyboardShortcutsDialog';
|
||||
|
||||
function SessionRightRail() {
|
||||
const { id } = useParams<{ id: string }>();
|
||||
@@ -75,6 +77,19 @@ function AppShell() {
|
||||
useTheme();
|
||||
useUserEvents();
|
||||
useCoderUserEvents();
|
||||
const [showShortcuts, setShowShortcuts] = useState(false);
|
||||
useEffect(() => {
|
||||
const handler = (e: KeyboardEvent) => {
|
||||
if (e.key === '?' && !e.metaKey && !e.ctrlKey && !e.altKey) {
|
||||
const tag = (e.target as HTMLElement)?.tagName;
|
||||
if (tag !== 'INPUT' && tag !== 'TEXTAREA' && !(e.target as HTMLElement)?.isContentEditable) {
|
||||
setShowShortcuts((v) => !v);
|
||||
}
|
||||
}
|
||||
};
|
||||
window.addEventListener('keydown', handler);
|
||||
return () => window.removeEventListener('keydown', handler);
|
||||
}, []);
|
||||
// v1.10.8c: h-dvh (dynamic viewport) instead of h-screen (100vh) so the
|
||||
// root height excludes the iOS URL-bar overlay area. Without this, every
|
||||
// descendant — including the terminal pane — measures itself against a
|
||||
@@ -99,6 +114,7 @@ function AppShell() {
|
||||
<Route path="/settings" element={<Settings />} />
|
||||
<Route path="/analytics" element={<Analytics />} />
|
||||
<Route path="/results" element={<Results />} />
|
||||
<Route path="/memory" element={<Memory />} />
|
||||
</Routes>
|
||||
</main>
|
||||
<MobileRightRailBackdrop />
|
||||
@@ -108,6 +124,7 @@ function AppShell() {
|
||||
<Toaster position="bottom-right" />
|
||||
<FlowLauncherDialog />
|
||||
<ArenaLauncherDialog />
|
||||
<KeyboardShortcutsDialog open={showShortcuts} onOpenChange={setShowShortcuts} />
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user