Skip to content

Enable dynamic rendering for proposal space pages#1659

Merged
j-paterson merged 1 commit intocanaryfrom
codex/debug-500-error-on-proposal-spaces
Jan 15, 2026
Merged

Enable dynamic rendering for proposal space pages#1659
j-paterson merged 1 commit intocanaryfrom
codex/debug-500-error-on-proposal-spaces

Conversation

@willyogo
Copy link
Copy Markdown
Member

@willyogo willyogo commented Jan 8, 2026

Motivation

  • Proposal spaces at /p/[proposalId] were failing with a Next.js DYNAMIC_SERVER_USAGE error because the page was forced to be statically rendered.
  • Token, profile, and channel space pages render dynamically and the proposal page needs the same dynamic behavior to load live proposal data.

Description

  • Removed export const dynamic = "force-static" and export const revalidate = 60 from src/app/(spaces)/p/[proposalId]/page.tsx so the page can be rendered dynamically.
  • The page continues to use loadProposalSpaceData, decode the tabname param, and render ProposalProvider and ProposalSpace as before.
  • This change prevents the DYNAMIC_SERVER_USAGE error and allows server-side data fetching for proposal pages.

Testing

  • No automated tests were run as part of this change.
  • The change is limited to removing static rendering hints and does not modify existing data-loading or rendering logic.

Codex Task

Summary by CodeRabbit

  • Chores
    • Removed rendering configuration from proposal details page.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 8, 2026

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

Project Deployment Review Updated (UTC)
space-system Ready Ready Preview, Comment Jan 8, 2026 7:08pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 8, 2026

📝 Walkthrough

Walkthrough

Removed static rendering configuration exports (dynamic = "force-static" and revalidate = 60) from a Next.js page component, allowing the page to use default rendering behavior instead of explicit incremental static regeneration settings.

Changes

Cohort / File(s) Summary
Next.js Page Configuration
src/app/(spaces)/p/[proposalId]/page.tsx
Removed module-level exports controlling static/dynamic rendering (dynamic = "force-static" and revalidate = 60). Page now uses default rendering strategy. File now ends with proper newline.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A rabbit hops through configs clear,
Removing rules that once held sway,
Dynamic freedom draws near,
Let defaults guide the way today! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Enable dynamic rendering for proposal space pages' accurately describes the main change: removing static rendering directives to allow dynamic rendering.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@willyogo willyogo marked this pull request as ready for review January 8, 2026 19:10
@willyogo willyogo added the LGFTP Looks Good From Testing Perspective label Jan 8, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/app/(spaces)/p/[proposalId]/page.tsx (1)

7-40: Consider implementing request-level caching if needed.

With ISR removed, each request will trigger a new server render and data fetch. If loadProposalSpaceData makes expensive database queries or API calls, consider implementing request-level caching strategies (e.g., React cache(), Next.js unstable_cache()) to optimize performance without sacrificing data freshness.

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b96e66a and f78937a.

📒 Files selected for processing (1)
  • src/app/(spaces)/p/[proposalId]/page.tsx
🔇 Additional comments (2)
src/app/(spaces)/p/[proposalId]/page.tsx (2)

1-42: LGTM! Removal of static rendering configuration is correct.

Removing dynamic = "force-static" and revalidate = 60 is the appropriate fix for the DYNAMIC_SERVER_USAGE error. The page uses async operations (await params and loadProposalSpaceData) that require dynamic rendering, making the static configuration incompatible.


1-42: Architectural consistency across space pages is confirmed.

All space pages (token, profile, channel, proposal) consistently render dynamically without dynamic = "force-static" or revalidate exports. This page follows the established pattern used across all space types.

@j-paterson j-paterson merged commit 824c565 into canary Jan 15, 2026
5 checks passed
@j-paterson j-paterson deleted the codex/debug-500-error-on-proposal-spaces branch January 15, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex LGFTP Looks Good From Testing Perspective

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants