← Back to Pull requests

feat(editor): add image support to scripts (paste, drop, file picker) #5

Merged
Builder106 merged 9 files (273 lines) on Nov 23, 2026 10:14 UTC
View on GitHub
Builder106 Builder106 commented on Jun 10, 2026 21:57 UTC
Author

Summary

Brings the script-image workflow to the v3.0.0 React/Tiptap editor. This supersedes #4, which was written against the pre-v3.0.0 vanilla-JS frontend/renderer editor that no longer exists. Reimplemented as a first-class Tiptap image node rather than the old base64-in-textarea [[image:…]] marker hack.

Changes


  • Dependency: add @tiptap/extension-image, pinned to 3.22.3 so it resolves the same @tiptap/core as the rest of the Tiptap stack (a floating ^3.22.3 pulls core@3.26, which breaks @tiptap/react@3.22.3). The lockfile also picks up the stale version field fix (2.2.1 → 3.0.0) since npm install regenerates it.

  • EditView: insert images via paste, drag-and-drop, and a 🖼 toolbar file picker; images are stored as base64 data-URLs in the doc. Image-only scripts now save/start (guards switched from getText().trim() to editor.isEmpty).

  • tokenizer: emit an image token for image nodes so the read view sees them.

  • ReadView: render image tokens as <img class="read-image"> in the scrolling teleprompter.

  • style: image sizing/centering in both the editor and the read view.
  • Testing


  • npm run build:frontend passes clean.

  • Logic reviewed end-to-end: edit (insert) → save (getJSON persists the image node) → read (tokenizer → <img>).
  • Runtime verification inside the Tauri shell is recommended before merge.

    Diff: 273 lines (+243 / -30) across 9 files Reviewer: ArunNGun Review duration: 238336m
    All Vouch review confidence checks passed
    Residual risk 0.06 = Change Risk (0.48) × (1 − Review Confidence (0.89)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 273 lines diff across 9 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.88 · 4 substantive comment(s)
    0.88
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    88%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.336
    Real PR Conversation Timeline
    6 items
    Builder106 Builder106 commented on Jul 19, 2026 01:34 UTC
    Author

    @ArunNGun Bumping this one as well. Let me know if you need any changes or if there are any blockers.

    ArunNGun ArunNGun approved these changes on Jul 19, 2026 06:48 UTC
    Approved Reviewer

    this looks good will merge after running an final build, thank you for your contribution

    Builder106 Builder106 commented on Aug 27, 2026 23:24 UTC
    Author

    @ArunNGun

    Thanks. I pushed 1b2febf to SankofaForge:pr/4-react-script-images. It fixes the order of multiple pasted or dropped images, replaces selected text when an image is pasted, and avoids updating an editor after it has been destroyed.

    The combined PR #5 and PR #6 changes passed the tests, lint, frontend build, dependency audit, and full ARM64 Tauri build. The build produced .deb, .rpm, and AppImage bundles.

    I recommend merging PR #6 first because both PRs touch the dependency files. After that, I can refresh PR #5 against main, regenerate its lockfile, and run the checks again.

    Builder106 Builder106 commented on Nov 14, 2026 12:27 UTC
    Author

    @ArunNGun

    hey, just reminding you that there's a pr here too to review and merge when you have the free time

    ArunNGun ArunNGun commented on Nov 23, 2026 10:14 UTC
    Contributor

    @ArunNGun

    > hey, just reminding you that there's a pr here too to review and merge when you have the free time

    thank you for the contribution @Builder106 , merging it

    Reviewers
    Assignees
    Builder106 Builder106
    Labels
    risk: low confidence: 88.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 48.3% (MEDIUM) · Higher = larger blast radius
    48.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 88.5% · Lower = rushed or shallow review
    88.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 5.5% · Safe to merge
    5.5%