Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

feat(ui): sort enabled channels to top of list

Max6e1745d60bdb
diff --git a/ui/src/components/steps/ChannelList.tsx b/ui/src/components/steps/ChannelList.tsx
index 607418d7f..4371840a3 100644
--- a/ui/src/components/steps/ChannelList.tsx
+++ b/ui/src/components/steps/ChannelList.tsx
@@ -187,6 +187,17 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB
const selectedCount = channels.filter((channel) => isChannelEnabled(channel.id)).length;
+ // Sort channels: enabled channels first
+ const sortedChannels = React.useMemo(() => {
+ return [...channels].sort((a, b) => {
+ const aEnabled = isChannelEnabled(a.id);
+ const bEnabled = isChannelEnabled(b.id);
+ if (aEnabled && !bEnabled) return -1;
+ if (!aEnabled && bEnabled) return 1;
+ return 0;
+ });
+ }, [channels, configs]);
+
return (
<div className={clsx('flex flex-col h-full', isPage ? 'max-w-5xl mx-auto' : '')}>
<div className="flex justify-between items-center mb-6">
@@ -234,7 +245,7 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB
{t('channelList.addTokenFirst')}
</div>
)}
- {channels.map((channel) => {
+ {sortedChannels.map((channel) => {
const rawConfig = configs[channel.id] || {};
const def = defaultConfig();
const channelConfig = {