Skip to content

fix: prune react-core rsc render internals#1829

Open
ErnestM1234 wants to merge 1 commit into
mainfrom
e/odysseus/react-core-rsc-prune-render-internals
Open

fix: prune react-core rsc render internals#1829
ErnestM1234 wants to merge 1 commit into
mainfrom
e/odysseus/react-core-rsc-prune-render-internals

Conversation

@ErnestM1234

@ErnestM1234 ErnestM1234 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove dead RSC render helper exports from @generaltranslation/react-core/components-rsc
  • Keep createRenderPipeline and its RenderPipeline type available for existing public helper paths
  • Add a react-core patch changeset

Verification

  • pnpm --filter @generaltranslation/react-core... build
  • pnpm --filter @generaltranslation/react-core typecheck
  • pnpm --filter @generaltranslation/react-core test
  • pnpm --filter @generaltranslation/react-core build

Caveat

  • A direct gt-react typecheck was attempted during investigation and fails on an existing index.types.ts export of initializeGT from @generaltranslation/react-core/pure; this PR leaves gt-react unchanged.

Greptile Summary

This PR prunes dead internal exports from the @generaltranslation/react-core/components-rsc entrypoint, removing pre-instantiated RSC render pipeline helpers and their associated types that were never re-exported by downstream consumers.

  • Removes renderDefaultChildren, renderPreparedT, renderTranslatedChildren, renderVariable, createRenderVariable, prepareT, and getShouldTranslate from the public entrypoint, along with the RenderDefaultChildrenArgs, RenderPreparedTParams, and RenderTranslatedChildrenArgs type exports.
  • Retains createRenderPipeline and the RenderPipeline type, which are consumed by gt-react's RSC surface (index.rsc.ts line 89) and the gt-next build-time render pipeline.
  • Updates the companion test to assert absence of the removed exports and adds a patch changeset.

Confidence Score: 5/5

Safe to merge — the removed exports were internal-only helpers with no downstream consumers in gt-react or gt-next.

All removed exports (getShouldTranslate, prepareT, createRenderVariable, the four pre-instantiated render pipeline functions, and three arg types) are not re-exported by any downstream package. gt-react's index.rsc.ts only consumes createRenderPipeline and RenderPipeline, both of which are kept. The gt-next build-time renderPipeline.ts imports createRenderPipeline via gt-react and is unaffected. Tests are properly updated to assert absence of the pruned symbols.

No files require special attention.

Important Files Changed

Filename Overview
packages/react-core/src/components-rsc.ts Removes 7 internal RSC helper exports and 3 type exports; retains createRenderPipeline and RenderPipeline which are used by downstream packages. No downstream breakage detected.
packages/react-core/src/tests/components-rsc.test.ts Test updated to assert removed exports are absent and createRenderPipeline remains a function; all assertions align with the entrypoint changes.
.changeset/prune-react-core-rsc-render-internals.md Patch changeset correctly scoped to @generaltranslation/react-core; description accurately reflects the removal of duplicate render internals.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["gt-react / gt-next consumers"] -->|"import createRenderPipeline, RenderPipeline"| B["gt-react/index.rsc.ts"]
    B -->|"re-exports createRenderPipeline"| C["react-core/components-rsc.ts"]
    C -->|"kept"| D["createRenderPipeline\nRenderPipeline type"]
    C -->|"removed in this PR"| E["getShouldTranslate\nprepareT\ncreateRenderVariable\nrenderDefaultChildren\nrenderTranslatedChildren\nrenderVariable\nrenderPreparedT\nRenderDefaultChildrenArgs\nRenderPreparedTParams\nRenderTranslatedChildrenArgs"]
    style E fill:#f8d7da,stroke:#dc3545
    style D fill:#d4edda,stroke:#28a745
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["gt-react / gt-next consumers"] -->|"import createRenderPipeline, RenderPipeline"| B["gt-react/index.rsc.ts"]
    B -->|"re-exports createRenderPipeline"| C["react-core/components-rsc.ts"]
    C -->|"kept"| D["createRenderPipeline\nRenderPipeline type"]
    C -->|"removed in this PR"| E["getShouldTranslate\nprepareT\ncreateRenderVariable\nrenderDefaultChildren\nrenderTranslatedChildren\nrenderVariable\nrenderPreparedT\nRenderDefaultChildrenArgs\nRenderPreparedTParams\nRenderTranslatedChildrenArgs"]
    style E fill:#f8d7da,stroke:#dc3545
    style D fill:#d4edda,stroke:#28a745
Loading

Reviews (1): Last reviewed commit: "fix: prune react-core rsc render interna..." | Re-trigger Greptile

@ErnestM1234 ErnestM1234 requested a review from a team as a code owner July 4, 2026 02:02
Base automatically changed from odysseus to main July 4, 2026 02:25
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.

1 participant