Skip to content

Add full sysinfo block preview with frontend-only WaveEnv/WPS mocks#3027

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/setup-sysinfo-block-mock
Draft

Add full sysinfo block preview with frontend-only WaveEnv/WPS mocks#3027
Copilot wants to merge 3 commits intomainfrom
copilot/setup-sysinfo-block-mock

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

The preview server had the new WaveEnv-based mocking path for widgets and block chrome, but sysinfo was still missing a corresponding setup. This wires sysinfo into the same model/block rendering flow and lets the preview drive updates entirely on the frontend via WPS.

  • What changed

    • Added a dedicated sysinfo preview that renders the real block, not just the inner view.
    • Seeds preview WOS state with a mock tab + block (meta.view = "sysinfo") so the existing block registry, block chrome, and SysinfoViewModel run unchanged.
    • Streams mock sysinfo events through handleWaveEvent() to exercise the live subscription/update path without backend involvement.
  • WaveEnv typing

    • Updated SysinfoEnv to use WaveEnvSubset<...> so its contract matches the newer typed env pattern already used by other encapsulated views/blocks.
  • Preview WPS support

    • Wired the preview bootstrap to install a no-op WPS RPC client so frontend subscriptions can exist safely in preview mode.
    • This keeps waveEventSubscribeSingle() functional while still avoiding any backend interaction.
  • Preview behavior

    • The new preview shows:
      • full block header/chrome
      • connection badge/header state
      • real sysinfo model behavior
      • continuously updating CPU + memory plots
const event = {
    event: "sysinfo",
    scopes: ["local"],
    data: makeSysinfoSample(pointNum, Date.now()),
};

handleWaveEvent(event);

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 10, 2026

Deploying waveterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9766ccc
Status:🚫  Build failed.

View logs

Copilot AI changed the title [WIP] Set up sysinfo block mock in WaveEnv Add full sysinfo block preview with frontend-only WaveEnv/WPS mocks Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants