Commit graph

195 commits

Author SHA1 Message Date
esdrasrenan
ba91c1e0f5 Implementa sistema de chat em tempo real entre agente e cliente
- Adiciona tabela liveChatSessions no schema Convex
- Cria convex/liveChat.ts com mutations e queries para chat
- Adiciona API routes para maquinas (sessions, messages, poll)
- Cria modulo chat.rs no Tauri com ChatRuntime e polling
- Adiciona comandos de chat no lib.rs (start/stop polling, open/close window)
- Cria componentes React do chat widget (ChatWidget, types)
- Adiciona botao "Iniciar Chat" no dashboard (ticket-chat-panel)
- Implementa menu de chat no system tray
- Polling de 2 segundos para maior responsividade
- Janela de chat flutuante, frameless, always-on-top

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 01:00:27 -03:00
esdrasrenan
20b63f4ad6 Fix USB policy reporting and improve agent reliability
- Fix Zod schema to accept null values (nullable) for error/currentPolicy
- Add robust logging system writing to raven-agent.log file
- Rewrite auto-start using winreg with validation
- Auto-start agent on app setup if credentials exist
- Reduce retry attempts to 2 (1 + 1 retry after 2s)
- Replace provider's remote access on ID change (prevents duplicates)
- Update agent to v0.2.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 22:43:15 -03:00
esdrasrenan
b60255fe03 Improve USB policy responsiveness and reliability
- Reduce USB policy polling from 60s to 15s for faster response
- Add retry with exponential backoff (2s, 4s, 8s) on report failures
- Add APPLYING state for real-time progress bar feedback
- Check if policy is already applied locally before re-applying
- Fix API schema to accept APPLYING status
- Update agent to v0.1.9

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-06 17:51:57 -03:00
rever-tecnologia
01a16b7e5e Fix lint error: replace Spinner with IconRefresh
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 14:01:41 -03:00
rever-tecnologia
ff90f16cef Replace spinner with skeleton loading in emprestimos page
- Remove initial spinner and show skeleton layout immediately
- Add skeleton to stats cards during loading
- Show skeleton rows in table while data loads
- Provides better visual feedback with layout structure

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 13:55:55 -03:00
rever-tecnologia
b5b74a674d Fix emprestimos table column widths consistency
- Use colgroup with fixed pixel widths instead of percentages
- Add tableLayout: fixed with minWidth for stable layout
- Add truncate to cells to prevent content overflow
- Show placeholder in Actions column for non-active items
- Column widths now stay consistent across all filter states

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 13:44:55 -03:00
rever-tecnologia
51ce3e61c7 Fix emprestimos page accents and table layout
- Fix Portuguese accents in UI text (devolucao -> devolução, emprestimo -> empréstimo, etc.)
- Restructure table to always show header with fixed column widths
- Move empty state inside TableBody with colSpan to maintain layout consistency
- Column widths now stay consistent regardless of filter selection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 13:40:18 -03:00
rever-tecnologia
0054b93d3c Improve emprestimos UX with skeleton loading and optimistic devolver
- Replace spinner with skeleton table rows during loading
- Apply optimistic closing for devolver dialog (instant feedback)
- Use toast.promise for background mutation with loading state
- Remove unnecessary isSubmitting state from devolver button
- Maintain table layout during filter changes (no layout shift)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 10:24:53 -03:00
rever-tecnologia
b7e7f99f99 Fix emprestimos table layout shift during filter changes
- Replace centered spinner with skeleton table rows
- Maintain table structure and width during loading
- Show 5 skeleton rows with proper column widths
- Prevents layout collapse when changing filters

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 10:11:43 -03:00
rever-tecnologia
7469d3b5e6 Add USB policy improvements and emprestimos details modal
- Add cron job to cleanup stale pending USB policies every 30 min
- Add cleanupStalePendingPolicies mutation to usbPolicy.ts
- Add USB policy fields to machines listByTenant query
- Display USB status chip in device details and bulk control modal
- Add details modal for emprestimos with all loan information
- Add observacoesDevolucao field to preserve original observations
- Fix status text size in details modal title

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 08:24:56 -03:00
rever-tecnologia
e9a658341f Fix auth trustedOrigins and improve emprestimos page layout
- Add production domain to trustedOrigins explicitly
- Add health API endpoint for diagnostics
- Improve emprestimos page layout to match tickets design
- Use correct primary color for buttons
- Fix segmented control styling with rounded borders
- Use Empty component for empty state

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 16:20:04 -03:00
rever-tecnologia
79bda730d5 Fix accent on page title "Empréstimos de Equipamentos"
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 14:53:45 -03:00
rever-tecnologia
38995b95c6 Improve loan page and add company filter to USB bulk control
- Update Next.js to 16.0.7
- Fix accent on menu item "Emprestimos" to "Empréstimos"
- Standardize loan page with project patterns (DateRangeButton, cyan color scheme, ToggleGroup)
- Add company filter to USB bulk policy dialog
- Update CardDescription text in devices overview
- Fix useEffect dependency warning in desktop main.tsx

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 14:52:27 -03:00
rever-tecnologia
063c5dfde7 Add equipment loan feature and USB bulk control
- Add emprestimos (equipment loan) module in Convex with queries/mutations
- Create emprestimos page with full CRUD and status tracking
- Add USB bulk control to admin devices overview
- Fix Portuguese accents in USB policy control component
- Fix dead code warnings in Rust agent
- Fix tiptap type error in rich text editor
2025-12-04 14:23:58 -03:00
rever-tecnologia
49aa143a80 Add USB storage device control feature
- Add USB policy fields to machines schema (policy, status, error)
- Create usbPolicyEvents table for audit logging
- Implement Convex mutations/queries for USB policy management
- Add REST API endpoints for desktop agent communication
- Create Rust usb_control module for Windows registry manipulation
- Integrate USB policy check in agent heartbeat loop
- Add USB policy control component in admin device overview
- Add localhost:3001 to auth trustedOrigins for dev

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:30:59 -03:00
Esdras Renan
f7ad7f6a17 Fix admin rename payload and harden RustDesk ID sync 2025-11-26 21:00:08 -03:00
Esdras Renan
66559eafbf feat(visits): concluir/reabrir visita sem poluir agenda 2025-11-26 14:21:31 -03:00
Esdras Renan
307a291c71 Upgrade Prisma to v7 2025-11-19 13:24:08 -03:00
Esdras Renan
2c975edd09 Update Next.js and dependencies 2025-11-19 11:07:47 -03:00
Esdras Renan
17c1de2272 Adjust machines report layout spacing 2025-11-19 08:32:15 -03:00
Esdras Renan
a7f9191e1d feat: configurable machine report export 2025-11-18 15:54:49 -03:00
Esdras Renan
674c62208f Remove hours usage cron/action 2025-11-18 09:34:56 -03:00
Esdras Renan
3565500e9c fix: ensure convex client fallback url 2025-11-17 16:17:16 -03:00
Esdras Renan
b721348e19 feat: improve custom fields admin and date filters 2025-11-15 01:51:55 -03:00
Esdras Renan
15d11b6b12 feat: improve reports filters and ticket flows 2025-11-14 19:41:47 -03:00
Esdras Renan
9c74e10675 fix: alinhar searchParams da página de erro de autenticação ao contrato do Next 16 2025-11-14 15:08:18 -03:00
Esdras Renan
72b25fafab chore: ajustar tipos e remover any em rotas e tickets 2025-11-14 14:41:17 -03:00
Esdras Renan
b2de4b8480 ux: alinhar pagina de erro do handshake ao layout do portal 2025-11-14 11:46:36 -03:00
Esdras Renan
52c03ff1cf feat: portal reopen, reports, templates and remote access 2025-11-13 23:22:17 -03:00
Esdras Renan
8db3b20a40 Add tests for quick modal auto-open 2025-11-13 21:45:46 -03:00
Esdras Renan
abb29d9116 Auto-open modals from global quick actions 2025-11-13 21:43:36 -03:00
Esdras Renan
cc68c85246 Adjust ticket filters visibility and add date range 2025-11-13 09:54:36 -03:00
Esdras Renan
004f345d92 feat(portal): add desktop-style filters and breadcrumbs 2025-11-12 21:03:42 -03:00
Esdras Renan
f5898153fe feat: improve ticket navigation and filters 2025-11-12 20:40:38 -03:00
Esdras Renan
da46fa448b feat(convex): add internal url and remote access fixes 2025-11-11 16:06:11 -03:00
Esdras Renan
5daa954840 Alinha config do RustDesk 2025-11-11 13:34:04 -03:00
Esdras Renan
ef1db284fa Provisiona RustDesk automaticamente 2025-11-11 11:54:46 -03:00
Esdras Renan
967d4bf1c6 Substitui alertas por painel de SLA 2025-11-11 10:24:46 -03:00
Esdras Renan
fa96768fa9 fix: sanitize report keys when listing schedules 2025-11-10 03:11:57 -03:00
Esdras Renan
a2c264a3ea fix: sanitize report keys before serializing schedule 2025-11-10 03:07:22 -03:00
Esdras Renan
56dd48d6b9 fix: await search params on incident page 2025-11-10 02:56:24 -03:00
Esdras Renan
a7921ffffb fix: use Next RouteContext helpers for dynamic API routes 2025-11-10 02:47:36 -03:00
Esdras Renan
d859c1196c fix: align report schedule route context types 2025-11-10 02:37:17 -03:00
Esdras Renan
561b19cf66 chore: sync staging 2025-11-10 01:57:45 -03:00
Esdras Renan
a62f3d5283 feat: add SLA category breakdown report 2025-11-08 02:47:39 -03:00
Esdras Renan
6ab8a6ce89 feat: agenda polish, SLA sync, filters 2025-11-08 02:34:43 -03:00
Esdras Renan
7fb6c65d9a Fix form template labels and guard admin auth tables 2025-11-08 00:40:32 -03:00
Esdras Renan
003d068c56 Patch performance measure and ignore nova calendar 2025-11-08 00:36:24 -03:00
Esdras Renan
d8eb38fe52 Update Prisma and harden tests 2025-11-08 00:28:52 -03:00
Esdras Renan
a2f9d4bd1a Improve custom field timeline and toasts 2025-11-07 23:59:16 -03:00