Skip to content

Conversation

@aterga
Copy link
Contributor

@aterga aterga commented Dec 10, 2025

Motivation

Separate orthogonal concerns.

@aterga aterga requested a review from Copilot December 16, 2025 16:23
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 separates the Internet Identity canister frontend into a dedicated canister to better isolate orthogonal concerns and simplify the architecture.

  • Introduces a new internet_identity_frontend canister that serves static assets with HTTP certification
  • Updates build scripts to support building the new frontend canister independently
  • Adds new localization strings for recovery phrase verification and in-app browser workflows

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/internet_identity_frontend/src/main.rs New canister implementation for serving certified static assets with security headers and CSP
src/internet_identity_frontend/internet_identity_frontend.did Candid interface definition for HTTP request/response handling
src/internet_identity_frontend/README.md Documentation explaining the new frontend canister's purpose
src/internet_identity_frontend/Cargo.toml Dependencies for the new frontend canister
src/internet_identity/Cargo.toml Pin rand dependency versions to specific releases
src/frontend/src/lib/locales/*.po Add new translation strings for recovery phrase verification and browser navigation
scripts/build Add build support for the new frontend canister
dfx.json Configure deployment of the new frontend canister
Cargo.toml Add frontend canister to workspace and upgrade certification libraries

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


/// Fix up HTML pages by injecting canister ID and canister config
fn fixup_html(html: &str, config: &InternetIdentityInit) -> String {
let canister_id = Principal::from_text("u6s2n-gx777-77774-qaaba-cai").unwrap();
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

The hardcoded canister ID appears to be a placeholder or test value. Consider making this configurable via init arguments or an environment variable to avoid potential issues when deploying to different environments.

Suggested change
let canister_id = Principal::from_text("u6s2n-gx777-77774-qaaba-cai").unwrap();
let canister_id = config.canister_id;

Copilot uses AI. Check for mistakes.


[features]
# The dev_csp feature weakens the CSP in oder to facilitate development with a locally deployed II instance.
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'oder' to 'order'.

Suggested change
# The dev_csp feature weakens the CSP in oder to facilitate development with a locally deployed II instance.
# The dev_csp feature weakens the CSP in order to facilitate development with a locally deployed II instance.

Copilot uses AI. Check for mistakes.
# The dev_csp feature weakens the CSP in oder to facilitate development with a locally deployed II instance.
# In particular, this allows
# * accessing II using http instead of https
# * II to connect to localhost both on http and https, which is useful when developint a vc issuer
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'developint' to 'developing'.

Suggested change
# * II to connect to localhost both on http and https, which is useful when developint a vc issuer
# * II to connect to localhost both on http and https, which is useful when developing a vc issuer

Copilot uses AI. Check for mistakes.
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