fix: update app logo and active tab fix#185
Conversation
WalkthroughThree separate component and layout modifications: the topbar now displays a static wavefront image and revised "POWERED BY" label, the agent detail page simplifies display name construction by removing prefilled values concatenation, and the app layout strengthens navigation item identification through unique IDs and strict pathname matching while conditionally inserting API Services navigation. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
wavefront/client/src/pages/apps/[appId]/agents/[id].tsx (1)
94-115: Avoid usingdisplay_nameas the tool identity (selection/YAML sync may break after this change).Since selection is matched by
selected.value === tool.display_name(Line 131), changingdisplay_nameformatting risks breaking existing selections and tool syncing. Prefer storing/matching by a stable key (e.g.,tool.id) and keepdisplay_nameonly for rendering.const toolsDetails = useMemo(() => { return availableTools.map((tool) => { ... return { + id: tool.id, name: tool.name, prefilled_values: prefilledValue, display_name: `${tool.resource_name ? tool.resource_name + ' - ' : ''}${tool.name}`, description: tool.description, }; }); }, [availableTools]); - const tools = toolsDetails.filter((tool) => selectedTools.some((selected) => selected.value === tool.display_name)); + const tools = toolsDetails.filter((tool) => selectedTools.some((selected) => selected.id === tool.id));Also applies to: 131-131
wavefront/client/src/components/topbar/Topbar.tsx (1)
44-46: Logo asset + a11y: ensure/wavefront.pngis shipped, and fix semantics/alt/size.Consider switching the wrapper to a
<button>/<Link>(or addrole="button" tabIndex=0+ key handlers), and alignalt+ addheightto reduce layout shift.- <a className="flex min-w-[240px] cursor-pointer justify-center border-r px-8 py-5" onClick={handleNavIconClick}> - <img src="/wavefront.png" alt="Rootflo Icon" className="object-contain" width={149} /> - </a> + <button + type="button" + className="flex min-w-[240px] cursor-pointer justify-center border-r px-8 py-5" + onClick={handleNavIconClick} + > + <img + src="/wavefront.png" + alt="Wavefront" + className="object-contain" + width={149} + height={32} + loading="eager" + decoding="async" + /> + </button>wavefront/client/src/pages/apps/layout.tsx (1)
109-114: Harden active-tab detection (avoid relying on raw split index).This works for
/apps/:appId/:section/..., but is fragile if the path shape changes. At least guard the segment extraction (or use router matching utilities).- const isActive = item.id === location.pathname.split('/')[3]; + const section = location.pathname.split('/')[3] ?? ''; + const isActive = item.id === section;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
wavefront/client/public/wavefront.pngis excluded by!**/*.png
📒 Files selected for processing (3)
wavefront/client/src/components/topbar/Topbar.tsx(1 hunks)wavefront/client/src/pages/apps/[appId]/agents/[id].tsx(1 hunks)wavefront/client/src/pages/apps/layout.tsx(4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
wavefront/client/src/pages/apps/layout.tsx (1)
wavefront/client/src/assets/icons/index.ts (1)
PhoneIcon(7-7)
🔇 Additional comments (3)
wavefront/client/src/components/topbar/Topbar.tsx (1)
48-52: “POWERED BY” block looks fine; sizing is explicit.wavefront/client/src/pages/apps/layout.tsx (2)
17-86: Nav itemids matching route segments is a solid improvement.
88-98: Conditional insertion of “API Services” is clear and keeps ordering predictable.
Summary by CodeRabbit
New Features
Bug Fixes
UI Updates
✏️ Tip: You can customize this high-level summary in your review settings.