Skip to content

Fix circuit hash export causing debug page crash#27

Merged
Steake merged 2 commits intoclaude/setup-e-011CUmBq91aTRqdLyS7cMipEfrom
copilot/sub-pr-26
Nov 3, 2025
Merged

Fix circuit hash export causing debug page crash#27
Steake merged 2 commits intoclaude/setup-e-011CUmBq91aTRqdLyS7cMipEfrom
copilot/sub-pr-26

Conversation

Copy link
Contributor

Copilot AI commented Nov 3, 2025

The debug page was failing with a module import error: circuit-manager.ts does not export CIRCUIT_HASHES. This constant lives in circuit-hashes.ts but was being incorrectly re-exported through circuit-manager.ts.

Changes

Fixed module export in src/lib/zkml/index.ts:

// Before - incorrect re-export
export {
  circuitManager,
  CIRCUIT_HASHES,  // ❌ circuit-manager.ts doesn't export this
  type CircuitArtifacts,
  type CircuitCacheStats,
} from "./circuit-manager";

// After - correct source
export {
  circuitManager,
  type CircuitArtifacts,
  type CircuitCacheStats,
} from "./circuit-manager";

export { CIRCUIT_HASHES } from "./circuit-hashes";  // ✅ actual source

Testing Report

Added comprehensive E2E validation report (E2E_TESTING_REPORT_SESSION.md) covering:

  • All pages load successfully after fix
  • Wallet mock controller with multiple user scenarios
  • ZKML prover component functionality
  • Trust network visualizations
  • Circuit artifact verification (16/32/64 sizes)

Screenshots

Debug page now loads correctly:
Debug Page

Wallet mock controller operational:
Wallet Controller

Connected state with high reputation user:
Connected State


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Fixed CIRCUIT_HASHES export in src/lib/zkml/index.ts (was incorrectly re-exporting from circuit-manager.ts instead of circuit-hashes.ts)
- Added comprehensive E2E testing report with screenshots
- Validated all major features: homepage, debug page, claim page, explore page
- Tested wallet mock controller with multiple user scenarios
- Verified ZKML prover component functionality
- All pages now load successfully without errors

Co-authored-by: Steake <530040+Steake@users.noreply.github.com>
Copilot AI changed the title [WIP] Add mock circuit artifacts and refactor circuit hash management Fix circuit hash export causing debug page crash Nov 3, 2025
Copilot AI requested a review from Steake November 3, 2025 18:56
@Steake Steake marked this pull request as ready for review November 3, 2025 21:01
Copilot AI review requested due to automatic review settings November 3, 2025 21:01
@Steake Steake merged commit 7198ec9 into claude/setup-e-011CUmBq91aTRqdLyS7cMipE Nov 3, 2025
Copy link

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 applies automated code formatting across the entire codebase using Prettier, standardizing code style for improved maintainability and consistency. The changes affect TypeScript/JavaScript files, JSON configuration files, and Markdown documentation.

Key Changes:

  • Reformatted all TypeScript/JavaScript files to use 2-space indentation and consistent formatting
  • Standardized JSON files (removed trailing commas, consistent spacing)
  • Updated Markdown files with consistent spacing and formatting
  • Changed quote style from single to double quotes in test files and scripts

Reviewed Changes

Copilot reviewed 23 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/unit/mock-api-consistency.test.ts Quote style standardization (single → double)
static/circuits/ebsl_*/settings.json Compact array formatting for model scales
src/routes/+layout.svelte Removed extra blank line
src/lib/zkml/index.ts Import statement formatting and organization
src/lib/web3/onboard.ts Multi-line import and expression formatting
src/lib/proof/*.js Consistent 2-space indentation throughout
src/lib/proof/*.d.ts TypeScript declaration formatting
src/lib/ebsl/core.js Function parameter and expression formatting
scripts/generate-mock-circuits.cjs Quote style and formatting consistency
documentation/*.md Added blank lines for better readability

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.

3 participants