diff --git a/.github/workflows/ci-cd-web-desktop.yml b/.github/workflows/ci-cd-web-desktop.yml index 886d0b9..d4f6567 100644 --- a/.github/workflows/ci-cd-web-desktop.yml +++ b/.github/workflows/ci-cd-web-desktop.yml @@ -226,6 +226,15 @@ jobs: restore-keys: | ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml', 'bun.lock') }}- + - name: Lint check (fail fast before build) + run: | + cd "$EFFECTIVE_APP_DIR" + docker run --rm \ + -v "$EFFECTIVE_APP_DIR":/app \ + -w /app \ + sistema_web:node22-bun \ + bash -lc "set -euo pipefail; bun install --frozen-lockfile --filter '!appsdesktop'; bun run lint" + - name: Install and build (Next.js) env: PRISMA_ENGINES_CHECKSUM_IGNORE_MISSING: "1" diff --git a/src/components/tickets/ticket-chat-history.tsx b/src/components/tickets/ticket-chat-history.tsx index 99a4695..6ca63ff 100644 --- a/src/components/tickets/ticket-chat-history.tsx +++ b/src/components/tickets/ticket-chat-history.tsx @@ -8,6 +8,7 @@ import { api } from "@/convex/_generated/api" import type { Id } from "@/convex/_generated/dataModel" import { useAuth } from "@/lib/auth-client" import { Button } from "@/components/ui/button" +import { Card, CardContent } from "@/components/ui/card" import { Spinner } from "@/components/ui/spinner" import { cn } from "@/lib/utils" import { @@ -147,7 +148,7 @@ function ChatSessionCard({ session, isExpanded, onToggle }: { session: ChatSessi return (
- {/* Header da sessao */} + {/* Header da sessão */}
{isExpanded ? ( @@ -308,7 +309,7 @@ function DayGroupCard({ )} - {/* Sessoes do dia */} + {/* Sessões do dia */} {isExpanded && (
{dayGroup.sessions.map((session) => ( @@ -405,46 +406,47 @@ export function TicketChatHistory({ ticketId }: ChatHistoryProps) { setVisibleDays((prev) => prev + DAYS_PER_PAGE) } - // Nao mostrar se nao ha historico + // Não mostrar se não há histórico if (!chatHistory || chatHistory.sessions.length === 0) { return null } return ( -
- {/* Header */} -
-
- -

Historico de chat

+ + + {/* Header */} +
+
+

Histórico de chat

+

+ {chatHistory.sessions.length} {chatHistory.sessions.length === 1 ? "sessão" : "sessões"} - {chatHistory.totalMessages} mensagens +

+
- - {chatHistory.sessions.length} {chatHistory.sessions.length === 1 ? "sessao" : "sessoes"} - {chatHistory.totalMessages} mensagens - -
- {/* Grupos por dia */} -
- {displayedDays.map((dayGroup) => ( - toggleDay(dayGroup.dateKey)} - expandedSessions={expandedSessions} - onToggleSession={toggleSession} - /> - ))} -
- - {/* Carregar mais dias */} - {hasMoreDays && ( -
- + {/* Grupos por dia */} +
+ {displayedDays.map((dayGroup) => ( + toggleDay(dayGroup.dateKey)} + expandedSessions={expandedSessions} + onToggleSession={toggleSession} + /> + ))}
- )} -
+ + {/* Carregar mais dias */} + {hasMoreDays && ( +
+ +
+ )} + + ) }