Skip to content

[#11] Frontend API integration#123

Merged
igorsatsyuk merged 19 commits into
mainfrom
feature/#11-frontend-api-integration
May 17, 2026
Merged

[#11] Frontend API integration#123
igorsatsyuk merged 19 commits into
mainfrom
feature/#11-frontend-api-integration

Conversation

@igorsatsyuk

@igorsatsyuk igorsatsyuk commented May 17, 2026

Copy link
Copy Markdown
Owner

Description

Integrates Angular UI with Query Service and Integrity Check APIs for issue #11.

Closes

Subtasks completed

Related

Main changes

frontend/audit-ui/src/app/models/audit-log.model.ts

  • Added BlockchainRecord and IntegrityCheckResponse
  • Extended AuditLogFilters with pagination/time filters

frontend/audit-ui/src/app/services/audit-log.service.ts

  • Added getAuditLogById(id)
  • Added checkIntegrity(id)
  • getAuditLogs now passes all filter params including pagination

frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts

  • Added page state signals (pageSize, pageIndex, estimatedTotal)
  • Added drawer integrity state (integrityLoading, integrityCheckResult, integrityCheckError)
  • Added onPageChange, retry, and proper teardown via ngOnDestroy + takeUntil

frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html

  • Added page-level loading progress bar
  • Added error block with retry action
  • Added paginator controls
  • Added drawer blockchain verification section

frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.scss

  • Added styles for error block, details list, monospace hash values, and progress states

Testing

cd frontend/audit-ui
npm run test:headless

Result: TOTAL: 34 SUCCESS

Checklist

  • Angular 17 standalone + signals + reactive patterns used
  • Self-review completed
  • No invalid as usage in @else if
  • takeUntil applied for teardown safety
  • Unit tests passing

Copilot AI review requested due to automatic review settings May 17, 2026 07:20

Copilot AI 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.

Pull request overview

Integrates the Angular audit dashboard with Query Service list/detail endpoints and the integrity-check API, adding typed models, pagination, loading/error states, and blockchain verification details.

Changes:

  • Added API models and service methods for paginated audit logs, log details, and integrity checks.
  • Updated the dashboard to load live data, paginate results, retry failures, and show blockchain verification in the drawer.
  • Expanded unit tests for service and dashboard behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
frontend/audit-ui/src/app/models/audit-log.model.ts Adds blockchain/integrity response models and pagination/date filter fields.
frontend/audit-ui/src/app/services/audit-log.service.ts Adds detail and integrity-check requests and forwards additional query parameters.
frontend/audit-ui/src/app/services/audit-log.service.spec.ts Extends HTTP service coverage for filters, detail lookup, and integrity checks.
frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Adds pagination state, retry handling, destroy cleanup, and integrity-check loading.
frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Renders live table states, paginator, hash tooltips, and blockchain drawer details.
frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.scss Adds styles for loading, errors, no-data state, details, and hash/blockchain display.
frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.spec.ts Expands component tests for loading, errors, filters, pagination, details, and parsing.

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

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/services/audit-log.service.ts

Copilot AI 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.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/environments/environment.prod.ts

Copilot AI 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.

Pull request overview

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

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 6 comments.

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
@igorsatsyuk igorsatsyuk requested a review from Copilot May 17, 2026 15:21

Copilot AI 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.

Pull request overview

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

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.scss:124

  • The green text/background combination for ON_CHAIN has insufficient contrast for the 12px chip text (roughly below the 4.5:1 WCAG AA threshold). Use a darker foreground or different background so the status remains readable for low-vision users.
.status-chip--on_chain {
  background: #e6f4ea;
  color: #1e8e3e;
}

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.ts Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.scss Outdated
…ignment

- Remove role=status from integrity status chip (no live-region for static cells)
- Replace info button (no action) with role=button span + stopPropagation
- Add aria-label to page-level and drawer integrity progress bars
- Add showFirstLastButtons to mat-paginator
- Darken PENDING chip text #b06000 -> #7a4200 for WCAG 4.5:1 contrast
- Do NOT update rowIntegrityById to UNKNOWN on transport failure
  (drawer error message is sufficient; list status must not be overwritten)
- Update 2 specs to match: preserve original list status on integrity error

Copilot AI 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.

Pull request overview

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

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated

Copilot AI 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.

Pull request overview

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

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated

Copilot AI 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.

Pull request overview

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

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.html Outdated
Comment thread frontend/audit-ui/README.md Outdated
Comment thread frontend/audit-ui/src/environments/environment.development.ts

Copilot AI 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.

Pull request overview

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

Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.scss Outdated
Comment thread frontend/audit-ui/src/app/features/audit-dashboard/audit-dashboard.component.scss Outdated

Copilot AI 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.

Pull request overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated no new comments.

@igorsatsyuk igorsatsyuk self-assigned this May 17, 2026
@igorsatsyuk igorsatsyuk merged commit dd320b9 into main May 17, 2026
1 check passed
@igorsatsyuk igorsatsyuk deleted the feature/#11-frontend-api-integration branch June 5, 2026 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment