redesign shared and imported agent cards - #42
Conversation
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
Fresh static review completed for the exact three-dot comparison c174a7d...aebbf42. The final self-check covered the share-card loading, fallback, unavailable, card-download, agent-download, import-preview, import-confirmation, animation, and cached-avatar flows; accessibility; localization; navigation and consent; async errors, never-completes, lifecycle, and races; test honesty; design-system and project rules; duplicate overlap; and blocking evidence plus user effect. Six publishable findings remain: two blocking and four non-blocking. All nine supplied GitHub check runs for the exact head SHA completed successfully. Recommendation: REQUEST_CHANGES.
Deterministic publication result: 2 blocking and 4 non-blocking finding(s) publishable; 0 duplicate(s) suppressed.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
Fresh static review completed for the exact three-dot comparison c174a7d...06fe4b1. The final self-check covered every changed share, download, fallback, unavailable-avatar, imported-card preview, import-confirmation, cached-animation, and localization flow; accessibility; i18n completeness; navigation and pre-consent guards; async errors, never-completes, lifecycle, and races; test honesty; design-system and project rules; duplicate overlap; and blocking evidence plus user effect. The prior font deadline, localized output, grapheme wrapping, deterministic casing, and tint parity issues are fixed. The short-window issue remains in loading and unavailable states, and two additional current issues remain. All eight supplied GitHub check runs for the exact head SHA completed successfully; the supplied combined status is separately pending with no statuses. Recommendation: REQUEST_CHANGES.
Deterministic publication result: 2 blocking and 1 non-blocking finding(s) publishable; 0 duplicate(s) suppressed.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
Fresh static review completed for the exact three-dot comparison c174a7d...6ef6fbf. The final self-check covered all changed share, loading, unavailable-avatar, card-download, agent-download, animated-avatar, imported-card preview, import-confirmation, and localization flows; accessibility; i18n completeness; navigation and pre-consent guards; async errors, never-completes, lifecycle, and races; test honesty; design-system and project rules; duplicate overlap; and blocking evidence plus user effect. The three findings from the immediately prior review are fixed. Two new publishable findings remain: one blocking async degraded-path gap and one non-blocking localized preview/export parity issue. All eight supplied GitHub check runs for the exact head SHA completed successfully; the supplied combined status is separately pending with no statuses. Recommendation: REQUEST_CHANGES.
Deterministic publication result: 1 blocking and 1 non-blocking finding(s) publishable; 0 duplicate(s) suppressed.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
Fresh static review completed for the exact three-dot comparison c174a7d...4fd3d84. The final self-check covered every changed share, loading, unavailable-avatar, card-download, agent-download, animated-avatar, imported-card preview, import-confirmation, and localization flow; accessibility; i18n completeness; navigation and pre-consent guards; async errors, never-completes, lifecycle, and races; test honesty; design-system and project rules; duplicate overlap; and blocking evidence plus user effect. No genuinely new publishable finding remains. Two currently present issues are suppressed because their authoritative GitHub threads are unresolved. Five supplied checks succeeded and Frontend checks and unit tests was in progress for the exact head; validation is complete because the supplied evidence was inspected. Recommendation: no new publication from this review because unresolved prior automated findings remain; required checks separately govern merge readiness.
Deterministic publication result: 0 blocking and 0 non-blocking finding(s) publishable; 2 duplicate(s) suppressed.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
Fresh static review completed for the exact three-dot comparison c174a7d...d1cd86c. The final self-check covered every changed share, loading, unavailable-avatar, card-download, agent-download, remote and cached animated-avatar, imported-card preview, import-confirmation, and localization flow; accessibility; i18n completeness; navigation and pre-consent guards; async errors, never-completes, lifecycle, and races; test honesty; design-system and project rules; duplicate overlap; and concrete blocking evidence plus user effect. The remote animation deadline and shared bounded trait-copy layout fix the two latest findings, but the equivalent optional cached-animation IPC wait remains unbounded and can still prevent the still-card degraded path. The related prior thread is resolved with no substantive human reply, so the still-present underlying issue is eligible to be reopened. Seven supplied checks succeeded and Transcript virtualization failed for the exact head; the supplied evidence contains no failure detail tying that unrelated check to a changed line, so CI is noted separately rather than invented as a code finding. Recommendation: REQUEST_CHANGES.
Deterministic publication result: 1 blocking and 0 non-blocking finding(s) publishable; 0 duplicate(s) suppressed.
morgmart
left a comment
There was a problem hiding this comment.
🤖 Automated code review
Fresh static review completed for the exact three-dot comparison c174a7d...9eefaec. The final self-check covered every changed share, loading, unavailable-avatar, card-download, agent-download, remote and cached animated-avatar, imported-card preview, import-confirmation, and localization flow; accessibility; i18n completeness; navigation and pre-consent guards; async errors, never-completes, lifecycle, and races; test honesty; design-system and project rules; duplicate and overlap handling; and concrete evidence plus user effect for blocking severity. The shared animation deadline now covers both remote fetches and cached-avatar IPC, and the supplied discriminating test verifies timeout fallback plus late-result suppression. All prior automated issues are resolved, no supplied thread has a substantive human reply, and no currently present issue survives the full review. All eight supplied GitHub check runs for the exact head SHA completed successfully; the supplied combined status is separately pending with no statuses. Recommendation: APPROVE.
Deterministic publication result: 0 blocking and 0 non-blocking finding(s) publishable; 0 duplicate(s) suppressed.
Pending checks: 1 check(s) are not complete.
This approval reflects the completed code review only; merge readiness remains governed by the repository's required checks.
* origin/main: polish home canvas widgets (#50) redesign shared and imported agent cards (#42) send queued messages in the background when the chat is not open (#41) # Conflicts: # src/features/home/onboarding/starterHomeLayout.ts # src/features/home/stores/homeWidgetRuntime.ts # src/features/home/stores/homeWidgetStore.test.ts # src/features/home/stores/homeWidgetStore.ts # src/features/home/ui/HomeView.tsx
Category: improvement
User Impact: Agent cards now use a consistent collectible-card design when sharing and importing, with avatar-aware color, motion, and more reliable portable exports.
Problem: Shared and imported agent cards used different visual treatments, and generated PNG exports could drift from the preview or lose avatar media in edge cases. Import actions also had a few presentation and interaction inconsistencies.
Solution: This redesign gives both flows one card language and shared reveal behavior while preserving existing
.agent.pngportability. Shared layout and color derivation keep preview and export aligned, and bounded avatar handling provides reliable fallbacks for stalled, oversized, or unavailable media.File changes
src-tauri/src/commands/avatars.rs
Adds a validated, size-bounded command for reading cached avatar animation bytes by trusted avatar reference.
src-tauri/src/lib.rs
Registers the cached-avatar animation command with Tauri.
src/features/agents/agent-snapshot/pngCodec.ts
Exposes validated PNG dimensions for imported card previews.
src/features/agents/agent-snapshot/pngCodec.test.ts
Covers dimension extraction and malformed PNG rejection.
src/features/agents/assets/share-card/berd-card-logo.svg
Adds the approved black Berd mark used by generated cards.
src/features/agents/assets/share-card/card-foil.png
Adds the foil artwork used by the redesigned card frame.
src/features/agents/ui/AgentImageImportDialog.tsx
Keeps the imported-agent dialog close control above its content.
src/features/agents/ui/AgentImportDialog.tsx
Aligns generated and existing imported-card previews with the shared reveal, tint, aspect-ratio, and holographic behavior.
src/features/agents/ui/AgentsView.tsx
Passes validated embedded avatars and PNG proportions into the import preview.
src/features/agents/ui/tests/AgentImageImportDialog.test.tsx
Protects close-button behavior in the configure-import flow.
src/features/agents/ui/tests/AgentImportDialog.test.tsx
Covers imported-card tilt and frame-only holographic behavior.
src/features/agents/ui/share-card/AgentCardReveal.tsx
Centralizes the shared card entrance and behind-card refraction treatment.
src/features/agents/ui/share-card/AgentCardReveal.test.tsx
Covers refraction layering, cleanup, replay, and reduced-motion behavior.
src/features/agents/ui/share-card/AgentShareCardPreview.tsx
Implements the new Berd trading-card preview with avatar-derived color, content sections, and cursor-revealed linework.
src/features/agents/ui/share-card/AgentShareDialog.tsx
Uses the redesigned preview, aligns export with reviewed media, preserves animation safely, and adds bounded fallbacks and the avatar-unavailable state.
src/features/agents/ui/share-card/AgentShareDialog.test.tsx
Covers readiness, fallback, cancellation, animation, retry, MIME, and terminal error behavior.
src/features/agents/ui/share-card/HolographicAgentCard.tsx
Extends the shared holographic surface with rounded clipping, frame-only mode, avatar tint/shadow, and cursor-focused pattern reveal.
src/features/agents/ui/share-card/agentCardColor.ts
Derives a representative avatar color with deterministic fallback behavior.
src/features/agents/ui/share-card/agentShareCard.ts
Renders the redesigned downloadable PNG using the same content, geometry, color, and typography decisions as the preview.
src/features/agents/ui/share-card/agentShareCard.test.ts
Covers card media utilities and rendering helpers.
src/features/agents/ui/share-card/agentShareCardLayout.ts
Shares title fitting and description wrapping between preview and export.
src/features/agents/ui/share-card/agentShareCardLayout.test.ts
Covers two/three-line layout, shifting, long words, and Unicode truncation.
src/features/agents/ui/share-card/agentShareCardSpec.ts
Defines card proportions and deterministic instruction-based “Good for” and “Vibes” copy.
src/features/agents/ui/share-card/agentShareCardSpec.test.ts
Covers title and trait derivation behavior.
src/features/design-system/generated/componentManifest.ts
Refreshes generated metadata for the import primary button.
src/shared/api/avatars.ts
Adds the renderer API for validated cached avatar animation bytes.
src/shared/api/avatars.test.ts
Covers the new avatar animation API contract.
src/shared/i18n/locales/en/agents.json
Adds the English avatar-unavailable state.
src/shared/i18n/locales/es/agents.json
Adds the Spanish avatar-unavailable state.
src/shared/lib/avatarUrl.ts
Exports the existing PNG avatar byte limit for bounded card embedding.
src/shared/ui/agent-import-primary-button.tsx
Uses the primary button treatment so import confirmation is black in light mode.
Verification
just checkjust tauri-check