Repository navigation
refactor(web): move history conversion to api - #1043
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
| export { historyImportRunFromV2, type PersonalImportRun } from "@/api/v2/historyImportTypes"; | ||
| import { historyImportRunFromV2 } from "@/api/v2/historyImportTypes"; |
There was a problem hiding this comment.
The refactor deletes historyImportSourceFromV2, but useHistoryImportSources() still passes it to map. The new module exports only the run converter and type, so TypeScript cannot resolve this name and the frontend build fails. The deleted function also performed the required conversion from the wire source ID string to the UI's numeric ID.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1e008394b8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| export { historyImportRunFromV2, type PersonalImportRun } from "@/api/v2/historyImportTypes"; | ||
| import { historyImportRunFromV2 } from "@/api/v2/historyImportTypes"; |
There was a problem hiding this comment.
Restore the removed source conversion helper
Building the frontend or loading the history-import sources query now fails because useHistoryImportSources still passes historyImportSourceFromV2 to map at line 68, but this change deletes that function without importing or relocating it. TypeScript reports Cannot find name 'historyImportSourceFromV2', and transpilation without type-checking leaves a runtime ReferenceError; move this adapter alongside the run adapter or retain its local definition.
Useful? React with 👍 / 👎.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The administrator history-import API imported its run converter from a React Query hook module. This moves the shared run type and pure v2 converter into the API module, keeps hook exports as compatibility aliases, and removes the UI dependency from the administrator API boundary.
Related issue: #135
Validation:
git diff --checkpassed. Frontend lint, typecheck, and tests were not run because this checkout did not contain the frontend dependencies.AI disclosure: Implemented with Codex (gpt-6-astra) under the Codex agent harness. Independent Astra high subagent review covered web history-import ownership and verified identifier conversion and hook compatibility.