Skip to content

Conversation

svenvoskamp
Copy link
Contributor

@svenvoskamp svenvoskamp commented Sep 23, 2025

Description

I refactored our current implementation with a generic and extensible architecture. The ConfigUtil will now support any feature flag that will come from the Cloud Dashboard.

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-3730

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Note

Introduce a generic feature-bag builder (with aliasing and social_login transform) and refactor ConfigUtil to use it, updating types and tests accordingly.

  • Config/Architecture:
    • Add config/build.ts implementing a generic buildFeatureBag with:
      • API→SDK alias mapping (e.g., swapswaps, historyactivity).
      • social_login transformation into email and socials.
      • Priority rules (basic mode, API success, API failure, defaults) and empty-array handling.
      • Detection/reporting of overridden local keys.
    • Add config/types.ts defining Json, FeatureBag, Layer, ApiEntry.
    • Refactor ConfigUtil.fetchRemoteFeatures to use buildFeatureBag; simplify warning message generation and return FeatureBag.
  • Tests:
    • Update ConfigUtil.test.ts expectations to new builder behavior, warning text, and key access patterns.

Written by Cursor Bugbot for commit f2296a7. This will update automatically on new commits. Configure here.

svenvoskamp added 30 commits May 6, 2025 09:33
Copy link
Contributor

github-actions bot commented Sep 23, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 80% 36726 / 45906
🔵 Statements 80% 36726 / 45906
🔵 Functions 78.32% 4004 / 5112
🔵 Branches 86.61% 8875 / 10246
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit/src/config/build.ts 80.3% 83.33% 100% 80.3% 37, 39-55, 66-73, 104, 106, 108, 115-116, 129, 134, 140, 147, 166, 217, 220, 287, 292, 295, 304, 308, 315, 321
packages/appkit/src/utils/ConfigUtil.ts 97.72% 95.45% 100% 97.72% 38
Generated in workflow #15481 for commit f2296a7 by the Vitest Coverage Report Action

cursor[bot]

This comment was marked as outdated.

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