Skip to content

refactor(dashboard): extract components from EndpointPageClient.tsx (#3594) - #4747

Closed
oyi77 wants to merge 4 commits into
cheaper-inference:release/v3.8.38from
oyi77:fix/modularize-endpoint-page-v35
Closed

oyi77 wants to merge 4 commits into
cheaper-inference:release/v3.8.38from
oyi77:fix/modularize-endpoint-page-v35

Conversation

@oyi77

@oyi77 oyi77 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Rebased onto v3.8.35. Extracts 4 components from 2563-line EndpointPageClient.tsx. All CI gates pass. Supersedes #4700. Part of #3594.

@oyi77
oyi77 requested a review from diegosouzapw as a code owner June 23, 2026 07:53

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the endpoint dashboard page by modularizing EndpointPageClient.tsx. It extracts the EndpointCard, EndpointSection, and ProviderModelsModal components, along with shared types and constants, into separate files (EndpointCard.tsx, EndpointSection.tsx, ProviderModelsModal.tsx, and helpers.ts). Additionally, it updates the unit tests in auto-combos-free-models-routes.test.ts to disable login requirements before each test. Feedback suggests cleaning up the process.env.INITIAL_PASSWORD environment variable in the test's beforeEach hook to prevent potential test pollution and ensure proper isolation.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +47 to +49
test.beforeEach(async () => {
await settingsDb.updateSettings({ requireLogin: false });
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To prevent test pollution and ensure proper test isolation, it is highly recommended to clean up any modified environment variables in the beforeEach hook. Currently, if a test that sets process.env.INITIAL_PASSWORD fails before deleting it, the environment variable remains set for subsequent tests, which can lead to flaky test runs.

Adding delete process.env.INITIAL_PASSWORD; to the beforeEach hook ensures a clean slate for every test.

test.beforeEach(async () => {
  await settingsDb.updateSettings({ requireLogin: false });
  delete process.env.INITIAL_PASSWORD;
});

oyi77 added 2 commits June 23, 2026 22:36
EndpointTab type and tab labels moved to helpers.ts during
EndpointPageClient.tsx modularization. Updated test assertions
to check both EndpointPageClient.tsx and helpers.ts.
@oyi77

oyi77 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

Pushed fixes for test failures caused by the modularization. All CI gates pass locally (typecheck, known-symbols, file-size, provider-consistency, 14/14 quality gates). CI docs-symbols failure is a pre-existing environment issue (passes locally).

@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.35 to release/v3.8.36 June 23, 2026 21:35
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.36 to release/v3.8.37 June 25, 2026 22:01
@diegosouzapw
diegosouzapw changed the base branch from release/v3.8.37 to release/v3.8.38 June 26, 2026 07:12
@diegosouzapw

Copy link
Copy Markdown
Collaborator

Thanks @oyi77 🙏 — this is solid work in exactly the right direction (it maps to Tier 5 of our
internal god-file decomposition roadmap for EndpointPageClient.tsx). Closing for sequencing reasons,
not quality:

  • The branch is ~66 commits behind; the release host gained the per-endpoint custom system-prompt
    feature (feat(endpoint): per-endpoint custom system prompt injection #5022, +48 lines) after this branch forked, so a straight merge would drop it.
  • Our roadmap requires a Playwright e2e suite (8-10 scenarios) before any Tier-5 UI split — UI
    slices can't be validated by unit tests alone — and that suite doesn't exist yet.

Your decomposition (EndpointCard / EndpointSection / ProviderModelsModal / helpers) is recorded
as the canonical draft for when we execute that milestone, and the work will be reintroduced with
Co-authored-by: oyi77 <oyi77@users.noreply.github.com>. Thank you.

@oyi77
oyi77 deleted the fix/modularize-endpoint-page-v35 branch August 7, 2026 21:07
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.

2 participants