Re: [CSplus/RelationshipCRM] feat: 名刺アップロード+AI解析(BusinessCard) (PR #10)
- 相手(連絡先)
- -
- 会社
- -
- From(Gmail)
- notifications@github.com
- To / Cc(Gmail)
- relationshipcrm@noreply.github.com, koshiba@csplus.jp, author@noreply.github.com
- 作成日時
- 2026/07/12 11:08
- 更新日時
- 2026/07/12 11:08
本文
@chatgpt-codex-connector[bot] commented on this pull request. ### 💡 Codex Review Here are some automated review suggestions for this pull request. **Reviewed commit:** `532bd16050` <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). 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". </details> > +-- DropIndex +DROP INDEX "BusinessCard_contactNetworkingEventId_idx"; + +-- AlterTable +ALTER TABLE "BusinessCard" DROP COLUMN "backImageUrl", +DROP COLUMN "backOcrText", +DROP COLUMN "catchCopy", +DROP COLUMN "contactNetworkingEventId", +DROP COLUMN "frontImageUrl", +DROP COLUMN "frontOcrText", +DROP COLUMN "isConfirmed", +DROP COLUMN "serviceDescriptionRaw", +ADD COLUMN "companyId" TEXT, +ADD COLUMN "confidence" DOUBLE PRECISION, +ADD COLUMN "errorMessage" TEXT, +ADD COLUMN "imageUrl" TEXT NOT NULL, **<sub><sub></sub></sub> Backfill imageUrl before requiring it** If a deployed database contains even one row in the existing `BusinessCard` table, this migration fails here because Postgres cannot add a `NOT NULL` column without a default or backfill; the table already exists from the initial migration. That blocks `prisma migrate deploy` before the new upload flow can be used. Add the column nullable/backfill it (for example from `frontImageUrl`) and then set it `NOT NULL`, or provide a safe default. Useful? React with 👍 / 👎. > +function Field({ + label, + name, + defaultValue, + errors, + required, +}: { + label: string; + name: string; + defaultValue?: string; + errors?: string[]; + required?: boolean; +}) { + return ( + <div> + <label className="mb-1 block text-sm font-medium text-zinc-700"> **<sub><sub></sub></sub> Remount or control fields after reparse** When a user clicks `AIで再解析` for an ERROR/PARSED card, the server action updates the parsed fields and revalidates the route, but these inputs are uncontrolled and only read `defaultValue` on their first mount. The client component can be preserved across the refreshed RSC payload, so the newly parsed props do not populate the visible form and the retry appears to do nothing until a hard reload/remount. Key/remount the form on parsed data changes or make the fields controlled from refreshed props. Useful? React with 👍 / 👎. -- Reply to this email directly or view it on GitHub: https://github.com/CSplus/RelationshipCRM/pull/10#pullrequestreview-4677887932 You are receiving this because you authored the thread. Message ID: <CSplus/RelationshipCRM/pull/10/review/4677887932@github.com>