Skip to content

Redesign Web Mode command interface#18

Merged
Neuro-Rift merged 1 commit into
mainfrom
codex/redesign-web-mode-for-ai-platform
Feb 10, 2026
Merged

Redesign Web Mode command interface#18
Neuro-Rift merged 1 commit into
mainfrom
codex/redesign-web-mode-for-ai-platform

Conversation

@Neuro-Rift
Copy link
Copy Markdown
Owner

Motivation

  • Replace the legacy dashboard with a focused, AI-first Web Mode that acts as a chat-first command center for controlling OpenClaw and NeuroRift while keeping backend enforcement unchanged.
  • Provide a schema-driven, policy-filtered UI that surfaces agent state, intent routing, execution timelines, memory pulses and configuration controls to support modular, emergent agent orchestration.
  • Improve visual language and device-adaptive layout so the interface can present layered complexity safely without exposing execution privileges or bypassing backend safeguards.

Description

  • Replaced the root layout and page to host the new command interface frame and provider by updating web-ui/src/app/layout.tsx and web-ui/src/app/page.tsx.
  • Added a schema-driven panel system and policy engine with panel definitions and layout zones in web-ui/src/lib/webmode/schema.ts and web-ui/src/lib/webmode/policy.ts.
  • Implemented Web Mode runtime/config/state including web-ui/src/lib/webmode/types.ts, state.ts, stream.ts and config-schema.ts, plus WebModeProvider and the CommandCenter surface (web-ui/src/components/webmode/*) to orchestrate dynamic panels.
  • Added panel renderer and registry plus concrete interactive panels for command, activity, agent graph, intent flow, execution timeline, memory pulse, permissions, config matrix and online mode under web-ui/src/components/webmode/panels/.
  • Introduced local UI-only integrations: a mock websocket web-ui/src/lib/websocket.ts, a frontend useNeuroRift hook with sample state web-ui/src/lib/hooks.ts, shared types web-ui/src/lib/types.ts, and utilities web-ui/src/lib/utils.ts.
  • Updated styling and theme for a futuristic dark/glass/neon aesthetic by extending web-ui/src/styles/globals.css and web-ui/tailwind.config.ts.
  • Minor repo metadata change: adjusted .gitignore to allow committing the new web-ui/src/lib folder.

Testing

  • Launched the dev server with npm run dev and Next reported the application as ready and served the root page (HTTP 200); there were non-blocking Google Fonts warnings but the app fell back to local fonts. (Succeeded)
  • Executed an automated Playwright script to load http://127.0.0.1:3000 and capture a screenshot, producing the artifact artifacts/webmode-dashboard.png. (Succeeded)
  • All changes were committed to the working branch via git commit after staging; no automated unit tests were required for these UI-only changes. (Committed)

Codex Task

@deepsource-io
Copy link
Copy Markdown
Contributor

deepsource-io Bot commented Feb 10, 2026

Here's the code health analysis summary for commits c69bb2e..0d68dd8. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource Python LogoPython✅ SuccessView Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Feb 10, 2026

Greptile Overview

Greptile Summary

This PR replaces the legacy dashboard layout/page with a new “Web Mode” command interface composed of a frame (header/footer), a provider-backed runtime, and a schema/policy-driven panel system. The UI dynamically filters and places panels by device tier, session presence, and control mode, and introduces several UI-only/mock integrations (useNeuroRift, a mock websocket, and demo streams) to power the new panels without changing backend enforcement.

Key integration points:

  • web-ui/src/app/layout.tsx now wraps the app in CommandCenterFrame.
  • web-ui/src/app/page.tsx now renders CommandCenter, which provides WebModeProvider + CommandCenterSurface.
  • CommandCenterSurface filters panelDefinitions via evaluatePanelPolicy and renders panels through PanelRenderer + PanelRegistry.

Blocking issues to address before merge:

  • Several components type children as React.ReactNode but do not import React/ReactNode, which will fail type-checking in TS configurations without global React types.
  • CommandPanel generates React list keys from Date.now(), which can collide under fast interactions and cause mis-renders.

Confidence Score: 3/5

  • This PR is moderately safe to merge once the identified TypeScript build breakers are fixed.
  • Core changes are UI-only and internally consistent, but there are at least two concrete issues that can break builds or UI correctness: missing React/ReactNode type imports in new components and unstable message IDs causing duplicate React keys in the command panel. CI/test execution couldn’t be validated in this environment (npm unavailable), so confidence is capped until those fixes are applied and a build is confirmed.
  • web-ui/src/components/webmode/CommandCenterFrame.tsx, web-ui/src/components/webmode/WebModeProvider.tsx, web-ui/src/components/webmode/panels/CommandPanel.tsx

Important Files Changed

Filename Overview
.gitignore Adjusted ignore rules to explicitly include web-ui/src/lib and normalized trailing newline; no functional runtime impact.
web-ui/src/app/layout.tsx Swapped legacy dashboard layout for CommandCenterFrame; looks correct but ensure frame types compile with React types.
web-ui/src/app/page.tsx Replaced dashboard content with CommandCenter entrypoint; straightforward.
web-ui/src/components/webmode/CommandCenter.tsx Added provider-wrapped command center surface; simple composition.
web-ui/src/components/webmode/CommandCenterFrame.tsx New web-mode frame/header/footer; currently uses React.ReactNode without importing React/ReactNode (type-check issue).
web-ui/src/components/webmode/CommandCenterSurface.tsx Implements schema/policy-based panel layout and renders zones via PanelRenderer; logic appears consistent.
web-ui/src/components/webmode/PanelRegistry.tsx Introduces static registry mapping panel IDs to components; type-only React import used.
web-ui/src/components/webmode/PanelRenderer.tsx Generic panel wrapper with tone-based styling and registry lookup; handles missing panels gracefully.
web-ui/src/components/webmode/WebModeProvider.tsx Adds context/provider and exposes webmode state/config; uses React.ReactNode without importing React/ReactNode (type-check risk).
web-ui/src/components/webmode/panels/ActivityStreamPanel.tsx Renders mock signal stream events with simple styling.
web-ui/src/components/webmode/panels/AgentGraphPanel.tsx Displays agent status cards from useNeuroRift; safe handling of missing agent keys via optional chaining.
web-ui/src/components/webmode/panels/CommandPanel.tsx Chat-like command panel; message IDs based on Date.now() can collide, causing duplicate React keys.
web-ui/src/components/webmode/panels/ConfigMatrixPanel.tsx Schema-driven config editor; uses path-based getter and updateConfig; works for current schema.
web-ui/src/components/webmode/panels/ExecutionTimelinePanel.tsx Displays tasks progress bars from useNeuroRift; straightforward.
web-ui/src/components/webmode/panels/IntentFlowPanel.tsx Static intent routing visualization; no risky logic.
web-ui/src/components/webmode/panels/MemoryPulsePanel.tsx Displays config-derived meters; straightforward.
web-ui/src/components/webmode/panels/OnlineModePanel.tsx Toggles online mode/access; public URL is randomized UI-only value; no backend integration here.
web-ui/src/components/webmode/panels/PermissionsPanel.tsx Renders approvals list; action chips are presentational only.
web-ui/src/lib/hooks.ts Adds mock useNeuroRift hook with demo state and timers; suitable for UI-only mode.
web-ui/src/lib/types.ts Introduces shared frontend types for session/agent/task/approval/system health.
web-ui/src/lib/utils.ts Adds cn, severity color mapping, and date formatting utilities.
web-ui/src/lib/webmode/config-schema.ts Defines config schema for matrix panel; paths align with default config in state.
web-ui/src/lib/webmode/policy.ts Implements panel policy evaluation (session, control-only, min device tier).
web-ui/src/lib/webmode/schema.ts Defines panel definitions and layout zones; consistent with registry/types.
web-ui/src/lib/webmode/state.ts Implements device tier detection and webmode state/config reducer; uses structuredClone and path updates.
web-ui/src/lib/webmode/stream.ts Mock stream hook emitting demo events on an interval; cleans up timer on unmount.
web-ui/src/lib/webmode/types.ts Defines webmode types for device tiers, panels, policy context, and config model.
web-ui/src/lib/websocket.ts Adds mock websocket that dispatches CustomEvents; on() currently stores listeners but isn’t used in this PR.
web-ui/src/styles/globals.css Updates base body background and adds new utility classes for webmode styling.
web-ui/tailwind.config.ts Extends Tailwind theme with neuro.void and float animation/keyframes.

Sequence Diagram

sequenceDiagram
  autonumber
  participant User
  participant Page as Next.js page.tsx
  participant CC as CommandCenter
  participant WMP as WebModeProvider
  participant State as useWebModeState
  participant Surf as CommandCenterSurface
  participant Policy as evaluatePanelPolicy
  participant PR as PanelRenderer
  participant Panel as Panel Component
  participant Cmd as CommandPanel
  participant WS as MockWebSocket

  User->>Page: Request "/"
  Page->>CC: Render <CommandCenter/>
  CC->>WMP: Wrap surface in provider
  WMP->>State: init reducer + config
  State-->>WMP: Return state/config/controlMode
  WMP-->>Surf: Provide context
  Surf->>Policy: Filter panelDefinitions
  Policy-->>Surf: Return allowed panels
  Surf->>PR: Render panels per layoutZones
  PR->>Panel: Resolve PanelRegistry[panel.id]

  User->>Cmd: Submit message
  Cmd->>WMP: sendSignal("Intent captured")
  WMP->>State: dispatch SIGNAL
  Cmd->>WS: send({type:"chat"})
  WS-->>User: Dispatch window CustomEvent
  Cmd-->>Cmd: Append assistant reply (timeout)
Loading

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

30 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +1 to +3
'use client';

import { Activity, ShieldCheck, Wifi, Signal } from 'lucide-react';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing React import
CommandCenterFrame uses React.ReactNode in the prop type, but this file doesn’t import React (or ReactNode). This will fail type-checking in TS setups without jsxImportSource/global React types. Import type React or type ReactNode from react and use it in the signature.

Comment on lines +39 to +41

setMessages(prev => [entry, ...prev]);
setInput('');
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-unique message IDs
Message IDs are derived from Date.now() (e.g. id: `${Date.now()}-user` ). If multiple messages are added within the same millisecond (easy via preset buttons or fast clicks), React will see duplicate keys and may mis-render the message list. Use a monotonic counter, crypto.randomUUID(), or include an incrementing suffix to guarantee uniqueness.

Comment on lines +1 to +3
'use client';

import { createContext, useContext } from 'react';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing React import
This file types children as React.ReactNode but doesn’t import React (or ReactNode). In TS configurations where React types aren’t globally available, this will cause a build/type-check failure. Import type React or type ReactNode from react and use it in the prop type.

@Neuro-Rift Neuro-Rift merged commit de333c2 into main Feb 10, 2026
3 of 4 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d68dd82d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread web-ui/src/lib/websocket.ts
Copy link
Copy Markdown
Owner Author

@Neuro-Rift Neuro-Rift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty good

Neuro-Rift added a commit that referenced this pull request Feb 23, 2026
Merge pull request #18 from demonking369/codex/redesign-web-mode-for-…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant