Skip to content

chore(canvas): remove the superseded Konva render layer#1410

Merged
jaylfc merged 1 commit into
devfrom
chore/canvas-remove-konva-layer
Jun 23, 2026
Merged

chore(canvas): remove the superseded Konva render layer#1410
jaylfc merged 1 commit into
devfrom
chore/canvas-remove-konva-layer

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 23, 2026

Copy link
Copy Markdown
Owner

The Konva board (KonvaBoard.tsx + element-to-konva.ts) was built against an earlier engine decision (the canvas-konva-migration spec, superseded by the Excalidraw decision) and was never wired into CanvasView (which renders the tldraw CanvasBoard). The Excalidraw migration replaces it and the element-to-excalidraw mapping has landed (#1407), so the Konva layer is dead code.

Removed

  • KonvaBoard.tsx, element-to-konva.ts and their two tests
  • the konva + react-konva dependencies (only KonvaBoard imported them)

Verified: nothing else imports KonvaBoard/element-to-konva or konva/react-konva; tsc -b clean; ProjectsApp tests 49 pass. tldraw stays the live renderer until the Excalidraw swap slice; this is only the Konva-removal half of the slice-6 cleanup (tldraw removal follows the swap).

Summary by CodeRabbit

  • Refactor

    • Updated the canvas rendering system implementation
  • Tests

    • Removed test files for the previous canvas renderer

The Konva board (KonvaBoard.tsx + element-to-konva.ts) was built against an
earlier engine decision and was never wired into CanvasView (the live renderer
is the tldraw CanvasBoard). The Excalidraw migration replaces it, and the
element-to-excalidraw mapping has landed, so the Konva layer is dead code.

Remove KonvaBoard.tsx, element-to-konva.ts, their two tests, and the konva +
react-konva dependencies (now unused). Drops two runtime deps from the desktop
bundle. tldraw stays the live renderer until the Excalidraw swap slice; this is
only the Konva-removal half of the cleanup.
@jaylfc jaylfc enabled auto-merge (squash) June 23, 2026 15:12
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 38fe1241-f96c-4d5a-834a-1df2c3d4a789

📥 Commits

Reviewing files that changed from the base of the PR and between 7e093ab and 31e5f7a.

⛔ Files ignored due to path filters (1)
  • desktop/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (6)
  • desktop/package.json
  • desktop/src/apps/ProjectsApp/__tests__/KonvaBoard.test.tsx
  • desktop/src/apps/ProjectsApp/__tests__/element-to-konva.test.ts
  • desktop/src/apps/ProjectsApp/canvas/KonvaBoard.tsx
  • desktop/src/apps/ProjectsApp/canvas/element-to-excalidraw.ts
  • desktop/src/apps/ProjectsApp/canvas/element-to-konva.ts
💤 Files with no reviewable changes (5)
  • desktop/src/apps/ProjectsApp/tests/element-to-konva.test.ts
  • desktop/src/apps/ProjectsApp/tests/KonvaBoard.test.tsx
  • desktop/package.json
  • desktop/src/apps/ProjectsApp/canvas/KonvaBoard.tsx
  • desktop/src/apps/ProjectsApp/canvas/element-to-konva.ts

📝 Walkthrough

Walkthrough

Removes the Konva-based canvas renderer from the ProjectsApp: deletes element-to-konva.ts (with its BaseNode/CanvasNode types and mapping functions), KonvaBoard.tsx, their test files, the konva and react-konva npm dependencies, and updates a stale comment in element-to-excalidraw.ts.

Changes

Konva Canvas Removal

Layer / File(s) Summary
Remove Konva deps and clean up Excalidraw comment
desktop/package.json, desktop/src/apps/ProjectsApp/canvas/element-to-excalidraw.ts
Removes konva and react-konva from dependencies and rewrites a file-level comment in element-to-excalidraw.ts that previously referenced the deleted Konva mapping.
Delete Konva mapping module and types
desktop/src/apps/ProjectsApp/canvas/element-to-konva.ts
Deletes the entire module defining BaseNode, CanvasNode, elementToNode, and elementsToNodes (soft-delete filter + z-index sort).
Delete KonvaBoard component
desktop/src/apps/ProjectsApp/canvas/KonvaBoard.tsx
Deletes the read-only Konva stage component including cursor-anchored wheel zoom, pan-on-drag, and per-node NodeView rendering.
Delete Konva tests
desktop/src/apps/ProjectsApp/__tests__/KonvaBoard.test.tsx, desktop/src/apps/ProjectsApp/__tests__/element-to-konva.test.ts
Removes all test coverage for KonvaBoard rendering and elementToNode/elementsToNodes mapping.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • jaylfc/taOS#1358: Added support for text, mermaid, flowchart, and mindmap_edge element kinds in the same element-to-konva.ts mapping module that this PR deletes.

Poem

🐰 Hop hop, the Konva stage is gone,
No more rectangles from dusk to dawn.
The react-konva dep has left the scene,
And elementsToNodes? Wiped squeaky clean!
Excalidraw now stands alone to draw —
A leaner canvas, free from Konva's law. 🎨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: removal of the Konva render layer that was superseded by Excalidraw.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/canvas-remove-konva-layer

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.

@kilo-code-bot

kilo-code-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Verified the PR claims in the description:

  • Repo-wide grep for konva|KonvaBoard|element-to-konva shows zero remaining imports; the only hit is a static test-fixture option label { label: "Konva", value: "konva" } in desktop/src/apps/DecisionsApp.test.tsx:35, which is unrelated string data.
  • package.json removes both konva and react-konva; package-lock.json transitively drops its-fine, @types/react-reconciler, and react-reconciler — consistent with the stated reason (only KonvaBoard imported them).
  • The only non-deletion change is a 2-line comment tweak in desktop/src/apps/ProjectsApp/canvas/element-to-excalidraw.ts:5-6 removing the stale "Mirrors element-to-konva" reference. New wording is grammatically and factually correct.
  • CanvasView still renders CanvasBoard (tldraw) as expected; no broken imports remain.
Files Reviewed (7 files)
  • desktop/package.json
  • desktop/package-lock.json
  • desktop/src/apps/ProjectsApp/__tests__/KonvaBoard.test.tsx (deleted)
  • desktop/src/apps/ProjectsApp/__tests__/element-to-konva.test.ts (deleted)
  • desktop/src/apps/ProjectsApp/canvas/KonvaBoard.tsx (deleted)
  • desktop/src/apps/ProjectsApp/canvas/element-to-konva.ts (deleted)
  • desktop/src/apps/ProjectsApp/canvas/element-to-excalidraw.ts

Reviewed by minimax-m3 · Input: 52.7K · Output: 1.7K · Cached: 137.6K

@gitar-bot

gitar-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Note

Your trial team has used its Gitar budget, so automatic reviews are paused. Upgrade now to unlock full capacity. Comment "Gitar review" to trigger a review manually.
Learn more about usage limits

Code Review ✅ Approved

Removes the superseded Konva board implementation and its associated dependencies now that the Excalidraw migration is underway. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Important

Your trial ends in 3 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@jaylfc jaylfc merged commit 9f050f0 into dev Jun 23, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in TinyAgentOS Roadmap Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant