Skip to content

fix(desktop): drop red failed-host indicator from v2 ports dropdown#3787

Merged
AviPeltz merged 2 commits intomainfrom
remove-red-indicator-from-v2-ports-dropdown
Apr 27, 2026
Merged

fix(desktop): drop red failed-host indicator from v2 ports dropdown#3787
AviPeltz merged 2 commits intomainfrom
remove-red-indicator-from-v2-ports-dropdown

Conversation

@AviPeltz
Copy link
Copy Markdown
Collaborator

@AviPeltz AviPeltz commented Apr 27, 2026

Summary

  • Removes the red LuCircleAlert indicator (and its tooltip) from the v2 dashboard sidebar Ports header
  • Cleans up now-unused imports and the failedHostCount/portLoadErrors branching in DashboardSidebarPortsList
  • Simplifies the port-count badge to always sit on the right

Test plan

  • Open a v2 workspace dashboard with at least one unreachable host and confirm no red indicator appears next to "Ports"
  • Confirm the port total still renders right-aligned when ports load successfully
  • bun run typecheck and bun run lint pass

Summary by cubic

Removed the red failed-host LuCircleAlert indicator and its tooltip from the v2 dashboard sidebar Ports header. Added a subtle LuCircleHelp button with a tooltip that opens the Ports docs in a new tab, kept the port total right-aligned, and removed unused error-handling code and imports.

Written for commit 207ccce. Summary will update on new commits.

Summary by CodeRabbit

  • Bug Fixes

    • Removed error alerts and failure-host tooltips from the ports list, streamlining the sidebar UI.
  • New Features / UX

    • Replaced the error indicator near the port count with a help icon tooltip that opens the ports documentation in a new tab.
    • Port-count display now uses consistent styling; the ports list only renders when there is at least one port.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 27, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8f17c300-b0d7-4c33-bfa0-c02f6d89917a

📥 Commits

Reviewing files that changed from the base of the PR and between 77ba240 and 207ccce.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx

📝 Walkthrough

Walkthrough

The sidebar port list component removes consumption of portLoadErrors/failedHostCount, drops the failed-host tooltip/alert and related conditional styling, changes the null early-exit to depend only on totalPortCount === 0, and replaces the error indicator with a help icon that links to the docs.

Changes

Cohort / File(s) Summary
Dashboard Sidebar Ports List
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx
Removed use of portLoadErrors/failedHostCount, eliminated failed-host tooltip/alert and conditional red styling, simplified early-exit to totalPortCount === 0, replaced error indicator with a help-icon tooltip that opens ${COMPANY.DOCS_URL}/ports, and unified the port-count span class.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through code at break of day,

Trimmed the error hops that lost their way,
One gentle icon points to lore,
Counts stay steady, clutter no more,
A cleaner trail for devs to play ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 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 (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: removing the red failed-host indicator from the v2 ports dropdown, which aligns with the primary purpose of the changeset.
Description check ✅ Passed The description includes a clear summary, test plan with verification steps, and references the auto-generated summary. However, it lacks explicit sections for 'Related Issues', 'Type of Change', and 'Screenshots' from the template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch remove-red-indicator-from-v2-ports-dropdown

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.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 27, 2026

Greptile Summary

This PR removes the red LuCircleAlert failed-host indicator (and its tooltip) from the v2 Ports sidebar header, cleans up the now-unused portLoadErrors/failedHostCount branching, and simplifies the port-count badge to always be right-aligned.

  • The early-return condition changed from totalPortCount === 0 && failedHostCount === 0 to totalPortCount === 0, meaning if all hosts fail and return 0 ports, the Ports section now silently returns null rather than staying visible. Consider whether this all-hosts-fail edge case should show a minimal fallback or remain as-is by design.

Confidence Score: 4/5

Safe to merge once the all-hosts-fail silent-disappearance edge case is confirmed intentional by the team.

The only finding is P2: a behavioral edge case where the Ports section fully disappears when all hosts are unreachable (previously it stayed visible with an error indicator). All imports are correctly cleaned up and the happy-path rendering is simplified correctly. If the silent-disappearance is an accepted product decision, this is a clean merge.

DashboardSidebarPortsList.tsx — early-return guard change on line 13

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx Removes the red LuCircleAlert error indicator, its tooltip, and associated portLoadErrors/failedHostCount logic. One edge case: the early-return guard now hides the entire section when all hosts fail (totalPortCount===0 + errors), where previously it remained visible with an error state.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[DashboardSidebarPortsList renders] --> B{totalPortCount === 0?}
    B -- Yes --> C[return null — section hidden]
    B -- No --> D[Render Ports header + badge]
    D --> E[Show port-count badge ml-auto]
    E --> F{isCollapsed?}
    F -- No --> G[Render DashboardSidebarPortGroup list]
    F -- Yes --> H[Collapse — no list rendered]

    subgraph Before this PR
        B2{totalPortCount === 0 AND failedHostCount === 0?}
        B2 -- Yes --> C2[return null]
        B2 -- No, errors exist --> ERR[Render section + red LuCircleAlert tooltip]
    end
Loading
Prompt To Fix All With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx
Line: 13-15

Comment:
**Silent disappearance when all hosts fail**

The old guard was `totalPortCount === 0 && failedHostCount === 0`, which kept the Ports section visible (with the alert icon) when all hosts errored but returned 0 ports. The new guard `totalPortCount === 0` now returns `null` for that same scenario — the entire section silently disappears instead of staying visible. The test plan covers "at least one reachable host" but not the all-hosts-fail case; users in that state get no indication that Ports exist but couldn't load.

How can I resolve this? If you propose a fix, please make it concise.

Reviews (1): Last reviewed commit: "fix(desktop): drop red failed-host indic..." | Re-trigger Greptile

Comment on lines +13 to 15
if (totalPortCount === 0) {
return null;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Silent disappearance when all hosts fail

The old guard was totalPortCount === 0 && failedHostCount === 0, which kept the Ports section visible (with the alert icon) when all hosts errored but returned 0 ports. The new guard totalPortCount === 0 now returns null for that same scenario — the entire section silently disappears instead of staying visible. The test plan covers "at least one reachable host" but not the all-hosts-fail case; users in that state get no indication that Ports exist but couldn't load.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx
Line: 13-15

Comment:
**Silent disappearance when all hosts fail**

The old guard was `totalPortCount === 0 && failedHostCount === 0`, which kept the Ports section visible (with the alert icon) when all hosts errored but returned 0 ports. The new guard `totalPortCount === 0` now returns `null` for that same scenario — the entire section silently disappears instead of staying visible. The test plan covers "at least one reachable host" but not the all-hosts-fail case; users in that state get no indication that Ports exist but couldn't load.

How can I resolve this? If you propose a fix, please make it concise.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx (1)

10-11: Consider pruning the unused portLoadErrors from the hook's return type.

This component is the only consumer of useDashboardSidebarPortsData(), yet it only destructures totalPortCount and workspacePortGroups. The hook still computes and returns portLoadErrors (lines 172–191 in useDashboardSidebarPortsData.ts), but it is never used anywhere in the codebase. Removing it from the hook's return type and the computation will eliminate dead code.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx`
around lines 10 - 11, The hook useDashboardSidebarPortsData currently computes
and returns portLoadErrors but the consumer (destructuring totalPortCount and
workspacePortGroups) never uses it; remove the dead portLoadErrors work by
deleting its computation (the logic generating portLoadErrors) and remove it
from the hook's return value so the hook only returns totalPortCount and
workspacePortGroups; update the hook implementation and any types to drop
portLoadErrors and ensure no other code references portLoadErrors.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx`:
- Around line 10-11: The hook useDashboardSidebarPortsData currently computes
and returns portLoadErrors but the consumer (destructuring totalPortCount and
workspacePortGroups) never uses it; remove the dead portLoadErrors work by
deleting its computation (the logic generating portLoadErrors) and remove it
from the hook's return value so the hook only returns totalPortCount and
workspacePortGroups; update the hook implementation and any types to drop
portLoadErrors and ensure no other code references portLoadErrors.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f265a622-003c-4344-8fa7-928aaa3aca45

📥 Commits

Reviewing files that changed from the base of the PR and between 9abd936 and 77ba240.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarPortsList/DashboardSidebarPortsList.tsx

@AviPeltz AviPeltz merged commit b9c0d7c into main Apr 27, 2026
6 of 7 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

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