Skip to content

feat: enhance governance proposal metadata handling#214

Open
Andre-Diamond wants to merge 18 commits intomainfrom
preprod
Open

feat: enhance governance proposal metadata handling#214
Andre-Diamond wants to merge 18 commits intomainfrom
preprod

Conversation

@Andre-Diamond
Copy link
Copy Markdown
Collaborator

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.

QSchlegel and others added 14 commits March 30, 2026 12:00
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.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

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

Project Deployment Actions Updated (UTC)
multisig Ready Ready Preview, Comment Apr 3, 2026 2:50pm

Request Review

claude and others added 2 commits April 3, 2026 13:30
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
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>
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