Skip to content

fix(js): render GIF terminal artifacts on Node.js - #184

Merged
konard merged 4 commits into
mainfrom
issue-183-49600e8cc302
Jul 26, 2026
Merged

fix(js): render GIF terminal artifacts on Node.js#184
konard merged 4 commits into
mainfrom
issue-183-49600e8cc302

Conversation

@konard

@konard konard commented Jul 26, 2026

Copy link
Copy Markdown
Member

Summary

  • normalize the gifenc dynamic import for both Node.js CommonJS interop and Bun named exports
  • add a Node-native artifact regression test that verifies a valid GIF is written
  • run the regression test on the existing Node 20, 22, and 24 CI matrix
  • add a patch changeset for the JavaScript package

Reproduction

On Node 20.20.2, calling writeTerminalArtifacts (or captureTerminal with artifactDirectory) failed before this change with:

TypeError: GIFEncoder is not a function
    at renderGif (.../src/terminal-artifacts.mjs:429:15)

The new Node-native test reproduced that exact failure before the implementation change.

Automated verification

  • node --test js/tests/node-terminal-artifacts.mjs
  • bun test js/tests/terminal-capture.test.mjs --timeout 10000
  • bun test js/tests/ --timeout 10000 (783 passed, 5 skipped, 0 failed)
  • bun run lint
  • bun run format:check
  • bun run check:duplication
  • bun scripts/validate-changeset.mjs

Fixes #183

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #183
@konard konard self-assigned this Jul 26, 2026
@konard konard changed the title [WIP] GIF artifact rendering fails on Node 20: GIFEncoder is not a function fix(js): render GIF terminal artifacts on Node.js Jul 26, 2026
@konard konard added the parity-exempt Change is intentionally single-language; skip JS/Rust parity check label Jul 26, 2026
@konard

konard commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

CI note: the final Windows/Bun job has twice reproduced the repository's pre-existing issue #170 cleanup race, unrelated to this GIF import change.

I am rerunning only the failed job once more. Fixing the global process-cleanup race would be separate scope from issue #183.

@konard
konard marked this pull request as ready for review July 26, 2026 09:02
@konard

konard commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.6 Sol
  • Provider: OpenAI
  • Public pricing estimate: $10.012219

📊 Context and tokens usage:

  • 200.7K / 200K (100%) input tokens, 17.8K / 128K (14%) output tokens

Total: (200.7K + 7.2M cached) input tokens, 17.8K output tokens, $10.012219 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.6-sol
  • Thinking level: low (~7999 tokens)
  • Model: GPT 5.6 Sol (gpt-5.6-sol)

📎 Log file uploaded as Gist (2394KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
konard merged commit f920dd9 into main Jul 26, 2026
32 of 34 checks passed
@konard

konard commented Jul 26, 2026

Copy link
Copy Markdown
Member Author

🎉 Auto-merged

This pull request has been automatically merged by hive-mind.

  • All CI checks have passed

Auto-merged by hive-mind with --auto-merge flag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

parity-exempt Change is intentionally single-language; skip JS/Rust parity check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GIF artifact rendering fails on Node 20: GIFEncoder is not a function

1 participant