@cryptotaxi247 / CoPilot / commits / 38901ab2

fix: sort agents list by agent_id in frontend (#666)

Users expect agents ordered by agent_id rather than database id. Frontend now sorts filtered agents accordingly.

oliver-oat committed Feb 3, 2026 at 17:15 UTC 38901ab20dcf40b0e63722ae06fcc9c3287c3d56
1 file changed +8 -6
frontend/src/views/agents/Agents.vue
+8 -6
@@ -86,12 +86,14 @@ watch(textFilter, val => {
86 })
87
88 const agentsFiltered = computed(() => {
89 - return agents.value.filter(({ hostname, ip_address, agent_id, label }) =>
90 - (hostname + ip_address + agent_id + label)
91 - .toString()
92 - .toLowerCase()
93 - .includes(textFilterDebounced.value.toString().toLowerCase())
94 - )
89 + return agents.value
90 + .filter(({ hostname, ip_address, agent_id, label }) =>
91 + (hostname + ip_address + agent_id + label)
92 + .toString()
93 + .toLowerCase()
94 + .includes(textFilterDebounced.value.toString().toLowerCase())
95 + )
96 + .sort((a, b) => a.agent_id.localeCompare(b.agent_id))
97 })
98
99 const itemsPaginated = computed(() => {