Skip to content

fix: prioritize active tunnels in job tunnel selector#71

Merged
aledefra merged 4 commits intodevelopfrom
codex/tunnel-selector-status-order-2
Mar 11, 2026
Merged

fix: prioritize active tunnels in job tunnel selector#71
aledefra merged 4 commits intodevelopfrom
codex/tunnel-selector-status-order-2

Conversation

@aledefra
Copy link
Collaborator

Summary

  • sort existing tunnel options by status priority so healthy/degraded appear before inactive/down
  • keep alphabetical sorting within the same status bucket
  • show a color-coded status indicator next to each tunnel in the selector (and in selected value)

Validation

  • npm run lint

Copilot AI review requested due to automatic review settings March 11, 2026 09:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the “Create Job” tunnel selector to make it easier to pick a usable tunnel by prioritizing active statuses and surfacing tunnel health inline in the dropdown and selected value.

Changes:

  • Sort existing tunnel options by status priority (healthy/degraded first), then by alias within each status bucket.
  • Add a status indicator (colored dot + label) to tunnel options and the rendered selected value.
  • Refactor tunnel option typing to support a custom/manual entry alongside existing tunnels.

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

Copilot AI review requested due to automatic review settings March 11, 2026 09:55
Copy link
Contributor

Copilot AI left a comment

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 4 out of 4 changed files in this pull request and generated 1 comment.


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

Copy link
Contributor

Copilot AI left a comment

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 4 out of 4 changed files in this pull request and generated 1 comment.


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

Comment on lines +4 to +17
type TunnelStatusTagVariant = 'slate' | 'green' | 'yellow' | 'red';

const tunnelStatusDotColorClassByStatus: Record<TunnelStatus, string> = {
healthy: 'bg-emerald-500',
degraded: 'bg-yellow-500',
down: 'bg-red-500',
inactive: 'bg-gray-500',
};

const tunnelStatusTagVariantByStatus: Record<TunnelStatus, TunnelStatusTagVariant> = {
healthy: 'green',
degraded: 'yellow',
down: 'red',
inactive: 'slate',
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

TunnelStatusTagVariant duplicates the existing ColorVariant union exported by @shared/SmallTag. Consider typing tunnelStatusTagVariantByStatus as Record<TunnelStatus, ColorVariant> (or Extract<ColorVariant, 'slate' | 'green' | 'yellow' | 'red'>) to keep the mapping type aligned with the component’s accepted variants and avoid future drift.

Copilot uses AI. Check for mistakes.
@aledefra aledefra merged commit 49e25c4 into develop Mar 11, 2026
7 checks passed
@aledefra aledefra deleted the codex/tunnel-selector-status-order-2 branch March 11, 2026 10:04
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.

2 participants