Skip to content

feat(tui): sort pinned models by health status - #869

Merged
mdev34-lab merged 1 commit into
dev-vibecodedfrom
arena/pinned-model-health-order-silvercode
Nov 27, 2026
Merged

mdev34-lab merged 1 commit into
dev-vibecodedfrom
arena/pinned-model-health-order-silvercode

Conversation

@mdev34-lab

@mdev34-lab mdev34-lab commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

Issue for this PR

Closes #868

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Orders the Pinned section by the existing health result: working, degraded, unknown, then failing. Models keep their existing relative order within each group.

The selector reads each pinned model's health once while building its option, reuses that value for the status display, and sorts a copy of the options. The saved favorites order is not modified. Recent models, search results, and the full provider catalog retain their existing order.

How did you verify your code works?

  • Added a regression test for all four health states, stable ordering within groups, and preservation of the input array.
  • Compiled the health utility with strict TypeScript settings and ran the equivalent ordering regression locally with Node: 3 assertions passed.
  • Reviewed the final commit diff against the exact dev-vibecoded base.
  • The full TUI test suite and workspace typecheck are running in GitHub Actions; Bun is not installed in the local environment, so they were not run locally.

Screenshots / recordings

No screenshot attached. This changes the order of existing TUI rows and does not change their visual presentation.

Checklist

  • I have tested my changes locally (focused health-order helper check)
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@kilo-code-bot

kilo-code-bot Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • packages/tui/src/component/dialog-model.tsx
  • packages/tui/src/util/model-health.ts
  • packages/tui/test/model-health.test.ts

Reviewed by free · Input: 25.4K · Output: 3.4K · Cached: 142.6K

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