发布

  • [OPIK-4966] [FE] refactor: extract shared deps from v1 for v1/v2 coexistence (#5787)

    frostbyte_neo 发布于 2026-03-23 13:14:46 +00:00

    • [OPIK-4966] [FE] refactor: extract shared deps from v1 for v1/v2 coexistence

    Move components, hooks, types, and constants out of v1/ into shared
    locations so both v1 and v2 can use the same instances. This prevents
    broken contexts and duplicated code when v2 is cloned from v1.

    Extracted to shared:

    • PageBodyStickyContainer → src/shared/
    • PageBodyScrollContainer context → src/contexts/
    • BaseTraceDataTypeIcon → src/shared/
    • VerticallySplitCellWrapper → src/shared/
    • UserComment folder → src/shared/
    • GoogleColabCardCore → src/shared/
    • ConfigurationType, GoogleColabCardCoreProps → src/types/shared
    • ProviderGridOption → src/types/providers
    • WorkspacePreference types/constants → src/constants/workspace-preferences
    • theme-provider, server-sync-provider, feature-toggles-provider → src/contexts/
    • integration-scripts, integration-logs → src/constants/

    Moved to v1 (not shared, has v1 deps):

    • TraceCountCell → v1/pages-shared/traces/
    • PromptImprovementDialog → v1/pages-shared/llm/

    Updated dependency-cruiser:

    • Broadened no-shared-importing-pages to block all v1/v2 imports
    • Added no-shared-infra-importing-versioned rule
    • Removed stale v1 provider exceptions from hooks rule

    Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com

    • [OPIK-4966] [FE] chore: remove stale dependency-cruiser violation rules

    Cleanup outdated dependency-cruiser exceptions for no-hooks-importing-components and no-shared-importing-pages, aligning with recent refactors.


    Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com

    下载附件