Skip to content

Merge#69

Open
Rafael-Karele wants to merge 210 commits into
ProjetoIntegradorIFMOC:mainfrom
Rafael-Karele:main
Open

Merge#69
Rafael-Karele wants to merge 210 commits into
ProjetoIntegradorIFMOC:mainfrom
Rafael-Karele:main

Conversation

@Rafael-Karele
Copy link
Copy Markdown
Contributor

No description provided.

… repetitivo

- Submissão agora aparece instantaneamente com status "Pendente" sem redirect
- Corrige spinner que aparecia a cada 10s no histórico (useEffect dependia da referência do objeto em vez do ID)
- Polling do DataContext refatorado com useRef/useCallback para estabilidade
- Separa fetch do problema do fetch de resultados em SubmissionsDetails
- Moderniza interface do frontend com novo design system (componentes
  reutilizáveis: ActivityCard, StatusBadge, StatCard, SectionCard, EmptyState)
- Refatora páginas: Home, Activities, Login, ForgotPassword, ChangePassword,
  Profile, Submissions, ClassDetails
- Implementa feature Jam Sessions para atividades ao vivo em sala:
  - Backend Laravel: controller, models, migrations, service Judge0
  - Node.js WebSocket sidecar para comunicação em tempo real
  - Frontend React: páginas Jam (Create, Lobby, Professor, Student, View),
    componentes (StudentCard, FocusView, Timer, Banner, FeedbackDialog),
    hook useJamSession, service JamSessionService
  - Integração com Judge0 para execução de código
  - Docker Compose: novo serviço jam_server
- docker-compose.prod.yml com portas bind em 127.0.0.1 apenas
- Dockerfile.prod multi-stage para build otimizado do frontend
- nginx.conf para SPA routing no container do frontend
- Relaxa noUnusedLocals/noUnusedParameters no tsconfig para build
# Conflicts:
#	back/src/app/Http/Controllers/SubmissaoController.php
#	front/src/context/DataContext.tsx
#	front/src/pages/activitiesDetails/ActivitiesDetails.tsx
Arquivo contém credenciais de banco e Redis.
Já estava no .gitignore mas continuava tracked.
Notifica o sidecar com resultados detalhados (compile_output, status
por teste) e exibe no painel do aluno e no modal do professor.
Feedback agora é uma lista de mensagens com timestamp em vez de texto
único substituído. Professor vê atualizações em tempo real no modal
(focusedParticipant derivado do array reativo de participants).
- Migration usa SQL raw com USING para PostgreSQL
- JamView carrega sessão via REST antes de conectar WS
- Não conecta WS para sessões encerradas (finished)
- Reconexão WS respeita status da sessão e desmontagem
Professor pode alterar título, instruções e tempo limite durante
sessão ativa via modal, com broadcast WS para todos os clients.
Nova mensagem WS leve CURSOR_UPDATE transmite posição do cursor do
aluno sem usar STATE_UPDATE. O editor do professor (card e focus view)
faz scroll automático e exibe caret piscando com highlight no caractere.
…snap em colunas)

Substitui o toggle expandir/reduzir por um handle de drag no canto inferior-direito
dos cards. Durante o arrasto a largura acompanha o mouse pixel a pixel e ao soltar
faz snap para o colSpan mais próximo do grid. Cards redimensionados individualmente
mantêm seu tamanho mesmo ao trocar o preset global P/M/G.
Vite 5+ bloqueia requisições de hosts não-localhost por padrão,
causando 403 em produção quando acessado via domínio pelo nginx.
A VPS não tem conectividade IPv4 para ce.judge0.com (Cloudflare),
apenas IPv6. Configura subnet IPv6 público no Docker compose para
que os containers consigam acessar a API externa.
Hero header com gradiente teal, cards com faixa colorida e animação
staggered, form inline com backdrop-blur, empty state contextual,
botões de edição visíveis só no hover.
Atualiza todas as páginas e componentes compartilhados para usar
a paleta teal (#0d9488) + stone, hero headers com gradiente,
cards com faixas coloridas, animações staggered e empty states
consistentes. Remove gradientes blue-purple descontinuados.
Hero header com gradiente teal, cards arredondados, empty states
com ícones em container accentLight, modais com rounded-2xl.
Divide o arquivo monolítico de 1755 linhas em 14 arquivos:
types, useClassDetails hook, ClassHero, ActivitiesTab, StudentsTab,
JamSessionsTab, ActivityFormModal (unifica create/edit), ActivityViewModal,
DeleteActivityModal, SubmissionsModal, SubmissionStatusBadge, TestCaseRow,
index barrel e ClassDetails orquestrador.
Apply consistent teal+stone palette across all 8 jam session files,
replacing generic gray/blue with stone backgrounds and teal accents.
Add hero header to JamCreate, teal badges/buttons throughout.
Add min-h-0 to flex containers so Monaco Editor respects
the viewport height instead of expanding infinitely.
Header is h-14 (56px) and main has pt-10 (2.5rem). Use negative
margins to escape the main padding so the jam view fills the
remaining viewport correctly.
- Enunciado agora abre como slide-over com Ctrl+E, escondido por padrão
- Painéis de enunciado e resultados com layout profissional (headers
  uppercase, separadores, ícones contextuais)
- Tema claro consistente com stone+teal design system
- Largura agora é salva em pixels ao invés de colSpan inteiro
- Drag horizontal segue o mouse livremente como o vertical
- Corrige clique fantasma após fim de drag (debounce 200ms)
- Remove grid-column snap e medição de colWidth
Volta ao CSS grid para manter posição fixa dos cards. Cards
redimensionados transbordam sobre vizinhos com z-index sem
causar reflow no layout.
Cards são painéis absolute-positioned num canvas livre.
Professor arrasta (Move no header) e redimensiona (handle
no canto inferior direito) cada card independentemente.
Auto-layout em grid ao conectar; botão Reorganizar reseta.
Ao clicar sem arrastar no header do card, os estilos inline
(left/top) eram limpos mas sem re-render do React, fazendo o
card pular para (0,0). Agora restaura a posição original quando
não houve arrasto real (<3px).
Scroll com mouse sobre o editor do card ajusta o font size (6-24px).
Captura wheel direto no DOM do Monaco com passive:false para
prevenir scroll do canvas.
Substitui os 4 cards de stats por badges compactos na mesma linha
dos botões, reduzindo padding e espaçamento para maximizar o canvas.
Adiciona bg-white/80 e escurece os dots do handle para garantir
contraste em cards sem badge de feedback.
Status coding não é atualizado pelo servidor, badge sempre mostrava 0.
Remove max-w-7xl e justify-between do header para que o dropdown
de perfil fique posicionado no fim do espaçamento horizontal.
Rafael-Karele and others added 30 commits February 27, 2026 14:18
fix: stop mounting code as volume in production
The .dockerignore excludes src/storage/framework/ so these dirs don't
exist in the image. This caused view:cache to fail with "View path not
found" because realpath() returns false for missing dirs, and
config:cache bakes that false into the cached config.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: recreate storage/framework dirs in Dockerfile.prod
realpath() returns false when the directory doesn't exist, causing
config:cache to bake false into the cached config. This makes
view:cache fail with "View path not found" since view:clear checks
for a truthy path.

Using storage_path() directly (without realpath) always returns the
correct string path regardless of whether the directory exists yet.
This matches the Laravel 11+ default.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: remove realpath() from view.compiled config
Docker RUN uses sh, not bash. Brace expansion {a,b,c} is a bash-only
feature — sh creates a literal directory named "{cache,sessions,...}"
instead of expanding it. This left sessions/testing dirs missing,
causing 500 errors (session write failures).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: expand mkdir brace syntax for sh compatibility
The monitoring system needs access to the Docker socket and host /proc
to collect container and system metrics. These volumes existed in the
dev compose but were missing from docker-compose.prod.yml. Also adds
the missing JUDGE0_API_URL environment variable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lumes

fix: add monitoring volumes to ws_server in prod compose
- Add /api/health endpoint (public, no auth) to Laravel backend
- Add healthchecks for postgres, both redis instances, backend, frontend, and ws_server
- Update depends_on to use condition: service_healthy so services wait for real readiness
- Add curl to frontend Dockerfile.prod for healthcheck support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Docker health checks to production services
Fix stat grid to use responsive columns (1 -> 2 -> 3) instead of
fixed 3-column layout that broke on mobile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hardcoded palette object and all inline styles. Split into
ClassCard and ClassFormInline components. Use UI button/input/label
components. Apply mobile-first responsive grid and card patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split 703-line file into Problems (226), ProblemFormModal (374), and
DeleteConfirmModal (61). Remove palette object and all inline styles.
Use Button/Input/Label UI components. Mobile-first responsive modals.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split 747-line file into Students (246), StudentFormModal (329),
DeleteStudentModal (54), StudentTable (101). Remove palette object,
use UI components, add responsive table columns hidden on mobile.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split 685-line file into Teachers (281), TeacherFormModal (294),
DeleteTeacherModal (60). Remove palette object, use UI components,
add responsive table columns with mobile sub-info in name cell.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split 699-line file into 7 focused modules: main page (206),
StatsCards, SubmissionInfoSection, ErrorSections, TestResultsSection,
statusConfig, utils. Remove all inline styles and hex gradients.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split 386-line file into ActivitiesDetails (258), SubmissionsHistory
(171), and shared utils (35). Add mobile card view for submissions
table, responsive padding and typography throughout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove palette object and all inline styles. Replace inline empty
state with EmptyState component. Hide date column on mobile. Apply
design system card and table patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fix hardcoded SVG stroke colors in CircularProgress to use Tailwind
classes. Add mobile-first responsive padding to SubmissionFeed,
WeeklyHeatmap, and LanguageBar wrapper.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Refactor Login, ForgotPassword, ChangePassword, ResetPassword to use
UI components (Input, Label, Button). Replace zinc with stone palette.
Remove inline styles. Center layouts properly on all viewports.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove inline styles across all Jam pages. Extract JamResultsPanel
from JamStudentView (452 -> 287 lines). Apply design system card
patterns and responsive modal/form layouts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove inline gradient/color styles from ClassHero, ActivitiesTab,
StudentsTab, JamSessionsTab. Fix Unauthorized gray->stone palette.
Add tablet breakpoint to Monitoring grid. Responsive tabs in ClassDetails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove unused navigate in Classes, unused index param in Submissions,
unused SectionCard import in ErrorSections.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…l-pages

feat: responsive redesign of all frontend pages
- Add redis and pdo_mysql extensions to the PHP Dockerfile\n- Change backend port to 8001 to prevent local port conflicts\n- Switch backend server command to native PHP server for stability\n- Disable IPv6 in Docker Compose to fix Connection reset issues\n- Update README.md and .env.example files with new instructions
- Creates provision.sh for automated environment setup\n- Supports custom database password and backend port\n- Injects BACKEND_PORT variable into docker-compose\n- Automates key generation, migrations, and seeding
- Set default password to 12345678 in README and provision.sh\n- Prioritize provision.sh as the main installation method
…to 8000

- Add full-reset option and config existence checks to provision.sh.
- Implement cross-platform sed compatibility and robust DB readiness check.
- Revert default backend port from 8001 to 8000 in .env.example and README.
- Update docker-compose backend command to use php artisan serve.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants