Skip to content

Instantly share code, notes, and snippets.

@hi-ogawa
hi-ogawa / NOTE.md
Created August 24, 2026 04:17
Vitest Trace View external capture notes

Trace View External Capture

Goal

Rework Vitest Trace View so Vitest-owned DOM snapshots can be captured outside browser mode and displayed by the existing Vitest UI and HTML report. The motivating case is a Vitest Node test or custom E2E setup that uses the Playwright programmatic API, potentially through an injected client script.

@hi-ogawa
hi-ogawa / youtube-fetch-hardening.md
Created August 19, 2026 15:07
YouTube audio acquisition hardening investigation for youtube-audio-replacement

YouTube audio acquisition hardening investigation

Existing acquisition path

The extension creates a hidden credentialless https://www.youtube.com/embed/ iframe. A MAIN-world content script extracts VISITOR_DATA, calls /youtubei/v1/player as ANDROID_VR 1.65.10, selects a direct Opus audio format, and asks the extension background service worker to download Googlevideo in ranges.

@hi-ogawa
hi-ogawa / CLIENT-DIRECTED-ACTION-DISPATCH.md
Created July 30, 2026 00:57
Client-directed server action dispatch research

Client-Directed Action Dispatch

  • Repo: git@github.com:vitejs/vite-plugin-react.git
  • Commit: 32b9023fa34ea4fe4b3081ce7bddc1d7a86535f5
  • Branch: route-scoped-deployment
  • Worktree: /Users/hogawa/code/others/vite-plugin-react-route-scoped-deployment

Purpose

Explore client-directed action dispatch as an alternative to server-selected redispatch for route-scoped RSC deployments.

@hi-ogawa
hi-ogawa / SERVER-FUNCTION-EXTENSIBILITY.md
Created July 24, 2026 03:18
Proposal: userland React Server Function extensibility in @vitejs/plugin-rsc

Userland Server-Function Extensibility

Goal

Allow a framework-owned transform to make another directive produce React Server Functions without teaching @vitejs/plugin-rsc the directive's framework semantics.

The motivation comes from the semantics of Next.js "use cache": selected framework-owned callables can participate in React Server Function transport. The plugin-rsc API should not recognize "use cache", implement caching, or make the basic demo align with Next.js.

Primary Direction

@hi-ogawa
hi-ogawa / PRESERVE-SERVER-REFERENCES.md
Created July 24, 2026 01:46
Analysis: preserveServerReferences and Vinext use cache compatibility

Is preserveServerReferences Required For Vinext Compatibility?

Conclusion

No. preserveServerReferences is not required for Next.js-compatible "use cache" behavior.

Vinext currently uses the option when decoding cached Flight, so plugin-rsc PR #1289 is a dependency of that implementation. However, no Vinext failure or test demonstrates that opaque preservation is required. Next.js revives the referenced server module during cache replay and then reserializes the registered function as a Server Reference.

The actual compatibility requirement is that a Server Reference survives cached Flight replay and remains invocable. Avoiding implementation-module revival is a separate plugin-rsc capability.

@hi-ogawa
hi-ogawa / NOTE.md
Created July 22, 2026 08:30
React RSC debug channel architecture and minimal Vite example

React RSC Debug Channel

This note summarizes React's RSC debug channel and a possible minimal example for @vitejs/plugin-rsc. It is based on these revisions:

Project Revision
React b740af25
Next.js 153bf8ac
Waku 3f88539d
@hi-ogawa
hi-ogawa / NOTE.md
Created June 23, 2026 08:19
Cloudflare @cloudflare/vitest-pool-workers integration review (vitest-dev/vitest#10635)

Cloudflare @cloudflare/vitest-pool-workers — integration overview (#10635)

  • Issue: vitest-dev/vitest#10635 (Research and feedback for downstream integrations)
  • Vitest repo: git@github.com:hi-ogawa/vitest.git
  • Vitest commit: 76139c5a001b9d3dd880e79c2bd83861d1c98bda (branch main)
  • Vitest worktree: /Users/hogawa/code/others/vitest
  • workers-sdk repo: https://github.com/cloudflare/workers-sdk
  • workers-sdk commit: 2091f804396f28a700fb90420e6ecf8c46336702
  • Pool package: @cloudflare/vitest-pool-workers@0.16.18, peerDeps vitest@^4.1.0
  • Pool source: ~/code/others/workers-sdk/packages/vitest-pool-workers
@hi-ogawa
hi-ogawa / pr-1234-export-star-review.md
Last active May 29, 2026 07:44
vite-plugin-react PR 1234 export-star review notes

PR 1234 export-star review notes

Context

PR: vitejs/vite-plugin-react#1234

The PR handles bare export * from "..." in RSC boundary modules by pre-expanding star re-exports before the existing proxy/wrap transforms run.

Main implementation:

@hi-ogawa
hi-ogawa / dom-snapshot-replay-comparison.md
Last active April 21, 2026 05:39
DOM snapshot / replay architecture comparison for Vitest trace view
@hi-ogawa
hi-ogawa / trace-view-ecosystem-candidates.md
Created April 12, 2026 07:51
Vitest trace view ecosystem candidate research

Trace View Ecosystem Candidates

Date: 2026-04-12

Goal: find real ecosystem projects, preferably component libraries, that already use Vitest Browser Mode and can exercise the new browser.traceView workflow.

Search Method

Initial GitHub code search signals: