Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions with-dynamic/.vite/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"hash": "617a516a",
"configHash": "21b1d9d9",
"lockfileHash": "366f99a9",
"browserHash": "c1da27b5",
"optimized": {},
"chunks": {}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated Vite cache files committed

Low Severity

The PR adds .vite dependency cache artifacts (with-dynamic/.vite/deps/*) that are generated build output, not source. These files encode local cache hashes and can create noisy diffs, merge churn, and non-deterministic changes without functional value.

Additional Locations (1)

Fix in Cursor Fix in Web

Comment on lines +1 to +8

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Vite dependency cache files accidentally committed to repository

The .vite/deps/ directory is Vite's dependency pre-bundling cache, which is machine-specific and auto-generated. These files were accidentally committed.

Details

The with-dynamic/.vite/deps/_metadata.json and with-dynamic/.vite/deps/package.json are build artifacts that should not be checked in. Neither the root .gitignore nor with-dynamic/.gitignore includes .vite as an ignored pattern, which allowed these files to slip in.

These cached files contain machine-specific hashes (hash, configHash, lockfileHash, browserHash) that will differ per environment and could cause unnecessary merge conflicts or stale cache behavior when others clone the repo.

Impact: Other contributors may experience confusing Vite cache mismatches, and these files will generate noise in future diffs.

Prompt for agents
1. Remove the committed cache files by deleting the with-dynamic/.vite/ directory from version control:
   git rm -r with-dynamic/.vite/

2. Add .vite to the root .gitignore (around line 20, near the other Vite entries):
   .vite

3. Optionally also add .vite to with-dynamic/.gitignore for consistency.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

3 changes: 3 additions & 0 deletions with-dynamic/.vite/deps/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
29 changes: 11 additions & 18 deletions with-privy/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { usePrivy, useWallets } from "@privy-io/react-auth";
import { useSetActiveWallet } from "@privy-io/wagmi";
import { useAccount, useBalance, useChainId, useSignMessage, useSendTransaction } from "wagmi";
import { formatUnits } from "viem";
import { useFormo } from "@formo/analytics";
import { useFormo, parsePrivyProperties } from "@formo/analytics";
import { useState, useEffect, useRef } from "react";

export default function Home() {
const { ready, authenticated, login, logout } = usePrivy();
const { ready, authenticated, login, logout, user } = usePrivy();
const { wallets } = useWallets();
const { setActiveWallet } = useSetActiveWallet();
const { address, isConnected, connector } = useAccount();
Expand Down Expand Up @@ -81,15 +81,16 @@ export default function Home() {
});
};

// Handle identify
const handleIdentify = async () => {
if (!address || !formo) return;
// Identify user with Privy profile on connect
useEffect(() => {
if (!user || !formo) return;

await formo.identify({
address,
providerName: connector?.name,
});
};
const { properties, wallets } = parsePrivyProperties(user);

for (const wallet of wallets) {
formo.identify({ address: wallet.address, userId: user.id }, properties);
}
}, [user, formo]);

// Handle sign message (Formo automatically tracks this via wagmi integration)
const handleSignMessage = () => {
Expand Down Expand Up @@ -263,14 +264,6 @@ export default function Home() {
Track Page View
</button>

<button
onClick={handleIdentify}
disabled={!authenticated || !isConnected}
className="w-full bg-blue-600 hover:bg-blue-700 disabled:bg-gray-600 disabled:cursor-not-allowed text-white font-medium py-2 px-4 rounded-lg transition-colors"
>
Identify User
</button>

<div className="flex gap-2">
<input
type="text"
Expand Down
Loading