feat(frontend): implementar paginacao numerada em listagens de tickets
- Adiciona tickets.listPaginated no backend com paginacao nativa Convex - Converte TicketsView para usePaginatedQuery com controles numerados - Converte PortalTicketList para usePaginatedQuery com controles numerados - Atualiza tauri e @tauri-apps/api para versao 2.9 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
91ac6c416c
commit
3396e930d4
10 changed files with 704 additions and 78 deletions
|
|
@ -34,17 +34,12 @@ type MachineUpdatePayload = {
|
|||
totalUnread: number
|
||||
}
|
||||
|
||||
type MessagesPayload = {
|
||||
messages: ChatMessage[]
|
||||
hasSession: boolean
|
||||
}
|
||||
|
||||
// Convex self-hosted exige o formato "module.js:function"
|
||||
const FN_CHECK_UPDATES = "liveChat.js:checkMachineUpdates" as const
|
||||
const FN_LIST_MESSAGES = "liveChat.js:listMachineMessages" as const
|
||||
const FN_POST_MESSAGE = "liveChat.js:postMachineMessage" as const
|
||||
const FN_MARK_READ = "liveChat.js:markMachineMessagesRead" as const
|
||||
const FN_UPLOAD_URL = "liveChat.js:generateMachineUploadUrl" as const
|
||||
// Nomes das functions no Convex (formato module:function)
|
||||
const FN_CHECK_UPDATES = "liveChat:checkMachineUpdates" as const
|
||||
const FN_LIST_MESSAGES = "liveChat:listMachineMessages" as const
|
||||
const FN_POST_MESSAGE = "liveChat:postMachineMessage" as const
|
||||
const FN_MARK_READ = "liveChat:markMachineMessagesRead" as const
|
||||
const FN_UPLOAD_URL = "liveChat:generateMachineUploadUrl" as const
|
||||
|
||||
async function loadStore(): Promise<MachineStoreData> {
|
||||
const appData = await appLocalDataDir()
|
||||
|
|
|
|||
|
|
@ -1106,7 +1106,14 @@ const resolvedAppUrl = useMemo(() => {
|
|||
|
||||
prevUnread = totalUnread
|
||||
},
|
||||
(err) => console.error("chat updates (Convex) erro:", err)
|
||||
(err) => {
|
||||
console.error("chat updates (Convex) erro:", err)
|
||||
const msg = (err?.message || "").toLowerCase()
|
||||
if (msg.includes("token de máquina") || msg.includes("revogado") || msg.includes("expirado") || msg.includes("inválido")) {
|
||||
// Token inválido/expirado no Convex → tenta autoregistrar de novo
|
||||
attemptSelfHeal("convex-subscribe").catch(console.error)
|
||||
}
|
||||
}
|
||||
).then((u) => {
|
||||
unsub = u
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue