refactor: render static page headers on the server - #822
Open
Vrohs wants to merge 3 commits into
Open
Conversation
Vrohs
force-pushed
the
refactor-817-approve-rule-server-header
branch
from
September 1, 2026 05:45
0725f98 to
7159bea
Compare
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.
By submitting this PR, I confirm I have followed the Contributing Guide.
Description
Moves the static page headers out of the client components and into the server
page.tsxfor the two routes where that is possible,rules/approveanddashboard. Both now match whatdids,rses,rules,subscriptionsandsuspicious-replicasalready do:<header className="mb-8">in the server component, with the interactive parts untouched below it.Worth flagging in case it changes what is wanted here: splitting a component inside
component-librarywould not have moved anything, since whatever a client component imports stays in the client bundle regardless of hooks. The markup has to reach the server component. Grepping the production build for each header's text:build/static(client-served) before/rules/approve/dashboardBoth are still rendered into the initial HTML from the server, so this is a bundle change rather than a rendering one: these components were already server-rendered and then hydrated.
The four detail pages are not candidates and are left alone.
DetailsDID,DetailsRSE,DetailsSubscriptionandDetailsRulehead their pages withCopyableHeading, which usesnavigator.clipboardanduseToastand so has to stay a client component; three of the four also render fetched data that is not available at the server component. Happy to be corrected if something else was intended for those.Checklist
in the description and the commit follows conventional commits
Notes for contributors
the Contributing Guide): use
Closes: #____on the commit that resolvesthe issue, and
Issue: #____on intermediate commits or if the issueshould remain open.
appropriate for the touched components; otherwise leave it empty and one
will be assigned.
closed promptly.
Additional notes for reviewer
Note: This OPTIONAL section is only relevant for the REVIEWER, please leave it in the PR
Reviewer template
Reviewers should copy&paste the code-block below and fill it out for APPROVED pull requests. If the PR does not meet the standards the project sets out, the reasons should be WELL EXPLAINED in a CHANGE REQUEST (The answers below do not need to be answered in that case)