Skip to content

refactor(web): move history conversion to api - #1043

Merged
Quick104 merged 5 commits into
apiv2from
refactor/apiv2-maint-06-history-conversion
Sep 12, 2026
Merged

Quick104 merged 5 commits into
apiv2from
refactor/apiv2-maint-06-history-conversion

Conversation

@Quick104

Copy link
Copy Markdown
Contributor

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 --check passed. 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.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 99ddb11a-d7c7-460d-86fb-17804c3e5d52

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-12T04:53:39.536129Z 9a8db8f New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The PR is not safe to merge until the missing history-import source converter is restored or relocated because the current hook cannot compile.

Findings

  1. P1 Source converter was removed ▶

Reviews (1) · Last reviewed commit: "refactor(web): move history import conve..."

Comment thread web/src/hooks/queries/history-import.ts Outdated
Comment on lines +21 to +22
export { historyImportRunFromV2, type PersonalImportRun } from "@/api/v2/historyImportTypes";
import { historyImportRunFromV2 } from "@/api/v2/historyImportTypes";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Source converter was removed

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread web/src/hooks/queries/history-import.ts Outdated
Comment on lines +21 to +22
export { historyImportRunFromV2, type PersonalImportRun } from "@/api/v2/historyImportTypes";
import { historyImportRunFromV2 } from "@/api/v2/historyImportTypes";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@Quick104
Quick104 merged commit 8eeb9f3 into apiv2 Sep 12, 2026
4 checks passed
@Quick104
Quick104 deleted the refactor/apiv2-maint-06-history-conversion branch September 12, 2026 05:52
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.

1 participant