Skip to content

fix build errs#1670

Merged
simo6529 merged 2 commits intomainfrom
fix-build-err
Dec 19, 2025
Merged

fix build errs#1670
simo6529 merged 2 commits intomainfrom
fix-build-err

Conversation

@simo6529
Copy link
Copy Markdown
Collaborator

@simo6529 simo6529 commented Dec 19, 2025

Summary by CodeRabbit

  • New Features

    • Added new API endpoints for retrieving wave outcomes with pagination support and distribution data.
  • Refactor

    • Updated wave outcome data structures to support both legacy and new formats for backward compatibility.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Simo <simo@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 19, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR refactors wave outcome handling by introducing a split between legacy and new outcome structures. It updates components and helpers to use ApiWaveOutcomeOld, expands the API specification with new endpoints and schemas (ApiCreateWaveOutcome, ApiWaveOutcomeDistributionItem, ApiWaveOutcomesPage), and migrates outcome models to support backward compatibility alongside modernized structures.

Changes

Cohort / File(s) Summary
Outcome Component Type Updates
components/waves/outcome/WaveManualOutcome.tsx, components/waves/outcome/WaveNICOutcome.tsx, components/waves/outcome/WaveOutcome.tsx, components/waves/outcome/WaveRepOutcome.tsx
Updated prop types: replaced ApiWaveOutcome with ApiWaveOutcomeOld across all four outcome components; no logic or rendering changes, only type signature updates.
Wave Helper Functions
helpers/waves/create-wave.helpers.ts
Updated getRankOutcomes, getApproveOutcomes, and getOutcomes to return ApiWaveOutcomeOld[] instead of ApiWaveOutcome[]; added TODOs for proper typing of loose any[] initializations.
Wave Conversion Helper
helpers/waves/waves.helpers.ts
Changed convertWaveToUpdateWave return type from ApiUpdateWaveRequest to any with a TODO for proper typing; removed ApiUpdateWaveRequest import.
API Specification
openapi.yaml
Introduced new schemas: ApiCreateWaveOutcome, ApiCreateWaveOutcomeDistributionItem, ApiWaveOutcomeDistributionItem, ApiWaveOutcomesPage, ApiWaveOutcomeOld; added new endpoints for retrieving wave outcomes and distributions; split ApiWaveOutcome with index field addition and removed distribution property; updated ApiCreateNewWave, ApiCreateWave, and ApiWave to reference new outcome types.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Areas requiring extra attention:

  • API schema changes introduce dual old/new outcome structures—verify backward compatibility across all endpoints
  • Type migration across five component/helper files—confirm all downstream consumers align with new types
  • Loose any typing introduced in helpers (create-wave.helpers.ts)—review for correctness and ensure TODO items are tracked
  • API endpoint changes and pagination structure (ApiWaveOutcomesPage)—validate contract completeness and error handling for 404 cases

Suggested reviewers

  • prxt6529

Poem

🐰 The waves now split, old and new side by side,
Outcomes refactored with proper, typed pride,
From one model true to a legacy guide,
Distribution items find their place, far and wide,
A backward-compatible hop through the tide! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-build-err

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67448c7 and a8b7c26.

⛔ Files ignored due to path filters (11)
  • generated/models/ApiCreateNewWave.ts is excluded by !**/generated/**
  • generated/models/ApiCreateWaveOutcome.ts is excluded by !**/generated/**
  • generated/models/ApiCreateWaveOutcomeDistributionItem.ts is excluded by !**/generated/**
  • generated/models/ApiUpdateWaveRequest.ts is excluded by !**/generated/**
  • generated/models/ApiWave.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOutcome.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOutcomeDistributionItem.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOutcomeDistributionItemsPage.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOutcomeOld.ts is excluded by !**/generated/**
  • generated/models/ApiWaveOutcomesPage.ts is excluded by !**/generated/**
  • generated/models/ObjectSerializer.ts is excluded by !**/generated/**
📒 Files selected for processing (7)
  • components/waves/outcome/WaveManualOutcome.tsx (1 hunks)
  • components/waves/outcome/WaveNICOutcome.tsx (1 hunks)
  • components/waves/outcome/WaveOutcome.tsx (2 hunks)
  • components/waves/outcome/WaveRepOutcome.tsx (1 hunks)
  • helpers/waves/create-wave.helpers.ts (4 hunks)
  • helpers/waves/waves.helpers.ts (2 hunks)
  • openapi.yaml (6 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@simo6529 simo6529 merged commit 089ce82 into main Dec 19, 2025
4 checks passed
@simo6529 simo6529 deleted the fix-build-err branch December 19, 2025 10:12
@sonarqubecloud
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot mentioned this pull request Dec 22, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Dec 30, 2025
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