Skip to content

Conversation

@phoebus-84
Copy link
Collaborator

@phoebus-84 phoebus-84 commented Oct 9, 2025

@phoebus-84 phoebus-84 marked this pull request as ready for review November 24, 2025 15:01
@phoebus-84 phoebus-84 requested a review from Copilot November 24, 2025 15:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a Digital Product Passport (DPP) feature for products, including form creation, data storage, and display functionality. The implementation adds a comprehensive GC1-type DPP schema with multiple sections for product information, environmental data, and lifecycle tracking.

Key Changes:

  • Integrated a new DPP step in the project creation flow with collapsible sections for various product attributes
  • Added file upload capabilities to DPP with signature-based authentication
  • Implemented GC1DPP component for viewing stored passport data with file attachments
  • Updated dependencies (zenroom, react-hook-form, TypeScript) to support new cryptographic operations

Reviewed changes

Copilot reviewed 43 out of 46 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Updated zenroom to 5.26.1, react-hook-form to 7.66.0, moved TypeScript to devDependencies v5.9.3
next.config.js Extended webpack loader to handle .zen, .lua, and .json files
lib/resourceImages.ts Fixed Blob constructor to properly handle base64 Buffer conversion
lib/licenses/utils.ts Added optional chaining for license array mapping
lib/fileUpload.ts Added DPP file upload with signature authentication and hex conversion utilities
hooks/useSignedPost.ts Added Content-Type header to signed requests
hooks/useProjectCRUD.ts Added optional dppUlid parameter to project creation flow
components/partials/project/projectSections.tsx Added DPP section, made location optional for products
components/partials/project/[id]/ProjectTabs.tsx Reorganized tabs, added GC1DPP display tab
components/partials/project/[id]/ProjectDpp.tsx Fixed array index access for DPP trace data
components/partials/project/[id]/GC1DPP.tsx New comprehensive component for displaying GC1 DPP data with file attachments
components/partials/create/project/steps/LocationStep.tsx Commented out location requirement for products
components/partials/create/project/steps/DPPStep/* New DPP form implementation with schema, types, sections, and components
components/partials/create/project/CreateProjectForm.tsx Integrated DPP processing, file uploads, and submission to DPP service
components/GeneralCard.tsx Fixed React key prop to use index instead of stat value
.vscode/settings.json Updated code actions to use explicit values
.gitmodules Added interfacer-dpp submodule
.env.example Added NEXT_PUBLIC_DPP_URL environment variable
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (5)

package.json:1

  • The zenroom version 5.26.1 does not appear to exist. The latest stable version of zenroom is in the 2.x or 3.x range. This may cause installation failures.
    lib/fileUpload.ts:1
  • React hooks cannot be imported at module level for use in regular functions. The useStorage hook is called in SignMessage (line 146) and UploadFileOnDPP (line 160), but these are async functions, not React components. Hooks can only be called from React components or custom hooks.
    lib/fileUpload.ts:1
  • Corrected spelling of 'retrive' to 'retrieve' in the PR title.
    components/partials/project/[id]/GC1DPP.tsx:1
  • Remove debug console.log statements from production code.
    components/partials/project/[id]/GC1DPP.tsx:1
  • Remove debug console.log statements from production code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

if (Array.isArray(obj)) {
return Promise.all(obj.map(item => processDppValues(item)));
}
if (typeof obj === 'object') {
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

The type check typeof obj === 'object' will match arrays and null. Since arrays are already handled above, explicitly check obj !== null && !Array.isArray(obj) to avoid redundant processing or unintended behavior.

Suggested change
if (typeof obj === 'object') {
if (obj !== null && !Array.isArray(obj) && typeof obj === 'object') {

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@phoebus-84 phoebus-84 merged commit c5c3695 into main Nov 24, 2025
1 check passed
@phoebus-84 phoebus-84 deleted the GC1-dpp branch November 24, 2025 15:17
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.

Remove Graph (rename from DPP) from Services and Designs

2 participants