feat: enhance governance proposal metadata handling#214
Open
Andre-Diamond wants to merge 18 commits intomainfrom
Open
feat: enhance governance proposal metadata handling#214Andre-Diamond wants to merge 18 commits intomainfrom
Andre-Diamond wants to merge 18 commits intomainfrom
Conversation
Add getServerSideProps to drep pages to skip static generation during build, which was causing a <Html> import error on Railway's Turbopack. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Turbopack on Railway incorrectly bundles _document Html import into the prerender context, breaking static page generation. Switch to webpack for builds and add getServerSideProps to remaining drep page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…way build Add getServerSideProps to /wallets and /wallets/new-wallet/[id], and getStaticProps to /404, working around Next.js 16 bundling bug that incorrectly includes _document Html import during prerendering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add getServerSideProps to all remaining page files to prevent the Next.js 16 bundling bug that incorrectly includes _document Html import during static page generation on Railway. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove component library imports (Button, Card, lucide-react) and useRouter from 404 page, replacing with plain HTML elements. The 404 page must be static in Next.js and cannot use getServerSideProps, so minimizing the dependency tree avoids the _document Html import bug. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use zero imports in 404.tsx (plain <a> instead of next/link) to prevent any dependency tree from triggering the _document Html bundling bug during static prerendering on Railway. The 404 page must be static in Next.js and cannot use getServerSideProps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Next.js 16 bundling bug on Railway causes ANY custom static page to fail during prerendering (even with zero imports) because _app.tsx wraps it and pulls in the problematic dependency tree. Removing the custom 404 lets Next.js use its built-in 404 which doesn't go through the full _app component tree during static generation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Railway was resolving to Next.js 16.1.4 (via ^16.0.7 caret range) which has a prerender bug that causes _document Html import to leak into static page bundles. Pinning to 16.1.6 matches the local version that builds successfully. Also restores the custom 404 page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Railway uses npm 10.7.0 via corepack, but the lockfile was generated with npm 11.x which resolves dependencies differently. This caused npm ci to fail with missing @simplewebauthn/browser@9.0.1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Html import validation bug in Next.js triggers on ANY custom 404 page during static generation on Railway's 47-worker environment, regardless of the page's imports. This is not reproducible locally with 9 workers. Removing the custom 404 lets Next.js use its minimal built-in 404 which avoids the _app wrapper during prerendering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The i18n config with a single locale ["en"] forced Next.js to generate /en/404 as a static page, which triggered the _document Html import bug on Railway's 47-worker environment. Since there's only one locale, the i18n config was doing nothing useful. Removing it eliminates the /en/ prefixed static page generation. Also restores the custom 404 page which works fine without i18n. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Create custom _error.tsx with getInitialProps to make error pages dynamic (server-rendered). Remove custom 404.tsx so _error handles all error codes. This eliminates ALL static page generation, which is the root cause of the Railway 47-worker prerender bug where _document's Html import leaks into shared webpack chunks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Added functions to fetch and normalize proposal metadata from various sources, including fallback mechanisms for missing data. Updated the governance proposal components to utilize these new functions, improving the robustness of metadata retrieval.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Add a `prestart` script to package.json that runs `prisma migrate deploy` before `next start`, ensuring all database tables exist. Also wrap the informational User lookup in getNonce with a try/catch so nonce generation doesn't fail if the User table is temporarily unavailable. https://claude.ai/code/session_01Y4mDygMY7HNHAJz7GUs5dz
Fix missing User table on startup
The migration was failing on Railway with "role anon does not exist" because it assumed Supabase-specific roles. Wrap policy creation in conditional checks so it works on any PostgreSQL instance. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use dynamic SQL loop that skips tables and roles that don't exist, making the migration safe for both Supabase and Railway environments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added functions to fetch and normalize proposal metadata from various sources, including fallback mechanisms for missing data. Updated the governance proposal components to utilize these new functions, improving the robustness of metadata retrieval.