feat: mobile canvas viewer for Telegram WebView integration#10
feat: mobile canvas viewer for Telegram WebView integration#10mateobelanger wants to merge 2 commits into
Conversation
Change canvas URL from /canvas/<id> to /view/<id> to point users to a new stripped-down, mobile-first viewer route that works in Telegram's WebView instead of hitting the "screen too small" blocker. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Greptile SummaryThis PR makes a one-line URL path change in the plugin — replacing Key observations:
Confidence Score: 5/5Safe to merge; the plugin-side change is a single string literal with thorough test coverage, and no regressions are introduced in this repo The diff is minimal (one changed line of production code, four updated assertions), all tests align with the new path, and there are no logic errors. The only risk is deployment ordering between this plugin and the ryzome-monorepo frontend — a coordination concern outside this changeset's scope. No files in this changeset require special attention Important Files Changed
Sequence DiagramsequenceDiagram
participant Agent as OpenClaw Agent
participant Executor as canvas-executor.ts
participant API as Ryzome API
participant App as Ryzome App (/view/[canvasId])
Agent->>Executor: executeCanvasWithSteps(params)
Executor->>API: POST /v1/canvas { name, description }
API-->>Executor: { canvas_id: { $oid } }
Executor->>API: PATCH /v1/canvas/:id { operations }
API-->>Executor: 200 OK
Executor-->>Agent: { content: [{ text: "View: appUrl/view/:id" }] }
Agent-->>App: User opens appUrl/view/:id in Telegram WebView
Reviews (1): Last reviewed commit: "Merge branch 'main' into feat/telegram-m..." | Re-trigger Greptile |
Summary
/view/[canvasId]route — a stripped-down, mobile-first, read-only canvas viewer that works in Telegram's in-app browser (no more "Your screen is too small" blocker)/view/URLs instead of/canvas/URLsContext
OpenClaw users interact with the bot inside Telegram. When the agent creates a Ryzome canvas, the returned URL opens in Telegram's WebView — which hits
MobileCanvasEditor.tsx's "screen too small" blocker. This PR provides a mobile-optimized alternative.Part of the OpenClaw Telegram Mini App project ([Linear](https://linear.app/playgrounds
-ai/project/openclaw-telegram-mini-app-4f4be64612dc)).
Linked issues: RYZ-1426, RYZ-1427
Changes
Canvas app (
ryzome-monorepo):apps/canvas/src/app/view/[canvasId]/page.tsx— new routeapps/canvas/src/components/viewer/MobileCanvasViewer.tsx— full-viewport ReactFlow, touch-optimized, Telegram SDK hooksPlugin (
openclaw-ryzome):src/lib/canvas-executor.ts— URL path/canvas/→/view/Known limitations
tracks enabling link-sharing by default. Needs validation.
themeParamsnot yet mapped to loading/error states (low priority,dark theme is a reasonable default).
Test plan
/view/<canvasId>at 375px width in responsive dev tools — canvas renders, pan/zoom workspnpm typecheckpassespnpm testpasses (33/33 in plugin repo)/view/path