Skip to content

fix: suppress avatar 404s and chart dimension warnings#494

Open
TheDarkSkyXD wants to merge 1 commit intospacedriveapp:mainfrom
TheDarkSkyXD:fix/console-errors-avatar-charts
Open

fix: suppress avatar 404s and chart dimension warnings#494
TheDarkSkyXD wants to merge 1 commit intospacedriveapp:mainfrom
TheDarkSkyXD:fix/console-errors-avatar-charts

Conversation

@TheDarkSkyXD
Copy link
Contributor

Summary

  • Remove eager avatarUrl from topology graph agent nodes — agents without custom avatars were triggering 404 console errors on every render. Gradient fallback avatars display correctly without the URL.
  • Add debounce={1} to ResponsiveContainer in AgentDetail charts (MemoryGrowthChart, ProcessActivityChart, MemoryDonut) to prevent the "width(-1) and height(-1)" warnings on initial mount.

Test plan

  • Verify no more GET /api/agents/avatar?agent_id=... 404 errors in console on the overview/topology page
  • Verify agent gradient avatars still render correctly in the topology graph
  • Verify agents with custom avatars still show them on the config page
  • Verify no more "width(-1) and height(-1)" chart warnings in console on agent detail pages
  • Verify charts still render and resize correctly

🤖 Generated with Claude Code

- Remove eager avatar URL from topology graph nodes — agents without
  custom avatars were triggering 404 console errors on every render.
  The gradient fallback avatars display correctly without the URL.
- Add debounce={1} to ResponsiveContainer in AgentDetail charts to
  prevent the "width(-1) and height(-1)" warnings on initial mount.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 36a1f7eb-5c6f-4a54-b62b-ea4e64a066a4

📥 Commits

Reviewing files that changed from the base of the PR and between b7d5dd2 and 4c0d1b5.

📒 Files selected for processing (2)
  • interface/src/components/TopologyGraph.tsx
  • interface/src/routes/AgentDetail.tsx
💤 Files with no reviewable changes (1)
  • interface/src/components/TopologyGraph.tsx

Walkthrough

Two files modified: removed avatar URL resolution from graph agent nodes in TopologyGraph, and added debounce configuration to chart container components in AgentDetail for resize handling optimization.

Changes

Cohort / File(s) Summary
TopologyGraph Avatar Field Removal
interface/src/components/TopologyGraph.tsx
Removed avatarUrl: api.agentAvatarUrl(agentId) field from agent node data payload in buildGraph function, relying on gradient-based avatar generation instead.
Chart Debounce Configuration
interface/src/routes/AgentDetail.tsx
Added debounce={1} prop to ResponsiveContainer components wrapping three Recharts charts: MemoryGrowthChart, ProcessActivityChart, and MemoryDonut.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes both main changes: removing avatarUrl to fix 404 errors and adding debounce to suppress chart warnings.
Description check ✅ Passed The description is directly related to the changeset, clearly explaining the motivation and impact of both the avatar URL removal and debounce addition.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant