Skip to content

Site Update#59

Merged
rossgalloway merged 5 commits into
mainfrom
feat/general-improvements
Jul 8, 2026
Merged

Site Update#59
rossgalloway merged 5 commits into
mainfrom
feat/general-improvements

Conversation

@rossgalloway

@rossgalloway rossgalloway commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

Quality of Life update

  • Fixed GitHub OAuth redirect to use the current origin callback.
  • Added shared auth state via useGithubAuth.ts (line 1)
  • Split upload UI into focused pieces: dropzone, preview grid, PR dialog, status banner.
  • Reworked upload.tsx (line 64) around stable token IDs, inline status messages, cleaner preview generation, and object URL cleanup.
  • Changed uploads to send a structured items manifest, with server-side EVM validation and clearer 400 errors in upload.ts (line 94).
  • Removed alert()/popup-style upload feedback and the imperative file-input creation.
  • Styling and UX improvements. Better Layout. Don't lose data when connecting
  • Removed Solana support
  • Added URL parameters to allow links to pre-fill input data.

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
token-assets Ready Ready Preview, Comment Jul 8, 2026 1:08pm
token-assets-ui Ready Ready Preview, Comment Jul 8, 2026 1:08pm

Request Review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the app/image-tools upload application to improve UX and reliability (auth state sharing, draft persistence, modular UI components) and updates server-side upload handling to accept a structured items manifest with clearer validation/errors. It also removes Solana references from documentation/config and updates TypeScript configuration/dependencies.

Changes:

  • Refactors the upload page into reusable components, adds URL-prefill params, status banner messaging, and IndexedDB-backed draft persistence.
  • Updates GitHub OAuth handling (explicit callback redirect URI) and centralizes auth token state via a hook.
  • Reworks /api/upload to parse an items manifest and validate EVM token uploads server-side with clearer 400s.

Reviewed changes

Copilot reviewed 21 out of 43 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tokens/1151111081099710/So11111111111111111111111111111111111111112/logo.svg Removes Solana token SVG content (as part of Solana support removal).
tokens/1151111081099710/J3umBWqhSjd13sag1E1aUojViWvPYA5dFNyqpKuX3WXj/logo.svg Removes Solana token SVG content.
tokens/1151111081099710/DV3845GEAVXfwpyVGGgWbqBVCtzHdCXNCGfcdboSEuZz/logo.svg Removes Solana token SVG content.
tokens/1151111081099710/bioJ9JTqW62MLz7UKHU69gtKhPpGi1BQhccj2kmSvUJ/logo.svg Removes Solana token SVG content.
tokens/1151111081099710/93bvs9o8nq88zxnlwwuavfn5pxbhccnv5sfs6aflno8q/logo.svg Removes Solana token SVG content.
tokens/1151111081099710/3DK98MXPz8TRuim7rfQnebSLpA7VSoc79Bgiee1m4Zw5/logo.svg Removes Solana token SVG content.
tokens/1151111081099710/11111111111111111111111111111111/logo.svg Removes Solana token SVG content.
README.md Removes Solana chain ID mention; simplifies address casing guidance.
package.json Adds @types/node dependency.
docs/upload-ingestion-feature-plan.md Removes Solana-specific casing notes; updates future work bullets accordingly.
bun.lock Updates lockfile for @types/node and adds undici-types.
app/image-tools/tsconfig.json Adds Node types to TS config.
app/image-tools/src/routes/upload.tsx Major refactor: stable item IDs, modular UI, status messaging, URL params, preview cleanup, draft persistence, structured upload manifest building.
app/image-tools/src/lib/uploadDraft.ts Adds IndexedDB-backed draft persistence for upload form state.
app/image-tools/src/lib/imagePreview.ts Adds shared preview/file helpers, PNG preview generation, and object URL cleanup utilities.
app/image-tools/src/lib/githubAuth.ts Adds explicit callback URL builder and sets OAuth redirect_uri/prompt.
app/image-tools/src/hooks/useGithubAuth.ts Adds shared auth-token hook for consistent token state across components.
app/image-tools/src/components/StatusBanner.tsx Adds status banner component for inline info/success/error messages.
app/image-tools/src/components/SegmentedToggle.tsx Improves accessibility semantics via radio roles/aria attributes.
app/image-tools/src/components/PrReviewDialog.tsx Extracts PR review modal into a reusable component.
app/image-tools/src/components/PreviewGrid.tsx Adds a dedicated preview grid component for SVG/PNG previews.
app/image-tools/src/components/Header.tsx Switches to shared auth hook; passes token to GithubSignIn.
app/image-tools/src/components/GithubSignIn.tsx Refactors sign-in UI/state and introduces explicit OAuth redirect behavior.
app/image-tools/src/components/AssetDropzone.tsx Adds reusable dropzone component with keyboard support.
app/image-tools/README.md Updates env var guidance and restructures docs formatting.
app/image-tools/api/upload.ts Adds items-manifest parsing, server-side EVM validation, duplicate chain checks, and clearer 400 errors.
app/image-tools/api/auth/github/callback.ts Adds redirect_uri to OAuth token exchange based on request origin.
app/image-tools/AGENTS.md Removes Solana casing guidance.
AGENTS.md Removes Solana casing guidance.
Comments suppressed due to low confidence (2)

app/image-tools/src/components/GithubSignIn.tsx:12

  • GitHub OAuth now sets an explicit redirect_uri, but this component doesn’t import or use the API base URL to build it. Without using the API origin (VITE_API_BASE_URL / vercel dev), OAuth can redirect back to the SPA origin (e.g., Vite :5173) where /api/auth/github/callback doesn’t exist, breaking sign-in.
import React, {Fragment, useEffect, useState} from 'react';
import {Dialog, Transition} from '@headlessui/react';

import {
	broadcastAuthChange,
	storeAuthState,
	clearStoredAuth,
	buildAuthorizeUrl,
	markAuthPending,
	clearAuthPending,
	readAuthPending
} from '../lib/githubAuth';

package.json:12

  • @types/node is a TypeScript-only package and shouldn’t be in runtime dependencies. Keeping it in dependencies can bloat installs for consumers that only need runtime packages.
	"dependencies": {
		"@fleekxyz/sdk": "^0.7.3",
		"@types/node": "^25.9.3",
		"ethers": "^6.0.8",
		"fs-extra": "^9.1.0",
		"keccak": "^3.0.4"
	},

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 57 to 69
const signIn = () => {
const state = randomState();
storeAuthState(state);
markAuthPending();
setConnecting(true);
const clientId = import.meta.env.VITE_GITHUB_CLIENT_ID;
if (!clientId) {
alert('Missing VITE_GITHUB_CLIENT_ID');
setConfigError('Missing GitHub client ID.');
return;
}
setConfigError('');
storeAuthState(state);
markAuthPending();
setConnecting(true);
window.location.href = buildAuthorizeUrl(clientId, state);
};
Comment on lines +57 to +66
return new Promise((resolve, reject) => {
const request = indexedDB.open(DB_NAME, 1);

request.onupgradeneeded = () => {
const db = request.result;
if (!db.objectStoreNames.contains(STORE_NAME)) db.createObjectStore(STORE_NAME);
};
request.onsuccess = () => resolve(request.result);
request.onerror = () => reject(request.error);
});

@murderteeth murderteeth left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Dependency not pinned@types/node is added as ^25.9.3 in the root package.json. The caret allows silent minor/patch upgrades, which violates our pinning requirement. Please change it to exact 25.9.3 and update bun.lock to match.

@rossgalloway

Copy link
Copy Markdown
Collaborator Author

Updated to pin dep.

@rossgalloway
rossgalloway merged commit 608361f into main Jul 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants