fix(ports): list ports in creation order so the primary port leads
listPorts() ordered alphabetically, putting "Port Amador" ahead of "Port Nimara" in the switcher and as the default a super-admin lands on. Order by creation instead (oldest first) so the first-seeded port — the primary tenant, Port Nimara — leads. Name is a tiebreaker. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,11 @@ import type { CreatePortInput, UpdatePortInput } from '@/lib/validators/ports';
|
||||
import { ensureSystemRoots } from '@/lib/services/document-folders.service';
|
||||
|
||||
export async function listPorts() {
|
||||
return db.select().from(ports).orderBy(ports.name);
|
||||
// Creation order (oldest first), not alphabetical: the first-seeded port
|
||||
// is the primary one (Port Nimara), so it leads the switcher and is the
|
||||
// default a super-admin lands on. Alphabetical put "Port Amador" ahead of
|
||||
// "Port Nimara". Name is a stable tiebreaker for same-instant inserts.
|
||||
return db.select().from(ports).orderBy(ports.createdAt, ports.name);
|
||||
}
|
||||
|
||||
export async function getPort(id: string) {
|
||||
|
||||
Reference in New Issue
Block a user