Skip to content

Split Provider page state/components and extract duplicated frontend helpers #9

Closed

Description

@NOirBRight

Problem

ProvidersPage.tsx owns multiple independent workflows, and helper logic is duplicated across app/chart/settings components.

Scope

  • Extract source navigation state, official usage panel, provider draft editor, and probe/catalog actions into separated components/hooks.
  • Extract shared date/provider/update helpers.

Acceptance Criteria

  • Official usage panel, source navigation/dirty-draft workflow, provider editor, and probe/catalog actions have separated components/hooks.
  • Shared date/provider/update helpers are extracted and reused.
  • No visible UI behavior changes except already-covered fixes.

Required Verification

Push-Location frontend; npm run build; npm run test:ui-contract; Pop-Location

Source Evidence

  • docs/reviews/v0.2-code-optimizer-audit.md
  • docs/reviews/v0.2-issue-plan.md

Activity

  1. NOirBRight commented on Jul 9, 2026

    @NOirBRight
    OwnerAuthor

    Local fix committed and merged into local dev.

    Commit: 041892c refactor: split provider page helpers

    What changed:

    • Extracted the Official OpenAI usage panel, storage cache helpers, responsive chart helpers, and usage limit bars into frontend/src/components/providers/OfficialOpenAIUsagePanel.tsx.
    • Extracted provider endpoint/probe normalization and summary helpers into frontend/src/lib/providerEndpoint.ts.
    • Extracted provider source navigation dirty-draft handling into frontend/src/hooks/useProviderNavigationGuard.ts.
    • Updated ui-contract tests to assert the new split boundaries instead of binding those contracts to ProvidersPage.tsx.
    • Removed an unused probe availability helper during review to avoid adding dead exported code.

    Verification:

    • Push-Location frontend; npm run build; npm run test:ui-contract; Pop-Location
      • build passed
      • ui-contract passed: 104/104

    Note: local dev only; not closing until pushed/merged remotely.

  2. self-assigned this
    on Jul 12, 2026
  3. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Dispatch

    • Profile: standard
    • Model: gpt-5.6-luna / max
    • Base: origin/dev@83485089ce1108d44ddba1d0f008afc2d93ce935
    • Branch: codex/issue-9-provider-page-split
    • Ownership: Provider page component/state/helper seam; sole Wave 1 writer for Provider UI
    • Candidate evidence: gap-audit local 041892c; preserve post-0.1.4 behavior and selectively port
    • Verification: frontend UI-contract tests, production build, focused Provider-page smoke
    • Integration parent: none; landing unlocks Use semantic Provider dirty detection when edits are reverted #84 and the Provider preset/credential lanes
  4. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Dispatch correction

    • The local branch codex/issue-9-provider-page-split already pointed at stale candidate 041892c, so it will not be used as the execution base.
    • The visible Worker is switching to fresh codex/issue-9-provider-page-split-refresh from origin/dev@83485089ce1108d44ddba1d0f008afc2d93ce935.
    • The stale candidate remains read-only gap-audit evidence and will not be rewritten or directly pushed.
  5. added a commit that references this issue on Jul 12, 2026
  6. NOirBRight commented on Jul 12, 2026

    @NOirBRight
    OwnerAuthor

    Merged PR 99 into dev at 3ae77b0. Standards/spec review passed after restoring primary and secondary OpenAI quota aliases; all four CI jobs passed. Provider downstream lanes remain deferred behind the priority Milestone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions