Skip to content

GPU canvas phase 5: on by default in the desktop app - #190

Draft
shrimbly wants to merge 8 commits into
claude/project-thread-e37zpifrom
claude/project-thread-qqc1f0
Draft

shrimbly wants to merge 8 commits into
claude/project-thread-e37zpifrom
claude/project-thread-qqc1f0

Conversation

@shrimbly

Copy link
Copy Markdown
Owner

Requested by Willie · project thread

Before: the GPU canvas was a preview you had to turn on in Settings › Canvas and restart for, and the desktop app drew with React Flow.

After: the desktop app draws with the GPU canvas from first launch. Settings › Canvas › "GPU canvas" turns it off, which goes back to the classic React Flow canvas straight away, for this one release. The browser build keeps the classic canvas.

Stacked on #189 (phase 4). Retarget to feature/gpu-canvas once #187–#189 merge.

How

  • Default on. electron/lib/gpu-canvas.cjs turns on CanvasDrawElement at every launch unless the classic canvas was chosen. NODE_BANANA_GPU_CANVAS=1/0 overrides a single run. On the page, node-banana-gpu-canvas now defaults to on when the desktop bridge is present and off otherwise.
  • Falls back instead of breaking. If there is no WebGL2 or a shader fails, the session switches to the classic canvas and shows a notice; the saved setting is not changed. After a GPU reset (webglcontextlost), the GPU canvas is rebuilt once WebGL comes back. A second reset falls back to classic. I checked this in Electron by forcing context loss with WEBGL_lose_context.
  • Settings copy. The row is now "GPU canvas" without "(preview)". The low-detail rows explain what they do on each canvas.
  • Two bugs from phases 3/4, found by the smoke test. The connection shader used active, which is a reserved word in GLSL ES 3.00, so no connections were drawn. Separately, live nodes lost their React Flow measured size on every render. React Flow then hid the node, which blurred the field being typed in, so a Prompt only ever got one character. Both were ported to GPU canvas phase 3: editing on the canvas #188/GPU canvas phase 4: live content #189, and I merged those versions here.
  • Desktop tests. electron:smoke now works on either canvas: it adds a Prompt, makes it live, types into it and checks the store. Acceptance, large-workflow and electron:performance check or measure through classic-canvas DOM, so they pin NODE_BANANA_GPU_CANVAS=0 unless you override it.
  • Removing React Flow. With the GPU canvas on, React Flow no longer draws the workflow. It only hosts the live nodes and the painter's sheets. The classic canvas branch gets removed after the release that keeps it behind the setting, as the brief's gate says.

Checks

  • npm run typecheck: clean. npm run lint: 0 errors.
  • npx vitest run: 382 files passed, 6560 tests. This includes the new setting.test.ts, and the projectsFolder test passed this time.
  • npm run electron:test: 56 passed.
  • electron:smoke --production under xvfb + SwiftShader: passes on the GPU canvas and with NODE_BANANA_GPU_CANVAS=0.
  • Not run: the Mac packaged acceptance run, and performance on the PC and Mac. Both wait for Willie.

🤖 Generated with Claude Code

https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo


Generated by Claude Code

…he setting

The desktop app turns HTML-in-Canvas on unless the classic canvas was
chosen, and the page defaults to the GPU canvas there. A canvas that cannot
start, or whose GPU resets twice, gives way to the classic canvas for the
session; a single reset rebuilds it once WebGL is back.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
… the classic canvas

The connection shader named a variable 'active', a reserved word in GLSL ES
3.00, so it never compiled and no connection was drawn since phase 3. A
shader that fails to compile now logs its driver log and gives way to the
classic canvas, rather than leaving parts of the graph undrawn.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
The live layer hands React Flow new node objects on every render, without
the size React Flow measured, so React Flow hid each live node until it
measured it again. Hiding the node blurred the field being typed in, so a
Prompt took one character at most. Renders now carry the measured size.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
It finds the canvas, its empty area and its nodes on the GPU canvas as well
as the classic one, makes the new Prompt live before typing in it, and
checks the text reached the store. NODE_BANANA_GPU_CANVAS=0 runs it on the
classic canvas; NODE_BANANA_SMOKE_CHROMIUM_FLAGS passes Chromium switches
(a container needs --no-sandbox), and Linux's key-storage prompt is
answered with session-only keys.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
The acceptance and large-workflow runs check recovery through the classic
canvas's text fields and nodes, and the canvas performance runner measures
the classic canvas, so they launch with NODE_BANANA_GPU_CANVAS=0 unless told
otherwise.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013ZXTt1yZN46oNN4z4tU5vo
@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
node-banana Ready Ready Preview Oct 13, 2026 6:48pm UTC

@coderabbitai

coderabbitai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
Preview — c616562f Deployed Oct 13, 2026 by vercel[bot]
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